curl -X POST https://api.sabaothcloud.com/api/v1/api-keys/KEY_ID/revoke \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
(no content)
{
"error": "NotFound",
"message": "API key not found"
}
API Keys
Revoke an API Key
Stop an API key from working, and keep a record of it
POST
/
api
/
v1
/
api-keys
/
{id}
/
revoke
curl -X POST https://api.sabaothcloud.com/api/v1/api-keys/KEY_ID/revoke \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
(no content)
{
"error": "NotFound",
"message": "API key not found"
}
Revokes a key. It stops working immediately, but stays in the list with
is_active: false so you keep a record of it. Revoking can’t be undone.
Revoke a key as soon as it may have leaked, or when the tool that used it is retired.
Path parameters
string
required
The key’s ID.
Response
204 No Content
curl -X POST https://api.sabaothcloud.com/api/v1/api-keys/KEY_ID/revoke \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
(no content)
{
"error": "NotFound",
"message": "API key not found"
}
Replacing a key
- Create a new key with the same scopes.
- Update the tools that use the old key.
- Revoke the old key.