latestOpenAPI 3.0.02026-08-10221235717.8 KB

e21ad140ec3c

public
TokenInfo

Creates a new static token for a user.

This is only supported for users of type service.

post/users/{userId}/tokens

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"
}