Update an API key

Update an API key's capabilities, agent allowlist, or description. Only the fields you send are changed; the secret token is never rotated and the key id is stable. Requires a key with the manage-API-keys capability.

patch/v1/api-keys/{id}

Request

  • Base URL
    https://api.runbear.io
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

The API key id to update

Request body

descriptionstring nullable

Human-readable label for the key. Send null to clear it; omit to leave it unchanged.

canChatboolean

Allow the key to run threads, chat, and upload files

canManageAgentsboolean

Allow the key to create/update/delete agents and org config

canManageApiKeysboolean

Allow the key to manage the organization's API keys. The highest-privilege capability — grant only to trusted internal keys.

allowedAgentIdsstring[]

Replaces the key's agent (App) allowlist. Send an empty array to allow all agents; omit to leave the allowlist unchanged.

Response

Default Response

idstring uuid required

Unique identifier of the API key

descriptionstring nullable required

Human-readable label for the key

canChatboolean required

Whether the key may run threads, chat, and upload files

canManageAgentsboolean required

Whether the key may create/update/delete agents and org configuration

canManageApiKeysboolean required

Whether the key may create/list/revoke the organization's API keys

allowedAgentIdsstring[] required

Agent (App) ids the key is restricted to. Empty = all agents.

createdAtstring required

ISO 8601 creation timestamp

lastUsedAtstring nullable required

ISO 8601 timestamp the key was last used, if ever

Changes

No recorded changes to this operation across all 1 revision of this API.