Create a personal access token

Creates a new personal access token.

POST/v3/personal-access-tokens
JWT
personalAccessToken:write

Request Body Schema

PropertyTypeDescriptionConstraints
name*stringName of the access token.min: 1, max: 256
revokedbooleanSet true to revoke the token.
expiresAtstringThe date (UTC) after which the token will expire.format: date-time
scopes*arrayList of permissions for the token.items: string

Request Example

{
  "name": "string",
  "revoked": true,
  "expiresAt": "2019-08-24T14:15:22Z",
  "scopes": [
    "string"
  ]
}
Triggers webhook: personalAccessToken.created
POST <your-webhook-url>
{
  "event": "personalAccessToken.created",
  "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

201 Created
{
  "accessToken": "string"
}