Open MCP Portaldocs
ReferenceAPI keys

Create a personal API key (browser session only); the secret is shown once

POST/v1/me/api-keys

409 too_many_keys (at most 20 active keys per person). 400 too_many_gateways (more than 50 gatewayIds). 422 gateway_not_usable (details.gatewayIds) when a gateway in gatewayIds doesn't exist, is switched off or the caller can't use it now. An API key can't create keys.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/me/api-keys" \  -H "Content-Type: application/json" \  -d '{    "name": "Claude Code on my laptop"  }'
{  "data": {    "key": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "prefix": "string",      "status": "active",      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z",      "lastUsedAt": "2019-08-24T14:15:22Z",      "revokedAt": "2019-08-24T14:15:22Z",      "gateways": [        {          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",          "slug": "string",          "name": "string",          "exists": true        }      ]    },    "secret": "string"  }}