Skip to main content

Create an API key

POST 

/api-keys

Creates an API key and returns it once. Store it securely; it cannot be retrieved again.

An API key is a JWT that never expires and is not itself an access token. Exchange it for a short-lived access token with POST /api-keys/auth. Always send linkedUsers: the access token takes the role of the linked user, and a key with no linked user cannot authenticate.

Must be called with an Active Directory user's token; the built-in secureone account cannot create API keys (400, createdBy validation error).

Both application/json and application/x-www-form-urlencoded bodies are accepted.

Required role: superadmin or admin.

Request​

Responses​

The API key was created.