Skip to content
Screaming Data
Documentation menu

Appendix API

Revoke an API key

Revoke a key immediately. Requests made with it fail with 40101.

DELETE
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

Free.

Request

DELETE /v1/appendix/keys/{key_id}.

Path parameters

key_id
integerrequired

Key id from user_data keys[].id.

  • Range≥ 1
  • Example21

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"

Response

HTTP 200. The body is the standard response envelope; check status_code at the top level and in every task.

Response example
{
  "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.

id
integer

Key id.

prefix
string

First 12 characters of the key.

last4
string

Last 4 characters of the key.

label
string· nullable

Your label.

created_at
string (date-time)

Creation time, ISO 8601 in UTC.

last_used_at
string (date-time)· nullable

Last successful authentication with the key.

revoked_at
string (date-time)

Revocation time, ISO 8601 in UTC.

Status codes

Codes this endpoint can return, at the request or task level. See Status codes for handling advice.

CodeMessageHTTPLevelWhen
20000Ok.200Request / taskThe request, or the individual task, was processed successfully.
40000Bad Request.400 / 200Request / taskThe 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.
40100Authentication failed.401RequestThe Authorization header is missing or malformed, or the login and API key do not match.
40101API key revoked.401RequestThe API key was revoked. Use another active key or create a new one.
40102Account disabled.401RequestThe account is disabled. Contact support.
40202Rate limit exceeded.429RequestToo 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.
40400Not Found.404 / 200Request / taskUnknown endpoint, or an unknown task, key or subscription id.
40501Invalid field: `<name>`.400 / 200Request / taskA field has a wrong type, format or value; the message names the field, for example "Invalid field: `priority`."
50000Internal error.500RequestUnexpected server error. The request can be retried; contact support if it persists.