Skip to content

DELETE /v1/keys/{id}

Call DELETE /v1/keys/{id}
Price free
Scope keys:manage
Operation id revokeKey

Revoke a key immediately; calls with it fail within a second. Use it when a key may have leaked (then create or rotate a replacement). Cannot be undone. Audited. Free. Scope: keys:manage.

Copy it as curl. Set VERDICT_API_KEY first; uuidgen makes a fresh Idempotency-Key.

Request
curl -X DELETE 'https://api.askverdict.io/v1/keys/key_01JC3Z4Y8R9K2M5N7P1Q3S5T7V' \
-H "Authorization: Bearer $VERDICT_API_KEY"

200: The key, now revoked.

200 response
{
"id": "key_01JC3Z4Y8R9K2M5N7P1Q3S5T7V",
"project_id": "prj_01JC3Z4Y8R9K2M5N7P1Q3S5T7V",
"name": "outbound-agent prod",
"environment": "live",
"prefix": "vd_live_Ab12Cd",
"scopes": [
"decisions:write",
"index:read",
"outcomes:write"
],
"status": "revoked",
"rate_limit_per_minute": 600,
"daily_spend_cap_usd": 25,
"ip_allowlist": [],
"expires_at": null,
"last_used_at": "2026-11-07T14:03:00Z",
"created_at": "2026-11-01T09:00:00Z"
}
Name In Type Required Description
id path string yes The key id.
x-verdict-version header string no API version to use, a date. Defaults to the version current when the key was created. The current version is 2026-11-01.

Schema ApiKey.

Field Type Required Description
id string yes The key id.
project_id string yes Project the key belongs to.
name string yes Name.
environment enum: “live”, “test” yes live or test.
prefix string yes The key’s first characters, to recognize it.
scopes array of enum: “decisions:write”, “index:read”, “outcomes:write”, “watches:manage”, “vendors:call”, “account:read”, “account:manage”, “keys:manage” yes Scopes granted.
status enum: “active”, “rotating”, “revoked”, “expired” yes Lifecycle status.
rate_limit_per_minute integer yes Requests per minute allowed.
daily_spend_cap_usd number or null yes Daily spend cap, or null for none. US dollars, up to 6 decimals.
ip_allowlist array of string yes CIDR blocks the key may be used from; empty means anywhere.
expires_at string or null (date-time) yes Expiry, or null for none.
last_used_at string or null (date-time) yes Last successful use, or null.
created_at string (date-time) yes When the key was created.

Errors are RFC 9457 problem details and are never billed. Branch on type. See Errors.

Status Meaning
400 Invalid request: malformed JSON, an unknown field, a failed constraint or a size limit (invalid_request).
401 Missing, malformed, revoked or expired API key, or a bad webhook signature (unauthorized).
403 The key lacks the scope this operation needs (forbidden_scope).
404 The resource does not exist in this organization (not_found).
429 Rate limited (rate_limited). Wait Retry-After seconds.
500 Unexpected server error (internal). Not billed; retry with the same Idempotency-Key.

Open the interactive reference to send this request from the browser. The full document is at /openapi.json.