Create a scoped API key
Create a new posterly API key for the authenticated user after explicit confirmation. The calling token must be a dashboard-created API key with accounts:write. OAuth-issued tokens, managed assistant tokens, and session-authenticated requests cannot mint API keys. Requested scopes cannot exceed the scopes on the calling key. A teammate whose API access comes from a workspace owner gets a key bound to that workspace (pass workspace_id when there are several; otherwise 400 workspace_id_required). Those keys count against the owner plan, per teammate per workspace, and the owner is emailed. The full key is returned once in the key field.
Request
- Base URL: https://www.poster.ly
- URL: https://www.poster.ly/api/v1/api-keys
- Auth: HTTP bearer
Request body
Example request
{
"name": "Poke agent key",
"scopes": [
"accounts:read",
"posts:read",
"posts:write"
],
"expires_in_days": 90,
"confirm": true
}Response
API key created successfully. Store the returned key securely; it will not be shown again.
Example response
{
"key": "pst_live_abcd1234...",
"api_key": {
"id": "6e1a2b76-9f41-4d6d-a4c8-13d70f89bb31",
"name": "Poke agent key",
"key_prefix": "pst_live_abcd",
"scopes": [
"accounts:read",
"posts:read",
"posts:write"
],
"workspace_id": null,
"expires_at": null,
"created_at": "2026-06-06T12:00:00.000Z"
},
"warning": "This is the only time the full API key is returned. Store it securely and never paste it into public chats or client-side code.",
"limits": {
"tier": "starter",
"max_user_keys": 1,
"active_user_keys": 1,
"remaining_user_keys": 0,
"uses_grandfathered_keys": false
}
}Changes
No recorded changes to this operation across all 1 revision of this API.