curl --request POST \
--url https://api.getsly.ai/v1/v1/api-keys/{id}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"strategy": "immediate",
"overlap_seconds": 300
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"prefix": "<string>",
"environment": "test",
"scopes": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"key": "<string>",
"warning": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
}Issues a new key with the same scopes and name, then invalidates the old one. Returns the new plaintext key once.
curl --request POST \
--url https://api.getsly.ai/v1/v1/api-keys/{id}/rotate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"strategy": "immediate",
"overlap_seconds": 300
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"prefix": "<string>",
"environment": "test",
"scopes": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"key": "<string>",
"warning": "<string>",
"last_used_at": "2023-11-07T05:31:56Z",
"revoked_at": "2023-11-07T05:31:56Z"
}
}API key (pk_test_* or pk_live_), JWT session, agent token (agent_), Ed25519 session (sess_), or portal token (portal_).
Rotated
Show child attributes