APIAuth
Rotate an API key
Replace an API key's secret, keeping its name, permissions, and expiry.
POST
Replace an API key's secret, keeping its name, permissions, and expiry.
ApiKeyAuthheader
AuthorizationBearer <token>Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.
Required permission
manage_api_keyskey_id*stringFormat
uuidThe request has succeeded.
application/json- response
A key together with its secret. The secret is shown only once.
key*A credential for calling this API from your own application. The key carries its own permissions and can never do more than the person who created it.
token*stringThe full API key. Copy it now; it cannot be retrieved later.
curl -X POST "https://example.com/api-keys/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate"{ "key": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "permissions": [ "view_agents" ], "last_four": "string", "expires_at": "2019-08-24T14:15:22Z", "last_used_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" }, "token": "string"}