Skip to main content
POST
Create API Key

Body

application/json

The request body resource

name
string
required

Human-readable name for the API key

Example:

"bob-the-bot"

groups
string[]

Groups to assign to this API key

Example:

Response

Created

created_at
string

Creation timestamp

created_by
string

Subject of the admin who created this key

deactivated_at
string

Revocation timestamp

deactivated_by
string

Subject of the admin who revoked this key

groups
string[]

Groups assigned to this API key

Example:
id
string<uuid>
read-only

Unique identifier

key
string

The generated API key. This is the only time the full key is shown.

Example:

"hpk_Ab3fX9kL..."

last_used_at
string

Timestamp of last usage

masked_key
string

Masked version of the API key for identification

Example:

"hpk_1nzb***************************************"

name
string

Human-readable name

Example:

"ai-agent"

org_id
string<uuid>
read-only

Organization ID

status
enum<string>

Current status of the API key

Available options:
active,
revoked