Skip to main content
POST
Create API Key

Body

application/json

Field names in this request body are camelCase (expirationDays, workspaceId).

name
string
required

A descriptive name for the API key to help identify its purpose and usage context

Minimum string length: 1
expirationDays
integer | null

Number of days until the API key expires, between 1 and 365.

Required range: 1 <= x <= 365
permissions
string[] | null

List of permission scopes granted to this API key

workspaceId
string | null

Scope the key to a workspace. Your organization must own the workspace.

Response

API key created

_id
integer<int64>
required

Unique identifier for this API key

name
string
required

The descriptive name given to this API key

expiration_date
string<date-time>
required

When this API key expires and becomes invalid (UTC)

created_at
string<date-time>
required

When this API key was created (UTC)

revoked
boolean
required

Whether this API key has been revoked

api_key
string
required

The plain-text API key. It is only returned in this response and cannot be retrieved later, so store it securely.

permissions
string[] | null

List of permission scopes granted to this API key

created_by_user_id
string | null

Identifier of the user who created this API key

verbex_id
string | null

Verbex ID of the key owner

user_org_id
string | null

Organization the key belongs to

user_workspace_id
string | null

Workspace the key is scoped to, if any