Pages in Guides

Authentication

All API requests require a valid API key passed as a Bearer token in the Authorization header. API keys are created and managed through the Ampost dashboard. Dashboard-only routes such as /api/keys, connected apps and billing do not accept Bearer API keys. Connecting, reconnecting and disconnecting accounts work with a Bearer key through the account endpoints below; social consent still happens in the user's browser.

Key format

API keys use the prefix amp_live_ followed by a base64url-encoded random secret. The raw key is shown only once at creation time.

Scopes

Each key has scopes, and each endpoint and MCP tool needs one of them (shown on the endpoint). A request with a key that lacks the scope gets 403 INSUFFICIENT_SCOPE with details.requiredScope, and MCP tools/list shows only the tools the key may call. When you create a key, choose Full access (every scope), Read only (posts:read, accounts:read, analytics:read) or your own scopes.

ScopeAllows
posts:readList and read posts and posting queues, and read platform rules
posts:writeCreate, change, publish, retry, delete and import posts; edit posting queues
posts:proposeDrafts only (approval mode): create and change drafts and submit them for approval. Never publishes, schedules, retries, unpublishes or edits a published post; an approver decides. `posts:write` includes it
accounts:readList and read accounts, platform sets and connection requests
accounts:writeConnect and disconnect accounts; create, rename and delete platform sets
media:writeUpload media for posts and check an upload's status. There is no read scope: only the key that uploads needs the status
analytics:readRead post metrics, account overviews and follower history
webhooks:writeList, read, create, change, test and delete webhooks, read their delivery logs, and redeliver events. Reading needs it too: webhooks and their logs show receiver URLs and full post payloads

Platform-set restriction

A key can be limited to some platform sets. It then sees only those sets, their accounts, and posts with an account in them (showing only those accounts' results); an id from another set answers 404. Creating a post, connecting an account or changing a set outside the restriction, including the default set when no set is named, answers 403 PLATFORM_SET_NOT_ALLOWED. A restricted key cannot create platform sets.

Workspaces

A key or MCP connection belongs to one workspace, your own or a team's, and reaches only its posts, accounts and platform sets. In a team workspace it can do at most what your role there allows. GET /api/workspaces/current (MCP workspace_get, any key) returns the workspace, your role, what the key may do there and the members. Each post's createdBy is the user id of the member who created it.

Endpoints