Skip to main content

Create a token for a service account.

POST /api/admin/service-account/:id/token

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

Request

Path Parameters

  • id string required

Body

required

#/components/schemas/createPatSchema

  • description string required

    The PAT's description.

  • expiresAt date-time required

    The PAT's expiration date.

Responses

The resource was successfully created.

Response Headers
  • location string

    The location of the newly created resource.

Schema
  • id integer required

    Possible values: >= 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.

  • secret string

    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.

  • createdAt date-time required

    The date and time of when the PAT was created.

  • seenAt date-time nullable

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

  • userId integer

    The ID of the user this PAT belongs to.

  • description string required

    The PAT's description.

  • expiresAt date-time required

    The PAT's expiration date.

Loading...