API Keys

Update an API key

Updates an API key's metadata (currently only the label).

patch/v1/api-keys/{label}

Path parameters

labelstring required

Current label of the API key.

Example:ci-runner

Current label of the API key.

Request body

labelstring

New label for the key.

Example request

{
  "label": "ci-runner-renamed"
}

Response

Updated API key metadata (never the full key)

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

Changed in 3 of the 22 revisions of this API.7012

  • 5abada71ceae657See the full diff
    • ●

      added the new IDENTITY_ALREADY_LINKED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_ALREADY_LINKED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_ALREADY_LINKED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_ALREADY_LINKED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_ALREADY_LINKED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_RATE_LIMITED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_RATE_LIMITED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_RATE_LIMITED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_RATE_LIMITED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_RATE_LIMITED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_REQUIRES_SESSION enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_REQUIRES_SESSION enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_REQUIRES_SESSION enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_REQUIRES_SESSION enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_REQUIRES_SESSION enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_STATE_INVALID enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_STATE_INVALID enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_STATE_INVALID enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_STATE_INVALID enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_LINK_STATE_INVALID enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_PROVIDER_UNAVAILABLE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_PROVIDER_UNAVAILABLE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_PROVIDER_UNAVAILABLE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_PROVIDER_UNAVAILABLE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_PROVIDER_UNAVAILABLE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_PROVIDER_UNKNOWN enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_PROVIDER_UNKNOWN enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_PROVIDER_UNKNOWN enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_PROVIDER_UNKNOWN enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_PROVIDER_UNKNOWN enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_REQUIRED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_REQUIRED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_REQUIRED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_REQUIRED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_REQUIRED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_USER_ALREADY_LINKED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_USER_ALREADY_LINKED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_USER_ALREADY_LINKED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_USER_ALREADY_LINKED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_USER_ALREADY_LINKED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_VERIFICATION_FAILED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_VERIFICATION_FAILED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_VERIFICATION_FAILED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_VERIFICATION_FAILED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new IDENTITY_VERIFICATION_FAILED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new INSUFFICIENT_SCOPE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new INSUFFICIENT_SCOPE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new INSUFFICIENT_SCOPE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new INSUFFICIENT_SCOPE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new INSUFFICIENT_SCOPE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new PROMO_IDENTITY_REDEEMED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new PROMO_IDENTITY_REDEEMED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new PROMO_IDENTITY_REDEEMED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new PROMO_IDENTITY_REDEEMED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new PROMO_IDENTITY_REDEEMED enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new PROMO_REDEEM_REQUIRES_SESSION enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new PROMO_REDEEM_REQUIRES_SESSION enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new PROMO_REDEEM_REQUIRES_SESSION enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new PROMO_REDEEM_REQUIRES_SESSION enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new PROMO_REDEEM_REQUIRES_SESSION enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new WALLET_INSUFFICIENT_FUNDS enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new WALLET_INSUFFICIENT_FUNDS enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new WALLET_INSUFFICIENT_FUNDS enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new WALLET_INSUFFICIENT_FUNDS enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new WALLET_INSUFFICIENT_FUNDS enum value to the response property for the response status

      response-property-enum-value-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the required property to the response with the status

      response-required-property-added

    • ○

      added the required property to the response with the status

      response-required-property-added

    • ○

      added the required property to the response with the status

      response-required-property-added

    • ○

      added the required property to the response with the status

      response-required-property-added

    • ●

      added the new X402_UNBOUNDED_PRICE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new X402_UNBOUNDED_PRICE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new X402_UNBOUNDED_PRICE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new X402_UNBOUNDED_PRICE enum value to the response property for the response status

      response-property-enum-value-added

    • ●

      added the new X402_UNBOUNDED_PRICE enum value to the response property for the response status

      response-property-enum-value-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added