Personal access tokens#

Create and manage personal access tokens for API authentication.

Authentication required

All endpoints require a Bearer token in the Authorization header. See the Authentication guide for setup instructions.

POST /v1/personal-access-tokens#

Create a new personal access token. The plaintext token is only returned once.

bash
POST /v1/personal-access-tokens
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "My Campaign"
}

Parameters#

NameTypeRequiredDescription
namestringRequiredDisplay name for this token.
expiresAtstring (ISO 8601) | nullWhen this token should expire.

Response#

Returns { data } with the result.

Underlying SDK method: bw.personalAccessTokens.create(params)

Store the token securely

The plaintext token is only returned in the creation response. It cannot be retrieved again. Store it securely.

GET /v1/personal-access-tokens#

List all personal access tokens for the authenticated user.

bash
GET /v1/personal-access-tokens
Authorization: Bearer {token}

Response#

Returns { items, totalCount, facets } with paginated results.

Underlying SDK method: bw.personalAccessTokens.list()

DELETE /v1/personal-access-tokens/:id#

Revoke a personal access token, immediately invalidating it.

bash
DELETE /v1/personal-access-tokens/:id
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
idstring (UUID)RequiredToken identifier to revoke.

Response#

Returns { data } with the result.

Underlying SDK method: bw.personalAccessTokens.revoke(params)

Immediate invalidation

Revoking a token immediately invalidates it. Any integrations using this token will stop working. This action cannot be undone.

POST /v1/personal-access-tokens/:id/rotate#

Rotate a personal access token by revoking the old one and creating a new one.

bash
POST /v1/personal-access-tokens/:id/rotate
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
idstring (UUID)RequiredToken identifier to rotate (revokes old, creates new).

Response#

Returns { data } with the result.

Underlying SDK method: bw.personalAccessTokens.rotate(params)