curl -X DELETE "https://api.danubeai.com/v1/api-keys/abc123" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
from danube import DanubeClient
client = DanubeClient(api_key="YOUR_API_KEY")
client.api_keys.revoke("abc123")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
await client.apiKeys.revoke('abc123');
{
"message": "API key revoked successfully"
}
API Keys
Revoke API Key
Revoke an API key, immediately preventing further use
DELETE
/
v1
/
api-keys
/
{key_id}
curl -X DELETE "https://api.danubeai.com/v1/api-keys/abc123" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
from danube import DanubeClient
client = DanubeClient(api_key="YOUR_API_KEY")
client.api_keys.revoke("abc123")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
await client.apiKeys.revoke('abc123');
{
"message": "API key revoked successfully"
}
Overview
Revokes an API key by soft-deleting it (settingis_active to false). The key is immediately invalidated and any subsequent requests using it will be rejected.
Auth: A dashboard session (Authorization: Bearer <jwt>) or an API key (danube-api-key). An agent can manage keys with its own key.
Path Parameters
string
required
The API key UUID to revoke
Response
string
Confirmation message
Example
curl -X DELETE "https://api.danubeai.com/v1/api-keys/abc123" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
from danube import DanubeClient
client = DanubeClient(api_key="YOUR_API_KEY")
client.api_keys.revoke("abc123")
import { DanubeClient } from 'danube';
const client = new DanubeClient({ apiKey: 'YOUR_API_KEY' });
await client.apiKeys.revoke('abc123');
{
"message": "API key revoked successfully"
}
