Users

Create a personal access token for the authenticated user

Issues a new personal-access token for the currently authenticated user. The raw token value is included in the response; subsequent reads will only expose the metadata. Treat the response as sensitive.

post/personal-access-tokens

Request body

idstring

Stable identifier for the personal-access token. Use this to revoke the token later via deletePersonalAccessToken. The ID is safe to log; the raw secret is only ever returned at creation as accessToken.

namestring required

A human-readable label for the token, used to distinguish it from other tokens issued to the same user.

created_atstring date-time

The date and time the personal access token was created.

Example request

{
  "id": "27ebb191b5f4f2024b0c5671e580d6de2b03f6c48259753b01976807a14eb41e05f0b7def4593f5a",
  "name": "Salesforce",
  "created_at": "2019-01-15T11:00:00.000Z"
}

Response

A newly issued personal access token

accessTokenstring required

The raw access token. This is the only time the raw value is returned — store it securely.

Example response

{
  "token": {
    "id": "27ebb191b5f4f2024b0c5671e580d6de2b03f6c48259753b01976807a14eb41e05f0b7def4593f5a",
    "name": "Salesforce",
    "created_at": "2019-01-15T11:00:00.000Z"
  },
  "accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6IjVkYTRhZmEwNjUwZGQ2MDFiNzI2Mzc0YjVmMWM2MjgyIn0.eyJhdWQiOiI5M2MwMGY1NC04NjZhLTRiMjMtYWJiYi05MmFjY"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.