Skip to Content
SeyloDocs

Create an API key

POST
/api/v1/apiKeys.create

Creates an API key or MCP token for the signed-in person, limited to the given actions ("*" for all of yours), optionally to some projects, read-only or not, with an optional expiry. The token is returned once. Browser sessions only, signed in or confirmed with auth.reauth in the last 15 minutes (FORBIDDEN details.reason "reauth" otherwise).

Any signed-in caller. Not available to MCP clients or the assistant.

Authorization

cookieseylo_session<token>

Request Body

application/json
  1. body
kind*|
Default"api"
name*string
Length1 <= length <= 60
actions*array<>
Items1 <= items <= 200
projectIds?array<>
Items1 <= items <= 100
readOnly?boolean
expiresInDays?integer

Leave out for a key that never expires.

Range1 <= value <= 3650

Response Body

Success.

application/json
  1. response
key*
token*string
Example Request
curl -X POST 'https://example.com/api/v1/apiKeys.create' \  -H 'Content-Type: application/json' \  -d '{  "kind": "api",  "name": "string",  "actions": [    "string"  ]}'
Example Response
{  "key": {    "id": "string",    "kind": "api",    "name": "string",    "prefix": "string",    "actions": [      "string"    ],    "projectIds": [      "string"    ],    "readOnly": true,    "mcpClient": "string",    "owner": {      "id": "string",      "email": "string"    },    "expiresAt": "2019-08-24T14:15:22Z",    "lastUsedAt": "2019-08-24T14:15:22Z",    "revokedAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z"  },  "token": "string"}