Personal Access Tokens

Create a new personal access token

Create a new personal access token. A maximum of 10 personal access tokens can be created.

post/v3/users/{userId}/access-tokens

Request body

OR

Example request

{
  "expires_at": "2022-11-04T20:10:06.927Z"
}

Response

Response containing details of the created personal access token.

idstring uuid required

Contains a unique identifier used for this resource.

user_idstring uuid required

Contains a unique identifier used for a user.

namestring required
state'ACTIVE' | 'REVOKED' | 'EXPIRED' required

State of the personal access token.

konnect_tokenstring required

The Konnect token used to authenticate with Konnect.

revoked_bystring uuid nullable

Contains a unique identifier used for the user that revoked this token.

created_atstring date-time required

An ISO-8601 timestamp representation of entity creation date.

updated_atstring date-time

An ISO-8601 timestamp representation of entity update date.

last_used_atstring date-time nullable

An ISO-8601 timestamp representation of entity last used date.

expires_atstring date-time nullable required

An ISO-8601 timestamp representation of entity expiration date.

revoked_atstring date-time nullable

An ISO-8601 timestamp representation of entity revoked at date.

Example response

{
  "id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
  "user_id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
  "revoked_by": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
  "created_at": "2022-11-04T20:10:06.927Z",
  "updated_at": "2022-11-04T20:10:06.927Z",
  "last_used_at": "2022-11-04T20:10:06.927Z",
  "expires_at": "2022-11-04T20:10:06.927Z",
  "revoked_at": "2022-11-04T20:10:06.927Z"
}

Changes

Changed in 3 of the 75 revisions of this API.124

    • added to the request body oneOf list

      request-body-one-of-added

    • request property /// deprecated

      request-property-deprecated

    This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 377981ac9f14121See the full diff
    • the request's body type changed from object to no type

      request-body-type-changed

    • removed the request property

      request-property-removed

    • removed the request property

      request-property-removed

    • added to the request body oneOf list

      request-body-one-of-added

    • endpoint added

      endpoint-added