Create a scoped API key
POST/:workspaceUuid/api-keys
Creates a least-privilege API key for the calling user, bound to this workspace. Pick the
abilities it gets and, optionally, the accounts it may act on. The plain key is in
data.token of this response only; store it safely.
| Ability | Allows |
|---|---|
read | Every GET, plus the posts/validate dry run |
write | Creating and changing drafts, media, tags, mentions, the brand voice |
publish | Scheduling, queueing, publishing now, approving and retrying posts, and editing a post that is already scheduled |
ai | The /ai/* endpoints, running agents and turning on agent AI review (they also need AI credits) |
webhooks | Webhook subscription endpoints |
A scoped key is refused on other workspaces, on the admin panel, on API key management
and on the app's built-in MCP endpoint (use /mcp/postboost). With account_ids, it may
only name those accounts (in the URL, accounts, account_ids or post versions), cannot
touch posts on other accounts, and GET accounts / GET posts only list matching items
(pagination counts are computed before that filter). Workspace admins only, called with
an unscoped key.
Request
Responses
- 201
- 401
- 403
- 422
The new key, with its plain token shown once
Missing or invalid API token.
Not allowed. Either the caller is not a workspace admin (or not a member), or a scoped API key
lacks the ability or workspace for this call (code: insufficient_scope).
Validation failed.