Pages in API reference

Accounts

Get a connection request

GET/api/accounts/connect/:connectRequestId

Read the status of an account connection request: pending, awaiting_selection, connected, failed or expired.

  • Poll every 2-5 seconds.
  • When connected, accountId is the account's id (a reconnected account keeps its id).
  • When failed or expired, error.message says why and what the user should do next; relay it as is.
  • ACCOUNT_MISMATCH means the user signed in to another account than accountId or the expected one; nothing was changed.
  • SOCIAL_ACCOUNT_IN_USE means a Free workspace tried to connect a social account another Ampost workspace has (or had in the last 30 days); a paid plan can connect it.
  • SUPERSEDED means a newer request for this platform replaced this one: poll the newer request instead.
  • USER_CANCELLED means the user cancelled or declined consent.
Key scope
accounts:read
MCP tool
accounts_connect_status

Headers

  • Authorizationstringrequired

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

Path parameters

  • connectRequestIdstringrequired

    Connection request id (UUID): id from accounts_connect

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