Edit an access token
Renames a token or changes its permissions without changing its value (scripts keep working). The new permissions cannot exceed the caller’s, and only tokens reaching no more websites than the caller can be edited.
Related: List access tokens and Create an access token in Access tokens.
Request
Path parameters
tokenIdstringrequiredPattern: ^[a-f0-9]{24}$
Headers
AuthorizationstringrequiredBearer followed by an account token with the tokens:write scope.
Content-TypestringrequiredSend the body as JSON.
One of: application/json
Body fields
namestringoptionalUp to 60 characters
scopesstring[]optionalEach one of: notes:read, notes:write, analytics:read, goals:read, goals:write, funnels:read, funnels:write, segments:read, segments:write, alerts:read, alerts:write, websites:read, websites:write, settings:read, settings:write, team:read, team:write, api_keys:read, api_keys:write, payments:read, payments:write, identify:write, visitors:write, account:read, account:write, tokens:read, tokens:write · At least 1 items
Response
Token.
{
"status": "string",
"data": {
"id": "string",
"name": "string",
"maskedToken": "string",
"scopes": [],
"websiteScope": {},
"createdAt": "2026-01-01T00:00:00.000Z",
"lastUsedAt": "2026-01-01T00:00:00.000Z",
"rolledAt": "2026-01-01T00:00:00.000Z"
}
}Response fields
| Field | Type | Description |
|---|---|---|
| status | "ok" | |
| data | object | |
| data.id | string | |
| data.name | string | |
| data.maskedToken | string | |
| data.scopes | string[] | |
| data.websiteScope | object | |
| data.createdAt | string (date-time) | |
| data.lastUsedAt | string (date-time) | null | null | |
| data.rolledAt | string (date-time) | null | null |