# Disconnect an account

Source: https://ampost.io/docs/api/accounts-disconnect · Full reference: https://ampost.io/llms-full.txt

`DELETE /api/accounts/{accountId}` · MCP tool `accounts_disconnect` · scope `accounts:write` · rate limit `connectPlatform` · success `200`

Disconnect a social account: Ampost revokes its access at the platform where the platform allows it, deletes the stored tokens and sets `status: revoked`. Scheduled posts for the account will fail. The account keeps its id and can be reconnected later with accounts_connect and `accountId`. `providerRevoked` says whether the platform confirmed the revoke; when false, `providerAccessSettings` says where the user removes Ampost in the platform's settings. Instagram and Threads have no revoke endpoint, so they always return `providerRevoked: false`. Calling it again on a disconnected account returns the account unchanged with `providerRevoked: false`.

| Field | In | Type | Required | Description |
|---|---|---|---|---|
| `accountId` | path | string | yes | Account id (UUID): `id` from accounts_list |

Example response:

```json
{
  "id": "c41d8e2f-6a3b-4f9c-b1e5-7d2a9c4e6f80",
  "platform": "instagram",
  "platformSetId": "0b6e4d2a-9c3f-4e1b-8a7d-5f2c1e9b3d40",
  "platformAccountId": "17841400000000000",
  "username": "ampost.io",
  "avatarUrl": null,
  "status": "revoked",
  "scopes": [],
  "tokenExpiresAt": null,
  "tokenHealth": "inactive",
  "health": {
    "canPost": false,
    "needsReconnect": true,
    "issues": [
      {
        "code": "ACCOUNT_REVOKED",
        "severity": "error",
        "message": "The account is disconnected. Reconnect it with accounts_connect and its accountId."
      }
    ]
  },
  "platformMetadata": {
    "displayName": "Ampost",
    "accountType": "BUSINESS"
  },
  "analytics": {
    "available": true,
    "optInRequired": false,
    "enabled": true
  },
  "createdAt": "2026-10-06T09:00:00.000Z",
  "updatedAt": "2026-10-06T12:20:00.000Z",
  "lastUsedAt": "2026-10-06T09:00:04.000Z",
  "providerRevoked": false,
  "providerAccessSettings": "Instagram: Settings > Website permissions > Apps and websites"
}
```
