> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ev-cloud.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ev-cloud.ai/_mcp/server.

# Long-running operations

Some operations depend on a charger or a roaming partner answering, which takes longer than one HTTP request should wait. These calls return at once and finish in the background. Each operation's description in the [API Reference](/api-reference) names what to poll.

| You called                                                       | Then poll                                           | Until                                                                                    |
| ---------------------------------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `energy.controlRequests.create` (returns `202`)                  | `energy.controlRequests.get` with its `request_id`  | `result` is no longer `PENDING`                                                          |
| `emsp.commands.send`                                             | `emsp.commands.get` with the returned `tracking_id` | the command has a final result                                                           |
| `emsp.tokens.bulkProvision` with `auto_activate` (returns `202`) | `emsp.tokens.get` for each token                    | it leaves `PROVISIONED`; a failed push stays `PROVISIONED` and is listed in the response |

## Polling well

* Poll every 2 to 5 seconds, and stop at a deadline you choose.
* `emsp.commands.get` refreshes a roaming command that is still `PENDING` from the partner, so polling it is what finishes it.

> **Note**
>
> Prefer events to polling? Register a webhook endpoint with `webhooks.endpoints.create`, for example for `energy.control_response`.

## Retries and asynchronous calls

The SDKs send a `POST` that could act twice only once, even after a `503`: the first attempt may already have reached the charger. Check the status before you retry it yourself, or send an `Idempotency-Key` so a repeat returns the first result. See [Errors and retries](/sdks/errors-and-retries).