ZITADEL Docs
APIsCore ResourcesV1Organization Objects

Create a Personal-Access-Token (PAT)

Deprecated: use user service v2 AddPersonalAccessToken instead.

Generates a new PAT for the user. Currently only available for machine users. The token will be returned in the response, make sure to store it. PATs are ready-to-use tokens and can be sent directly in the authentication header.

POST
/users/{user_id}/pats

Path Parameters

user_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://loading/users/string/pats" \  -H "Content-Type: application/json" \  -d '{}'
{
  "tokenId": "string",
  "token": "string",
  "details": {
    "sequence": 0,
    "creationDate": "2023-01-15T01:30:15.01Z",
    "changeDate": "2023-01-15T01:30:15.01Z",
    "resourceOwner": "string"
  }
}

Was this page helpful?