Skip to main content
POST
Generate a new Personal Access Token

Authorizations

Authorization
string
header
required

Personal Access Token (PAT) passed in the Authorization header (e.g., Bearer <pat>) for authenticated API requests. PATs are generated via /auth/generate-pat after authenticating through the magic link flow.

Body

application/json
tokenName
string
required

Name for the PAT

Example:

"MyVPNToken"

expiryDays
integer | null

Days until PAT expires (optional)

Example:

30

Response

PAT generated successfully

message
string
Example:

"PAT generated"

pat
string

Raw PAT (client must save it)

Example:

"069b1d819886c2a8"

note
string
Example:

"Save this PAT securely; it won’t be shown again!"