Skip to main content
POST
Create New Api Key
The secret token is shown only once, in the create response. Copy it directly into your secret manager.
The key’s role determines what it can do; scopes optionally restricts it to a subset of the role’s permissions. Scopes are permission keys like connectors.read — each role’s permissions array from GET /v1/orgs/{org_id}/roles lists the valid values.

Authorizations

Authorization
string
header
required

Ardent API key (sk-ard_live_… / sk-ard_test_…) or a dashboard session token.

Path Parameters

org_id
string
required

Body

application/json
name
string
required

Descriptive name for the key

Required string length: 1 - 100
role_id
string
required

Role ID to grant to this API key (e.g., role_org_member)

expires_days
integer | null

Days until expiration (null = never expires)

scopes
string[]

Permission keys like connectors.read, a subset of the role's; empty uses all.

Response

The created key, including the secret — shown only this once.

api_key
string
required

The full secret key; shown only this once — store it now.

api_key_id
string
required

ID of the created key.

created_at
string
required

When the key was created.

key_prefix
string
required

First characters of the key, for identifying it in lists.

name
string
required

Human-readable key name.

role_id
string
required

ID of the role granted to the key.

role_key
string
required

The role's stable key, for example role_org_member.

scopes
string[]
required

Permission scopes granted to the key.

warning
string
required

Reminder that the secret cannot be retrieved again.

expires_at
string | null

When the key expires. Null when it does not expire.