Revoke one of the current user's API keys. Revocation is immediate. A user can only revoke their own keys. Interactive-session only — cannot be called with an API key.
DELETE
/me/api-keys/{id}
curl \
--request DELETE 'https://api.your-domain.com/api/me/api-keys/f47ac10b-58cc-4372-a567-0e02b2c3d479' \
--header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
"code": 200,
"message": "api key revoked successfully",
"data": {}
}
Response examples (401)
{
"code": 401,
"message": "invalid token",
"data": {}
}
Response examples (403)
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}
Response examples (404)
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
Response examples (500)
{
"code": 500,
"message": "internal server error",
"data": {}
}