ZITADEL Docs
APIsCore ResourcesV2User

Add a Personal Access Token

Personal access tokens (PAT) are the easiest way to authenticate to the Zitadel APIs. Make sure you store the returned PAT safely, as you won't be able to read it from the Zitadel API anymore. Only users of type machine can have personal access tokens.

Required permission:

  • user.write
POST
/v2/users/{user_id}/pats

Path Parameters

user_id*string

Request Body

application/json

expirationDate?string

The timestamp when the token will expire.

Formatdate-time
[key: string]?never

Response Body

application/json

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

Was this page helpful?