Recover access with the recovery key
Recover access with the recovery key (lost API key)
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.
The recovery key is single-use. In one transaction this sets a session cookie, creates a new admin API key (not counted against the plan's key limit), replaces the recovery key with a new one (the old one stops working) and signs out every other session of the workspace. On a plan with a key limit (Starter, Plus) the new admin key replaces the old admin keys, which are revoked; otherwise existing API keys keep working. The new API key and recovery key are returned only in this response. Rate-limited per client IP (429). Cloud only: the Community Edition (local mode) has no recovery key and no API keys (409); it signs in with its access token.
application/json- body
recovery_key*stringSession cookie set; the new admin key and the next recovery key, shown once
application/json- response
csrf_token*stringapi_key*recovery_key*stringReplaces the recovery key that was just used
curl -X POST 'https://staqly.example.com/v1/sessions/recover' \ -H 'Content-Type: application/json' \ -d '{ "recovery_key": "string"}'{ "csrf_token": "string", "api_key": { "id": "string", "name": "string", "prefix": "string", "scopes": [ "collections:read" ], "created_at": "string", "last_used_at": "string", "expires_at": "string", "revoked_at": "string", "key": "string" }, "recovery_key": "string"}