Revoke an API key

The key is refused everywhere within 60 seconds.

DELETE/v1/keys/{key_id}

The key is refused everywhere within 60 seconds. A repeat is a no-op.

A key with the keys:write scope.

Request

curl -X DELETE "https://api.pod.mapier.ai/v1/keys/key_3ahrz6dmv29gqy5ckt18fp" \
  -H "Authorization: Bearer $POD_API_KEY"

Parameters

NameInTypeRequiredWhat it is
key_idpathstringYes
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Answer

200. The key, with revoked_at set.

200
{
  "id": "key_3ahrz6dmv29gqy5ckt18fp",
  "name": "example",
  "project": "prj_3ahrz6dmv29gqy5ckt18fp",
  "mode": "test",
  "class": "person",
  "scopes": ["sandboxes:read"],
  "last_four": "example",
  "created_by": "example",
  "created_at": "2026-11-23T12:00:00.000Z",
  "expires_at": null,
  "revoked_at": null,
  "service": null,
  "billing_mark": null,
  "parent_sandbox": null,
  "parent_scopes": null,
  "last_used_at": null,
  "rotated_at": null,
  "previous_secret_until": null
}
FieldTypeAlwaysWhat it is
idstringYes
namestringYes
projectstringYes
mode"test" | "live"Yes
class"person" | "service_grant" | "sandbox"Yesperson: made by a person. service_grant: a connected service's. sandbox: made for one sandbox, to use from inside it.
scopes"sandboxes:read" | "sandboxes:write" | "sandboxes:exec" | "files:read" | "files:write" | "snapshots:write" | "usage:read" | "keys:write" | "projects:write" | "members:read" | "end_users:read" | "end_users:write" | "screen:read" | "screen:write" | "webhooks:read" | "webhooks:write" | "permissions:read" | "permissions:write" | "permissions:records" | "ci:read" | "ci:write" | "network:read" | "network:write"[]Yes
last_fourstringYes
created_bystringYesThe identity account that made the key.
created_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
expires_atstring | nullYes
revoked_atstring | nullYes
servicestring | nullYesFor a service grant, the service, such as pod-ci.
billing_markstring | nullYes
parent_sandboxstring | nullYesFor a sandbox key, its sandbox; it is accepted only from there.
parent_scopes"sandboxes:read" | "sandboxes:write" | "sandboxes:exec" | "files:read" | "files:write" | "snapshots:write" | "usage:read" | "keys:write" | "projects:write" | "members:read" | "end_users:read" | "end_users:write" | "screen:read" | "screen:write" | "webhooks:read" | "webhooks:write" | "permissions:read" | "permissions:write" | "permissions:records" | "ci:read" | "ci:write" | "network:read" | "network:write"[] | nullYesFor a sandbox key, the scopes its maker held when it was made; it holds no more.
last_used_atstring | nullYesWhen the key was last used, to the minute; null if never. Calls the gateway answered reach it in batches, so it can trail by a few minutes.
rotated_atstring | nullYesWhen the key last got a new secret (rotateKey); null if never.
previous_secret_untilstring | nullYesAfter a rotation, when the old secret stops working; null when it already has.

Errors

The refusals this call is known for: not_found. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptpod.keys.revoke(id)
Pythonpod.keys.revoke(id)
mpodmpod sandboxes keys revoke <key>