Skip to main content

Revoke Key

Permanently revoke an API key. Any requests using this key will immediately fail with 401 Unauthorized. This action cannot be undone.

DELETE /api/v1/api-keys/:keyId

Authentication

JWT Bearer Token required via Authorization header.

Path Parameters

ParameterTypeDescription
keyIdstringThe key ID (e.g., key_abc123)

Response

204 No Content

Returned on successful revocation. No response body.

404 Not Found

{
"error": {
"code": "NOT_FOUND",
"message": "API key not found",
"status": 404
}
}

Code Examples

cURL

curl -X DELETE https://api.audiospliter.com/api/v1/api-keys/key_abc123 \
-H "Authorization: Bearer your_jwt_token"

Node.js

const response = await fetch(
'https://api.audiospliter.com/api/v1/api-keys/key_abc123',
{
method: 'DELETE',
headers: { 'Authorization': `Bearer ${jwtToken}` },
}
);
if (response.status === 204) {
console.log('Key revoked successfully');
}

Python

import requests

response = requests.delete(
'https://api.audiospliter.com/api/v1/api-keys/key_abc123',
headers={'Authorization': f'Bearer {jwt_token}'},
)
if response.status_code == 204:
print('Key revoked successfully')