Skip to Content
API ReferencePlatformCreate API Key

Create API Key

POST/v0/api_keys
Authentication
Request body (application/json)

Create a new API key with the specified name. The generated API key will be returned in the response and cannot be retrieved again later.

Authentication

SchemeTypeDetails
JSON web token (JWT) or API keyBearer tokenAuthorization header · Use a JWT token obtained via an OAuth2/OIDC login workflow or an API key obtained via the `/v0/api-keys` endpoint.

Request body

Content type: application/json

  • object
    Request to create a new API key.
    • namestringrequired
      Key name.

Response

application/json
API key created successfully
  • object
    Response to a successful API key creation.
    • api_keystringrequired
      Generated secret API key. There is no way to retrieve this key again through the API, so store it securely.
    • idstring (uuid)required
      API key identifier.
    • namestringrequired
      API key name provided by the user.
Request
curl -X POST '/v0/api_keys' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
API key with that name already exists
{ "message": "An entity with this name already exists", "error_code": "DuplicateName", "details": null }