Create a new personal access token (PAT) for the current user.

Creates a new [personal access token](https://docs.getunleash.io/concepts/api-tokens-and-client-keys#personal-access-tokens (PAT) belonging to the current user.

Authentication

Authorizationstring
API key needed to access this API
OR
AuthorizationBearer
API key needed to access this API, in Bearer token format

Request

#/components/schemas/createPatSchema

descriptionstringRequired
The PAT's description.
expiresAtstringRequiredformat: "date-time"
The PAT's expiration date.

Response headers

locationstring or null
The location of the newly created resource.

Response

The resource was successfully created.
idinteger>=1
The PAT's ID. PAT IDs are incrementing integers. In other words, a more recently created PAT will always have a higher ID than an older one.
createdAtstringformat: "date-time"
The date and time of when the PAT was created.
descriptionstring
The PAT's description.
expiresAtstringformat: "date-time"
The PAT's expiration date.
secretstring or null
The token used for authentication. It is automatically generated by Unleash when the PAT is created and that is the only time this property is returned.
seenAtstring or nullformat: "date-time"

When the PAT was last seen/used to authenticate with. null if it has not been used yet.

userIdinteger or null
The ID of the user this PAT belongs to.

Errors