Skip to main content
POST
Create an App token

Authorizations

Authorization
string
header
required

An API token for one organization. You create and revoke tokens in the dashboard. A token scoped to one App can reach only that App, so give that kind of token to an agent. An organization-wide token can create a short-lived one with POST /api/tokens.

Headers

Idempotency-Key
string

A key that identifies this request for retries, up to 200 printable characters. A retry with the same key and input returns the first request's result instead of repeating the work. If you omit the key, the API generates one and returns it in the Idempotency-Key response header.

Required string length: 1 - 200

Body

application/json
name
string
required

A name for the token, up to 100 characters. The dashboard lists the token by this name.

Required string length: 1 - 100
app_id
string
required

The App that the token reaches. The token can't reach any other App or create Apps.

Pattern: ^app_[0-9A-Za-z]{24}$
expires_in
integer
default:3600

How long the token works, in seconds, from 60 to 86400 (24 hours). Default: 3600. The token never outlives the token that created it.

Required range: 60 <= x <= 86400
Example:

300

Response

The new token, with its value.

id
string
required

The token's ID, which starts with tok_.

organization_id
string
required

The organization that the token belongs to.

app_id
string | null
required

The one App an App-scoped token reaches; null for the whole organization

name
string
required

The token's name.

preview
string
required

judt_*** and the token's last four characters, to tell tokens apart.

expires_at
string<date-time> | null
required

When the token stops working; null if it never expires.

Example:

"2026-10-03T14:01:30.000Z"

last_used_at
string<date-time> | null
required

When the token was last used, to the minute; null if it hasn't been used.

Example:

"2026-10-03T14:01:30.000Z"

created_at
string<date-time>
required
Example:

"2026-10-03T14:01:30.000Z"

token
string
required

The token. Send it as a bearer token in the Authorization header, to the API or the MCP server. This is the only response that includes it.