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.
Input Schema
TableJSON 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. Omit for no expiry. |