public
TokenInfo

Creates a new static token for a user.

This is only supported for users of type service.

post/users/{userId}/tokens

Request

  • Base URL
    https://api.humanitec.io
  • URL
    https://api.humanitec.io/users/{userId}/tokens
  • Auth
    none declared

Path parameters

userIdstring required

The user ID.

Request body

descriptionstring

A description of the token. (Optional)

expires_atstring

The time the token expires. If not set, the token will not expire. (Optional)

idstring required

Identifier of the token. Must be unique for the user.

typestring required

The type of the token. Can only be "static".

Example request

{
  "description": "Humanitec API Calls from CircleCI Pipelines",
  "expires_at": "2022-04-30T19:47:01Z",
  "id": "circle-ci-token",
  "type": "static"
}

Response

The issued static token.

tokenstring required
typestring

Example response

{
  "token": "a7a04740ae985f12af58545e4edbac6a",
  "type": "jwt"
}

Changes

No recorded changes to this operation across all 9 revisions of this API.