Create a scoped API key
Create a scoped API key (admin). The raw key is returned once.
Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.
AuthorizationBearer <token>API key (stk_...), or in the Community Edition the access token (stk_local_...)
Idempotency-Key?stringReplays the stored response when the same key is repeated with the same method, path,
query string and body within 24 hours (422 idempotency_mismatch with a different
request, 409 idempotency_in_progress while the first one runs). Not applied to
multipart uploads or to responses that carry a secret.
length <= 200application/json- body
name*stringscopes*array<>1 <= itemsexpires_at?stringRFC3339 or YYYY-MM-DD, in the future (422 otherwise); at most a year ahead (422 otherwise); omitted, the key expires in a year. Expired keys stop counting against the plan key limit
Created
application/json- response
id*stringname*stringprefix*stringscopes*array<>created_at*stringlast_used_at*string|nullexpires_at*string|nullrevoked_at*string|nullkey?stringRaw secret; only in create/rotate responses
curl -X POST 'https://staqly.example.com/v1/api-keys' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "scopes": [ "collections:read" ]}'{ "id": "string", "name": "string", "prefix": "string", "scopes": [ "collections:read" ], "created_at": "string", "last_used_at": "string", "expires_at": "string", "revoked_at": "string", "key": "string"}