create_api_key
Create a new posterly API key for the authenticated user. SECRET-CREATING WRITE: only use after explicit user confirmation. The new key can only request scopes already present on the calling dashboard-created API key; OAuth and managed assistant tokens cannot mint keys. Team management (members:read, members:write) and client portal sign-in link permissions are never copied or granted here: a person turns them on in /dashboard/api. Optional workspace_client_id limits the new key to one brand in the workspace. Omit it for a workspace-wide key. A key that is already limited to one brand cannot create keys.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"confirm": "<confirm>"
},
"name": "create_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Human-readable key name. | |
| scopes | No | Scopes for the new key. Omit to copy the calling key scopes. Cannot exceed the calling key scopes. billing:read and billing:write allow managing the posterly subscription (cancel/pause/resume/downgrade). | |
| confirm | Yes | Must be true after the user explicitly confirms that a new secret API key should be created. | |
| workspace_id | No | Optional workspace restriction. Workspace-scoped calling keys cannot create keys outside their workspace. | |
| expires_in_days | No | Optional expiry from now, up to 365 days. Never later than the calling key: omitted, the new key inherits the calling key's expiry (none if the calling key does not expire). | |
| workspace_client_id | No | Optional brand (workspace client id) in that workspace. Omit for a key that can see every brand. A key limited to one brand cannot create keys. |