Disconnect an account
DELETE
/api/accounts/:accountIdDisconnect 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. providerRevokedsays whether the platform confirmed the revoke; when false,providerAccessSettingssays 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
AuthorizationstringrequiredBearer <API key>. Create a key in the dashboard under API keys.
Path parameters
accountIdstringrequiredAccount id (UUID):
idfrom accounts_list
Errors return { error: { code, message } }; every code is in Error codes.