Skip to main content
POST
/
service-accounts
/
{org}
/
{name}
/
api-keys
Create an API key for a service account
curl --request POST \
  --url https://app.kosli.com/api/v2/service-accounts/{org}/{name}/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "<string>",
  "expires_at": 123
}
'
{
  "id": "<string>",
  "key": "<string>",
  "description": "<string>",
  "created_at": 123,
  "expires_at": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.kosli.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

name
string
required
org
string
required

Body

application/json
description
string
required
Required string length: 1 - 256
expires_at
integer | null

Unix timestamp for key expiry. Use 0 or omit for no expiry. Must not be in the past.

Required range: x <= 4102444800

Response

Successful Response

id
string
required
key
string
required
description
string
required
created_at
number
required
expires_at
integer
required
Last modified on May 12, 2026