Create an MCP key for my own AI agent (secret shown once)
POST/api/me/mcp-keys
Creates a personal MCP key for the acting member. mcp:read is always
granted; mcp:write and mcp:external only when asked for
(mcp:external lets the agent message customers, place calls and spend
money — the panel leaves it unticked by default). expiry_days is one of
30, 60, 90, 180, 365 (default 90); there is no key that never expires.
The response is the ONLY place the plaintext token ever appears. The key
acts as the member, with the member's permissions, and only on /mcp.
Audited as mcp_key.created.
Request
Responses
- 201
- 401
- 404
- 422
- 429
The key, with its plaintext token (shown once).
Not authenticated. code: account_disabled means the member's seat was deactivated in this workspace: the session is over even though the token was not revoked (clients sign out and clean up).
Resource not found (or not visible to the current tenant).
The request failed validation.
Rate limit exceeded.
Response Headers
Request quota for the current window.
Remaining requests in the current window.
Seconds to wait before retrying.