Skip to main content
POST
/
api
/
me
/
tokens
Mint a new API token
curl --request POST \
  --url https://archyon.app/api/me/tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "CLI on alex-laptop"
}
'
{
  "token": "an_pat_a1b2c3d4e5f6g7h8…",
  "prefix": "<string>",
  "name": "<string>",
  "hint": "<string>",
  "orgId": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.archyon.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Both Clerk session JWTs (browser) and Archyon Personal Access Tokens (an_pat_…, server / CLI / MCP) use the same Bearer header. The server distinguishes them by token shape.

  • Clerk JWTs carry org context in the token claims (org_id, org_role, org_slug) — required for org-scoped endpoints. Configure your Clerk session template to include these claims; see DEPLOYMENT.md.
  • PATs are minted at /account → Tokens. Each PAT is bound to whichever org was active at mint time. Switch orgs and re-mint to address a different org.

Body

application/json
name
string
required

Free-text label. Required, non-empty after trim.

Example:

"CLI on alex-laptop"

Response

Created.

token
string
required

Plaintext token. Only returned at mint time — store it now or revoke + re-mint.

Example:

"an_pat_a1b2c3d4e5f6g7h8…"

prefix
string
required
name
string
required
hint
string
required

Human-readable guidance shown next to the token in the UI.

orgId
string | null