Skip to main content
POST
Create Workspace API Key

Authorizations

Authorization
string
header
required

Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.

Path Parameters

workspace_id
integer
required

Workspace ID. Find this in Workspace > General Settings.

Body

application/json

Request schema for minting a workspace API key.

name
string
required

Names where the key runs, e.g. 'prod'. Unique among the workspace's live keys.

Required string length: 1 - 100
Example:

"prod"

Response

Successful Response

A newly minted key, carrying its plaintext value.

Separate from WorkspaceApiKeyResponse so the value cannot leak into the list endpoint by accident. This is the only response in the system that contains one.

id
integer
required

API key ID.

name
string
required

Name given to the key when it was created.

last_four
string
required

Last four characters of the key, to tell keys apart.

created_at
string<date-time>
required

When the key was created.

api_key
string
required

The full key. Shown once and never retrievable again.

last_used_at
string<date-time> | null

When the key was last used. Null if it has never been used.