Skip to main content
POST
Update an API token

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

organizationId
string
required

The ID of the Organization where you want to update an API token.

tokenId
string
required

The API token you want to update.

Body

application/json

The request body for updating a token.

name
string
required

The name of the API token.

Required string length: 1 - 256
Example:

"My token"

description
string

The description of the API token.

Maximum string length: 500
Example:

"This is my API token"

Response

OK

createdAt
string<date-time>
required

The time when the API token was created in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

Example:

"2022-11-22T04:37:12Z"

description
string
required

The description of the API token.

Example:

"my token description"

id
string
required

The API token's ID.

Example:

"clm8q7f6q000008lcgyougpsk"

kind
enum<string>
required

The kind of the API token.

Available options:
STANDARD,
DIRECT_ACCESS
Example:

"STANDARD"

name
string
required

The name of the API token.

Example:

"My token"

scope
enum<string>
required

The scope of the API token.

Available options:
DEPLOYMENT,
WORKSPACE,
ORGANIZATION
Example:

"WORKSPACE"

shortToken
string
required

The short value of the API token.

Example:

"short-token"

startAt
string<date-time>
required

The time when the API token will become valid in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

Example:

"2022-11-22T04:37:12Z"

updatedAt
string<date-time>
required

The time when the API token was last updated in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

Example:

"2022-11-22T04:37:12Z"

createdBy
object
endAt
string<date-time>

The time when the API token expires in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

Example:

"2022-11-22T04:37:12Z"

expiryPeriodInDays
integer

The expiry period of the API token in days.

Example:

30

lastRotatedAt
string<date-time>

The time when the API token was last rotated in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

Example:

"2022-11-22T04:37:12Z"

lastUsedAt
string<date-time>

The time when the API token was last used in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

Example:

"2022-11-22T04:37:12Z"

roles
object[]

The roles of the API token.

token
string

The value of the API token.

Example:

"token"

updatedBy
object