Update a personal access token

Updates the specified personal access token by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

PATCH/v3/personal-access-tokens/{id}
JWT
personalAccessToken:write

Parameters

NameTypeInDescription
id*stringpathUnique identifier for the personal access token.

Request Body Schema

PropertyTypeDescriptionConstraints
revoked*booleanSet true to revoke the token.

Request Example

{
  "revoked": true
}
Triggers webhook: personalAccessToken.updated
POST <your-webhook-url>
{
  "event": "personalAccessToken.updated",
  "data": {
    "id": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "name": "string",
    "expiresAt": "2019-08-24T14:15:22Z",
    "revoked": true,
    "scopes": [
      "string"
    ],
    "teamMemberId": "string",
    "teamMember": {
      "id": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "name": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "role": "string",
      "twoFactorEnabled": true,
      "googleSsoEnabled": true,
      "lastLoginAt": "2019-08-24T14:15:22Z",
      "planId": "string",
      "emailPreference": {
        "metrics": true
      }
    },
    "lastUsedAt": "2019-08-24T14:15:22Z",
    "lastRotatedAt": "2019-08-24T14:15:22Z"
  },
  "triggeredAt": "string"
}

Responses

200 OK
{
  "id": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "name": "string",
  "expiresAt": "2019-08-24T14:15:22Z",
  "revoked": true,
  "scopes": [
    "string"
  ],
  "teamMemberId": "string",
  "teamMember": {
    "id": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "name": "string",
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "role": "string",
    "twoFactorEnabled": true,
    "googleSsoEnabled": true,
    "lastLoginAt": "2019-08-24T14:15:22Z",
    "planId": "string",
    "emailPreference": {
      "metrics": true
    }
  },
  "lastUsedAt": "2019-08-24T14:15:22Z",
  "lastRotatedAt": "2019-08-24T14:15:22Z"
}