Api tokens
List Customer Tokens
Returns API tokens visible to the current user. Restricted users see only their customer-scoped tokens; admins see all tokens. Tokens are masked: only the first 8 characters are shown.
GET /api/customer/tokens
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
envelope | string | none | items: answer as { items, total, page, perPage }. Becomes the default on 2027-01-18. |
Example (cURL)
curl -X GET "$BASE_URL/api/customer/tokens?envelope=items" \
-H "Cookie: $SESSION_COOKIE" \
-H "Accept: application/json"Response
{
"items": [
{
"id": 2,
"organizationId": 1,
"name": "Customer Scoped Token",
"customerId": 5,
"customerName": "Acme Corp",
"lastUsedAt": null,
"expiresAt": null,
"createdAt": "2026-02-01T08:00:00.000Z",
"tokenHint": "wsm_f7e6d5..."
}
],
"total": 1,
"page": 1,
"perPage": 1
}List form: with envelope=items the list arrives as { items, total, page, perPage }. Without it the endpoint still answers the current form (a bare array of the same items), which is deprecated; { items, ... } becomes the default on 2027-01-18.
Common errors
401 Unauthorizedwhen not authenticated403 Forbiddenwhen user lacks read access