DELETE
/
api-keys
/
{api_key_id}
curl -X DELETE 'https://api.memsync.ai/api-keys/key_123abc' \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN'
{
  "success": true,
  "api_key_id": "key_123abc",
  "deleted_at": "2024-01-15T16:45:00Z"
}
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.memsync.ai/api-keys/key_123abc' \
  -H 'Authorization: Bearer YOUR_JWT_TOKEN'

Path Parameters

api_key_id
string
required
The unique identifier of the API key to delete

Response

success
boolean
Indicates if the deletion was successful
api_key_id
string
ID of the deleted API key
deleted_at
string
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

404
object
API key not found
{
  "error": "API key not found",
  "code": "API_KEY_NOT_FOUND"
}
403
object
Cannot delete API key
{
  "error": "Cannot delete the currently used API key",
  "code": "CANNOT_DELETE_ACTIVE_KEY"
}