# Disconnect and erase the credential

URL: https://docs.fxapis.com/api-reference/lifecycle/disconnect-and-erase-the-credential

> Disconnect and erase the credential. Takes the account offline and deletes the stored password.

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

Takes the account offline and **deletes the stored password**. The account record stays, with its history, in `offline`. Reconnecting means sending the password again.

This is the endpoint to call when a customer leaves. A disconnected account that still holds a usable password is a credential nobody is watching.

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

#### Parameters

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

#### Responses

- `200`
- `401`
- `404`
- `409`

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

#### 200 response fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object | no |  |
| `data.accountId` | string (uuid) | no |  |
| `data.state` | string | no |  |
| `data.credentialsRemoved` | boolean | no |  |