Permanently revokes and deletes an API key, making it unusable for future requests.
This action is irreversible. Once an API key is deleted, it cannot be recovered.
curl -X DELETE 'https://api.memchat.io/api-keys/key_123abc' \
-H 'Authorization: Bearer YOUR_JWT_TOKEN'
Path Parameters
The unique identifier of the API key to delete
Response
Indicates if the deletion was successful
ID of the deleted API key
ISO 8601 timestamp when the API key was deleted
{
"success": true,
"api_key_id": "key_123abc",
"deleted_at": "2024-01-15T16:45:00Z"
}
Error Responses
API key not found{
"error": "API key not found",
"code": "API_KEY_NOT_FOUND"
}
Cannot delete API key{
"error": "Cannot delete the currently used API key",
"code": "CANNOT_DELETE_ACTIVE_KEY"
}