API Keys

Revoke an API key

Revokes an API key. The key stops authenticating immediately, stays listed as REVOKED for audit, and its label can be reused — so a revoked key is no longer addressable by label (404). This is the only revoke operation; there is no hard delete.

post/v1/api-keys/{label}/revoke

Path parameters

labelstring required

Label of the API key to revoke.

Example:ci-runner

Label of the API key to revoke.

Response

API key revoked

labelstring required

Human-readable label. Unique per workspace.

keyPrefixstring required

Display prefix of the key (e.g. "monid_test_a1b2c3d4...").

ownerstring required

User id the key belongs to (bills to, listed under). Always a user; a child key inherits its parent's owner.

createdBystring required

Who minted the key — USER#<id> (dashboard), API_KEY#<fingerprint> (another key), AEP#<did> (AEP grant) — an actor id: USER#<userId> (dashboard), API_KEY#<fingerprint> (another key), AEP#<did> (an enrolled agent), CLERK, SYSTEM.

scopesstring[] required

Scope grants: {resource}:{action} over runs, resources, wallet, topups, controls and api_keys with read/create/update/delete, plus {resource}:* and *. Catalog reads need no scope. Fixed at creation.

status'ACTIVE' | 'EXPIRED' | 'REVOKED' required

ACTIVE, EXPIRED (derived from expiresAt) or REVOKED. Only ACTIVE keys authenticate.

origin'DASHBOARD' | 'API' | 'AEP' | 'SYSTEM' required

Channel the key was minted through — derived from createdBy: DASHBOARD, API, AEP or SYSTEM.

expiresAtstring date-time

Expiry (ISO 8601). Absent ⇒ never expires.

revokedAtstring date-time

When the key was revoked. Present only when REVOKED.

revokedBystring

Who revoked the key (present only when REVOKED) — an actor id: USER#<userId> (dashboard), API_KEY#<fingerprint> (another key), AEP#<did> (an enrolled agent), CLERK, SYSTEM.

createdAtstring date-time required

Creation time (ISO 8601).

lastUsedAtstring date-time

Last time the key authenticated a request. Absent if never used.

Example response

{
  "label": "ci-runner",
  "keyPrefix": "monid_test_a1b2c3d4",
  "createdBy": "USER#user_2abc",
  "scopes": [
    "runs:create",
    "runs:read",
    "wallet:read"
  ],
  "revokedBy": "USER#user_2abc"
}

Changes