Skip to main content
Client Create Api Key
curl --request POST \
  --url https://agents-api.kolena.com/api/v1/client/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "status": "active",
  "api_key": "<string>"
}
Rate Limit: This endpoint is limited to requests per minute per user.
Important: The api_key secret is only returned once during creation. Save it immediately in a secure location.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>. The <token> represents your API key, which must be acquired from the Kolena platform.

Body

application/json
name
string
required

The name of the API key.

Maximum string length: 256
expiration_days
integer | null

The number of days until the API key expires.

Required range: 0 < x <= 3650

Response

Successful Response

id
string
required

The ID of this API key.

name
string
required

The name of this API key.

created_at
string<date-time>
required

When this API key was created, formatted as an ISO 8601 timestamp (e.g. 2025-12-31T10:15:45+00:00)

expires_at
string<date-time> | null
required

When this API key expires, formatted as an ISO 8601 timestamp (e.g. 2025-12-31T10:15:45+00:00), or null if it never expires.

created_by
string
required

The email address of the user who created this API key.

status
enum<string>
required

The current status of this API key (active or expired).

Available options:
active,
expired
api_key
string
required

The API key secret.