# Restart the connection

URL: https://docs.fxapis.com/api-reference/lifecycle/restart-the-connection

> Restart the connection. For an account that is online but misbehaving — degraded, stale quotes, a stuck sync.

`POST https://api.fxapis.com/v1/accounts/{id}/restart`

For an account that is online but misbehaving — `degraded`, stale quotes, a stuck sync. Returns **202**; poll `pollUrl` until `state` is `ready`. Refused with 409 while an order is in flight, for the same reason as taking it offline.

Authentication: `Authorization: Bearer <API key>`.

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |

#### Responses

- `202`
- `401`
- `404`
- `409`
- `503`

Failures return `{ "error": { "code", "message" } }`; every code is listed at https://docs.fxapis.com/errors.

#### 202 response fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object | no |  |
| `data.accountId` | string (uuid) | no |  |
| `data.runtimeId` | string (uuid) | no |  |
| `data.alreadyRunning` | boolean | no | True when the account was already online or connecting; asking again is harmless. |
| `data.state` | "created" \| "provisioning" \| "standby" \| "starting" \| "connecting" \| "synchronizing" \| "ready" \| "executing" \| "cooling" \| "offline" \| "degraded" \| "reconnecting" \| "invalid_credentials" \| "trading_disabled" \| "needs_2fa" \| "needs_certificate" \| "error" | no |  |
| `data.pollUrl` | string | no | Poll here until `state` is `ready`. |