Skip to content
First requestVisit website ↗
Navigation

Create an MCP staff key (value shown once)

Platform admins may create a workspace-scoped key (no wildcard; grant workspaces afterwards). Global access ("every workspace") is expressed ONLY through wildcardRole; it and any write grant require a saas_admin_users role 'owner' (403 OWNER_ROLE_REQUIRED). default_role is always stored as 'none'; a legacy defaultRole of 'read'/'write' is applied as wildcardRole (the stronger wins). Every key expires: expiresAt defaults to now + 90 days and may be at most 365 days away. The admin log records only server-built values; any client reason/newValues/oldValues is kept as operator_note.

POST
https://api.channelautomation.com/api/admin/mcp-permissions/keys

Authorization

  • BearerAuth
    HTTP Bearer (JWT)
    required

Request body JSON required

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

    Access to every workspace (owner only)

  • defaultRole
    deprecated
    none
    or
    read
    or
    write

    Legacy; read/write is applied as wildcardRole

    default: "none"
  • expiresAt
    optional
    string

    Default now + 90 days; max now + 365 days

    format: date-time

Returns

200

{ success, data: { apiKey (plaintext, shown once), key: { ..., expires_at } } }

400

Invalid label, role, staff member or expiry

403

Not a platform admin, or OWNER_ROLE_REQUIRED for a global or write grant

500

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

503

MCP_KEY_EXPIRY_NOT_SET_UP (migration 20261005a not applied)

Type to search…

↑↓ navigate↵ selectEsc close