Token Permissions

Access tokens can be configured with fine-grained permissions that control what data is visible and what operations are allowed.

Master Access Level

Controls the overall access tier for the token.

ValueDescription
free_busy_onlyCan only see free/busy periods — no event details
view_onlyCan see all event data but cannot create/edit/delete
view_filteredCan see only fields specified in visibleFields
full_accessFull read/write access (operations controlled by allowedOperations)

Visible Fields

When masterAccessLevel is view_filtered, only these fields are included in event responses. Pass "all" to include everything.

ValueDescription
titleEvent title/summary
locationEvent location
descriptionEvent description/notes
attendeesList of attendees
timesStart and end times
statusEvent status (confirmed, tentative, cancelled)
labelsEvent labels/tags
join_urlVideo conference join URL
organizerEvent organizer
allAll fields (shorthand)

Allowed Operations

When masterAccessLevel is full_access, these control which write operations are permitted.

ValueDescription
respond_to_eventAccept, decline, or tentatively accept invitations
edit_titleModify event titles
edit_locationModify event locations
edit_descriptionModify event descriptions
edit_attendeesAdd or remove attendees
edit_timesChange event start/end times
create_eventsCreate new events
delete_eventsDelete events
allAll operations (shorthand)

Timeframe Restrictions

Limit the time window a token can access.

FieldTypeDescription
timeframePastDaysint?How many days into the past. null = unlimited
timeframeFutureDaysint?How many days into the future. null = unlimited

Tip

Example: timeframePastDays: 30, timeframeFutureDays: 60 means the token can only access events from 30 days ago to 60 days from now.

Email Access Enabled

The master gate for email access. When false (default), all email endpoints return access denied. Email permissions are independent from calendar permissions.

ValueDescription
falseEmail access disabled (default)
trueEmail access enabled — specific operations controlled by allowedEmailOperations

Warning

Email access is disabled by default. You must set emailAccessEnabled: true before the token can use any email endpoints.

Visible Email Fields

Controls which fields are included in email responses. Uses bitflag-based filtering for O(1) performance. Pass "all" to include everything. When a field is not visible, it is returned as null.

ValueDescription
subjectEmail subject line
fromSender information
recipientsTo, Cc, and Bcc recipients (toggled together)
bodyFull email body content
body_previewShort body preview/snippet
attachmentsAttachment metadata
timestampSent and received timestamps
labelsEmail labels/categories
allAll fields (shorthand) — default

Allowed Email Operations

Controls which email operations are permitted. Pass "all" to allow everything. Default: view_email, search_emails, view_thread (read-only).

ValueDescription
view_emailView individual emails
search_emailsSearch and list emails
view_threadView email threads
send_emailSend new emails
reply_to_emailReply to existing emails
forward_emailForward emails to other recipients
delete_emailDelete (trash) emails
mark_as_readMark emails as read/unread
apply_labelsAdd or remove labels/categories
allAll operations (shorthand)

Access Rules & Linked Resources

Access Rules are per-contact or per-domain rules that override the master access level for specific email addresses or domains. See Access Rules Management.

Linked Resources — Tokens must have at least one linked resource (calendar) to access data. See Resource Links Management.

Avatars

Tokens can be assigned an avatar for visual identification.

ValueDescription
generalDefault/generic avatar
openclawOpenClaw avatar
claudeClaude (Anthropic) avatar
openaiOpenAI avatar
geminiGemini (Google) avatar
GET/api/auth/token/{tokenId}/permissionsBearer / JWT

Get Token Permissions

Returns the permission settings for a specific access token.

Path Parameters

ParameterTypeDescription
tokenIdintAccess token ID

Response 200 OK

{
"keyId": 42,
"title": "My Integration Key",
"operatorId": "550e8400-e29b-41d4-a716-446655440000",
"masterAccessLevel": "view_filtered",
"visibleFields": ["title", "times", "attendees"],
"allowedOperations": [],
"emailAccessEnabled": true,
"visibleEmailFields": ["subject", "from", "recipients", "body_preview", "timestamp"],
"allowedEmailOperations": ["view_email", "search_emails", "view_thread"],
"timeframePastDays": 30,
"timeframeFutureDays": 60,
"timeframeDescription": "Last 30 days to next 60 days",
"accessRules": [
{
"id": 1,
"accessTokenId": 42,
"identifierType": "domain",
"identifier": "competitor.com",
"accessLevel": "block",
"priority": 10,
"description": "Block competitor domain",
"createDate": "2026-02-01T10:00:00Z"
}
],
"linkedResources": [
{ "resourceId": "aaa-bbb-ccc", "title": "Primary Calendar" }
],
"hasLinkedResources": true,
"lastUpdated": "2026-02-01T10:00:00Z"
}
PATCH/api/auth/token/{tokenId}/permissionsBearer / JWT

Update Token Permissions

Updates the permission settings for a specific access token. All fields are optional — only provided fields are updated.

Request Body (all optional)

FieldTypeDescription
masterAccessLevelstringNew access level
visibleFieldsstring[]New visible fields list
allowedOperationsstring[]New allowed operations list
timeframePastDaysintNew past days limit
timeframeFutureDaysintNew future days limit
emailAccessEnabledboolEnable/disable email access
visibleEmailFieldsstring[]New visible email fields list
allowedEmailOperationsstring[]New allowed email operations list
{
"masterAccessLevel": "view_only",
"visibleFields": ["title", "times"],
"allowedOperations": ["respond_to_event"],
"timeframePastDays": 14,
"timeframeFutureDays": 30,
"emailAccessEnabled": true,
"visibleEmailFields": ["all"],
"allowedEmailOperations": ["view_email", "search_emails", "view_thread", "send_email", "reply_to_email"]
}