Skip to main content

Access Token Endpoints

Manage API access tokens for programmatic access.

Base Path​

/api/access-token

Endpoints​

List Tokens​

GET /api/access-token
Authorization: Bearer {token}

Returns all access tokens for the current user/tenant.

Create Token​

POST /api/access-token
Authorization: Bearer {token}

Body:

{
"name": "CI/CD Token",
"expiresAt": "2026-12-31T00:00:00Z",
"scopes": ["read:employees", "write:tasks"]
}

Response:

{
"id": "uuid",
"name": "CI/CD Token",
"token": "gzy_xxxxxxxxxxxxxxxxxxxx",
"expiresAt": "2026-12-31T00:00:00Z"
}

Note: The token value is only shown once at creation time. Store it securely.

Revoke Token​

DELETE /api/access-token/:id
Authorization: Bearer {token}

Update Token​

PUT /api/access-token/:id
Authorization: Bearer {token}
{
"name": "Updated Name",
"expiresAt": "2027-06-30T00:00:00Z"
}

Token Usage​

Use access tokens as Bearer tokens:

curl -H "Authorization: Bearer gzy_xxxxxxxxxxxxxxxxxxxx" \
https://api.example.com/api/employee

Token Scopes​

ScopeDescription
read:employeesRead employee data
write:employeesModify employee data
read:tasksRead tasks
write:tasksCreate/modify tasks
read:timesheetsRead time entries
write:timesheetsCreate/modify time entries
adminFull admin access