Personal access tokens#
Create and manage personal access tokens for API authentication.
Authentication required
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.
POST /v1/personal-access-tokens
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "My Campaign"
}Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Display name for this token. |
| expiresAt | string (ISO 8601) | null | — | When this token should expire. |
Response#
Returns { data } with the result.
Underlying SDK method: bw.personalAccessTokens.create(params)
Store the token securely
GET /v1/personal-access-tokens#
List all personal access tokens for the authenticated user.
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.
DELETE /v1/personal-access-tokens/:id
Authorization: Bearer {token}Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Required | Token identifier to revoke. |
Response#
Returns { data } with the result.
Underlying SDK method: bw.personalAccessTokens.revoke(params)
Immediate invalidation
POST /v1/personal-access-tokens/:id/rotate#
Rotate a personal access token by revoking the old one and creating a new one.
POST /v1/personal-access-tokens/:id/rotate
Authorization: Bearer {token}Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Required | Token identifier to rotate (revokes old, creates new). |
Response#
Returns { data } with the result.
Underlying SDK method: bw.personalAccessTokens.rotate(params)