Skip to main content
POST
Create User Pat

Auth

Requires pats:create, which every default role carries. The PAT is created against the caller’s own Logto user, keyed on the token’s subject, and carries only that user’s scopes when exchanged — so minting one can’t grant more access than the caller already has. No active organization is needed: user PATs aren’t org-bound.

Response

Same shape as one element of the List User Personal Access Tokens response.

Errors

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required

Label for the user PAT; must be unique among the caller's own tokens (409 on collision).

expires_at
integer | null

Optional expiry as epoch milliseconds (not seconds — a value below 10^12 is rejected). Omit for a token that never expires.

Response

Successful Response

name
string
required
value
string
required
created_at
string | null
expires_at
string | null