Skip to main content
POST
/
account
/
api
/
v1
/
api-keys
Create API key
curl --request POST \
  --url https://www.closient.com/account/api/v1/api-keys \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "",
  "role": "viewer"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "role": "<string>",
  "created": "<string>",
  "key": "<string>",
  "description": ""
}

Authorizations

X-API-Key
string
header
required

Body

application/json
name
string
required

Name for the new API key.

description
string
default:""

Optional description.

role
string
default:viewer

Key role: viewer, editor, or admin.

Response

OK

id
string<uuid>
required

API key identifier.

name
string
required

Key name.

role
string
required

Key role: viewer, editor, or admin.

created
string
required

ISO 8601 creation timestamp.

key
string
required

The raw API key value. Only shown once at creation time.

description
string
default:""

Key description.