Moonborn — API · api-keys
Revoke an API key (immediate, no grace period)
DELETE/v1/api-keys/{id}scope · Bearer (API key or session JWT)
Path parameters
| Field | Type | Description |
|---|---|---|
| idreq | string | API key id (UUID). |
Responses
200Revocation confirmed.
Body
| Field | Type | Description |
|---|---|---|
| idreq | string | |
| revokedAtreq | string |
401Unauthenticated.
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string | |
| error.details | object |
403Forbidden.
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string | |
| error.details | object |
404Key not found.
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string | |
| error.details | object |
409Key already revoked or in terminal state.
Body
| Field | Type | Description |
|---|---|---|
| errorreq | object | |
| error.codereq | string | |
| error.messagereq | string | |
| error.details | object |
Examples
cURL
curl -X DELETE https://api.moonborn.co/v1/api-keys/<id> \ -H "Authorization: Bearer $MOONBORN_API_KEY"
TypeScript
import Moonborn from '@moonborn/sdk';
const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });
const result = await client.api_keys.revokeApiKey({
id: '<id>',
});Python
import os
from moonborn import Moonborn
client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])
result = client.api_keys.revoke_api_key(
id="<id>",
)