Keys
Create an API key
Mints a key and returns its raw token EXACTLY ONCE. The requested scopes must be a subset of the authenticating key's scopes (else 403 scope_escalation), and a single-site key may only create keys locked to its own site (else 403 key_not_scoped). expires_in_days defaults to 90 and is capped at 365 — unlike the dashboard, the API cannot mint a key that never expires. Max 10 active keys per account.
post/keys
Request
- Base URLhttps://statable.com/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
The created key, including the one-time raw token.
Example response
{
"prefix": "stbl_A1b2C3d4",
"scopes": "read",
"token": "stbl_Z9y8X7w6…"
}Changes
No recorded changes to this operation across all 1 revision of this API.