EaserixDocs
DevelopersAPI referenceAuth & accountsMe

Create a user API key

Full sessions only. Returns 200 (not 201) with the key including its show-once secret. org_id defaults to the personal org; role is ignored for user keys; expires_in_days null = 365, 0 = never.

View as Markdown
POST
/v1/me/api-keys
AuthorizationBearer <token>

In: header

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": "string"  }'
{  "api_key": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "kind": "string",    "name": "string",    "org_id": "string",    "token_prefix": "string",    "role": "string",    "tools": [      "string"    ],    "last_used_at": "2019-08-24T14:15:22Z",    "expires_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z",    "secret": "string"  }}