Appendix API
Revoke an API key
Revoke a key immediately. Requests made with it fail with 40101.
https://api.screamingdata.dev/v1/appendix/keys/{key_id}- Authentication
- API key (HTTP Basic)
- Cost
- Free
- Body
- No request body
Overview
Revokes an API key. From that moment, requests authenticated with it fail with 40101. Revocation cannot be undone — create a new key if you need one.
You cannot revoke the key used for this request if it is your last active key (the request fails with 40000), so you never lock yourself out. Revoking a key that is already revoked returns it unchanged. A key_id that is not one of your keys returns 40400 with HTTP 404.
Cost
Request
DELETE /v1/appendix/keys/{key_id}.
Path parameters
key_idKey id from user_data keys[].id.
- Range≥ 1
- Example
21
Request example
The examples read your credentials from the API_LOGIN and API_KEY environment variables.
curl --request DELETE \
--url "https://api.screamingdata.dev/ v1/ appendix/ keys/ 21" \
--user "$API_LOGIN:$API_KEY"import os
import requests
response = requests.delete(
"https://api.screamingdata.dev/ v1/ appendix/ keys/ 21",
auth=(os.environ["API_LOGIN"], os.environ["API_KEY"]),
timeout=30,
)
data = response.json()
print(data["status_code"], data["status_message"], "cost:", data["cost"])
for task in data["tasks"]:
print(task["id"], task["status_code"], task["status_message"])const auth = Buffer.from(`${process.env.API_LOGIN}:${process.env.API_KEY}`).toString("base64");
const response = await fetch("https://api.screamingdata.dev/ v1/ appendix/ keys/ 21", {
method: "DELETE",
headers: {
Authorization: `Basic ${auth}`,
},
});
const data = await response.json();
console.log(data.status_code, data.status_message, "cost:", data.cost);
for (const task of data.tasks) {
console.log(task.id, task.status_code, task.status_message);
}Response
HTTP 200. The body is the standard response envelope; check status_code at the top level and in every task.
{
"version": "1.0.0",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0176 sec.",
"cost": 0,
"tasks_count": 1,
"tasks_error": 0,
"tasks": [
{
"id": "09241302-6b9d-4a3e-8c5f-1e7a4d0b2c98",
"status_code": 20000,
"status_message": "Ok.",
"time": "0.0052 sec.",
"cost": 0,
"result_count": 1,
"path": [
"v1",
"appendix",
"keys",
"21"
],
"data": {
"api": "appendix",
"function": "keys",
"key_id": 21
},
"result": [
{
"id": 21,
"prefix": "sd_live_b7Tn",
"last4": "Lw2c",
"label": "staging",
"created_at": "2026-09-10T16:02:11Z",
"last_used_at": null,
"revoked_at": "2026-09-24T13:02:44Z"
}
]
}
]
}Result fields
Each element of tasks[].result is a revoked api key. The key after revocation.
idKey id.
prefixFirst 12 characters of the key.
last4Last 4 characters of the key.
labelYour label.
created_atCreation time, ISO 8601 in UTC.
last_used_atLast successful authentication with the key.
revoked_atRevocation time, ISO 8601 in UTC.
Status codes
Codes this endpoint can return, at the request or task level. See Status codes for handling advice.
| Code | Message | HTTP | Level | When |
|---|---|---|---|---|
| 20000 | Ok. | 200 | Request / task | The request, or the individual task, was processed successfully. |
| 40000 | Bad Request. | 400 / 200 | Request / task | The body is not valid JSON or does not have the expected shape (for example, not an array of task objects, or more than one task for live). Also returned with HTTP 413 for bodies larger than 1 MiB and with HTTP 405 for a wrong HTTP method. As a task-level code (HTTP 200) it means the task cannot be carried out as asked, for example because the account already has the maximum number of API keys or monitored products. |
| 40100 | Authentication failed. | 401 | Request | The Authorization header is missing or malformed, or the login and API key do not match. |
| 40101 | API key revoked. | 401 | Request | The API key was revoked. Use another active key or create a new one. |
| 40102 | Account disabled. | 401 | Request | The account is disabled. Contact support. |
| 40202 | Rate limit exceeded. | 429 | Request | Too many requests or tasks per minute for this account, or too many access requests from one IP address. The Retry-After header says how many seconds to wait. |
| 40400 | Not Found. | 404 / 200 | Request / task | Unknown endpoint, or an unknown task, key or subscription id. |
| 40501 | Invalid field: `<name>`. | 400 / 200 | Request / task | A field has a wrong type, format or value; the message names the field, for example "Invalid field: `priority`." |
| 50000 | Internal error. | 500 | Request | Unexpected server error. The request can be retried; contact support if it persists. |