Skip to content
First requestVisit website ↗
Navigation

Update an MCP staff key (only the fields sent)

Applies only the fields present in the body, and only those that differ from the stored key. Owner-only (saas_admin_users role 'owner'): setting a global grant (any wildcardRole — the only global grant), any write grant, re-activating an inactive key (isActive true), reassigning staffMemberId, and extending expiresAt on a global or expired key. Platform admins may rename, deactivate, remove global grants, and shorten expiry. A concurrent change answers 409. The admin log records server-built before/after values only.

PATCH
https://api.channelautomation.com/api/admin/mcp-permissions/keys/{keyId}

Authorization

  • BearerAuth
    HTTP Bearer (JWT)
    required

Path parameters

  • keyId
    string
    required
    format: uuid

Request body JSON required

  • label
    optional
    string
  • staffMemberId
    optional
    string
    or null
    format: uuid
  • wildcardRole
    optional
    read
    or
    write
    or null

    Access to every workspace (owner only to set)

  • defaultRole
    deprecated
    none
    or
    read
    or
    write

    Legacy; 'none' clears a pre-migration value, read/write is applied as wildcardRole

  • isActive
    optional
    boolean
  • expiresAt
    optional
    string

    Future, at most 365 days away

    format: date-time

Returns

200

{ success, data: key } — unchanged key with message 'No changes' when nothing differed

400

No fields, or an invalid value

403

OWNER_ROLE_REQUIRED

404

Key not found

409

The key changed while saving; reload and retry

500

Internal server error
JSON
  • error
    optional
    string
  • details
    optional
    string
  • success
    optional
    boolean

503

MCP_KEY_EXPIRY_NOT_SET_UP (expiresAt sent before migration 20261005a)

Type to search…

↑↓ navigate↵ selectEsc close