Create API Key
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
| Scheme | Type | Details |
|---|---|---|
JSON web token (JWT) or API key | Bearer token | Authorization 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
- objectRequest to create a new API key.
namestringrequiredKey name.
Response
API key created successfully
- objectResponse to a successful API key creation.
api_keystringrequiredGenerated secret API key. There is no way to retrieve this key again through the API, so store it securely.idstring (uuid)requiredAPI key identifier.namestringrequiredAPI key name provided by the user.
curl -X POST '/v0/api_keys' \
-H 'Authorization: Bearer YOUR_TOKEN'API key with that name already exists
{
"message": "An entity with this name already exists",
"error_code": "DuplicateName",
"details": null
}