staqlydocs
REST APIAPI referenceAuth

Make a new access token

Make a new access token (Community Edition)

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.

POST
/v1/access-token/rotate

The old token stops working at once; every browser session except the caller's is signed out. Recorded as an access_token.rotated event. 409 when STAQLY_LOCAL_TOKEN fixes the token; 404 in cloud mode.

Authorization

headerAuthorizationBearer <token>

API key (stk_...), or in the Community Edition the access token (stk_local_...)

Header Parameters

Idempotency-Key?string

Replays 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.

Lengthlength <= 200

Response Body

The new token

application/json
  1. response
token*string
sessions_revoked*integer
curl -X POST 'https://staqly.example.com/v1/access-token/rotate'
{  "token": "string",  "sessions_revoked": 0}