Skip to main content

Create a new Personal Access Token.

POST /api/admin/user/tokens

Creates a new Personal Access Token for the current user.

Request

Body

required

patSchema

  • id integer

    Possible values: >= 1

    The unique identification number for this Personal Access Token. (This property is set by Unleash when the token is created and cannot be set manually: if you provide a value when creating a PAT, Unleash will ignore it.)

  • secret string

    The token used for authentication. (This property is set by Unleash when the token is created and cannot be set manually: if you provide a value when creating a PAT, Unleash will ignore it.)

  • expiresAt date-time

    The token's expiration date.

  • createdAt date-time

    When the token was created. (This property is set by Unleash when the token is created and cannot be set manually: if you provide a value when creating a PAT, Unleash will ignore it.)

  • seenAt date-time nullable

    When the token was last seen/used to authenticate with. null if it has not been used yet. (This property is set by Unleash when the token is created and cannot be set manually: if you provide a value when creating a PAT, Unleash will ignore it.)

Responses

The resource was successfully created.

Response Headers
  • location string

    The location of the newly created resource.

Schema
  • id integer

    Possible values: >= 1

    The unique identification number for this Personal Access Token. (This property is set by Unleash when the token is created and cannot be set manually: if you provide a value when creating a PAT, Unleash will ignore it.)

  • secret string

    The token used for authentication. (This property is set by Unleash when the token is created and cannot be set manually: if you provide a value when creating a PAT, Unleash will ignore it.)

  • expiresAt date-time

    The token's expiration date.

  • createdAt date-time

    When the token was created. (This property is set by Unleash when the token is created and cannot be set manually: if you provide a value when creating a PAT, Unleash will ignore it.)

  • seenAt date-time nullable

    When the token was last seen/used to authenticate with. null if it has not been used yet. (This property is set by Unleash when the token is created and cannot be set manually: if you provide a value when creating a PAT, Unleash will ignore it.)

Loading...