Create a token for a service account.

View as Markdown

Enterprise feature

Creates a new token for the service account identified by the id.

Authentication

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

Path parameters

idstringRequired

Request

#/components/schemas/createPatSchema

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

Response headers

locationstring
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
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
The ID of the user this PAT belongs to.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
415
Unsupported Media Type Error