Pages in API reference

Accounts

Disconnect an account

DELETE/api/accounts/:accountId

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.
Key scope
accounts:write
MCP tool
accounts_disconnect

Headers

  • Authorizationstringrequired

    Bearer <API key>. Create a key in the dashboard under API keys.

Path parameters

  • accountIdstringrequired

    Account id (UUID): id from accounts_list

Errors return { error: { code, message } }; every code is in Error codes.