Audit Logs
Audit logs record security-relevant and administrative actions performed in your OneCal Team, such as sign-ins, membership changes, calendar sync updates, sync errors, and API key changes. On this page, we'll look at the audit log event model, how to list and filter events, and how to use them to monitor calendar sync errors.
Access and recording
- Role: Only API keys belonging to users with the
OWNER,ADMIN, orBILLING_ONLYrole can access audit logs. Other roles get aFORBIDDENerror. Both full access and read-only API keys work. - Team size: Events are only recorded while your team has at least two members. This applies to every action, including sync errors and calendar connection events. Nothing is recorded while the team has a single member, and those events are not added later.
The Audit Log Event model
Properties
- Name
id- Type
- string
- Description
Unique identifier for the audit log event.
- Name
createdAt- Type
- timestamp
- Description
Timestamp of when the action happened, in UTC.
- Name
category- Type
- enum
- Description
Category of the action. Possible values:
SECURITY,SYNC_CONFIG,BOOKING_LINKS,BOOKING_PAGES,CALENDARS,ACCESS_CONTROL,BILLING,WORKFLOWS,API_KEYS,MCP,WORKSPACE_POLICIES.
- Name
action- Type
- string
- Description
The action that was performed, for example
LOG_IN,MEMBERSHIP_REMOVED, orSYNC_CONFIG_FAILED. See Actions for the full list.
- Name
details- Type
- object | null
- Description
Event-specific details. Most events include
details.subject, which describes the entity the action concerns. Some actions add more fields, such aserrorCodeonSYNC_CONFIG_FAILED. See Event details.
- Name
actor- Type
- object
- Description
Who performed the action: a team member or OneCal. See The actor object.
- Name
impersonatedBy- Type
- object | null
- Description
Set when an administrator performed the action while impersonating the actor, otherwise
null. See The impersonatedBy object.
The actor object
actor.kind is one of three values:
- Name
user- Type
- object
- Description
A team member. Includes
id,name, andemail.nameandemailcan benull.{ "kind": "user", "id": "cm6a1b2c300000clb1x2y3z4w", "name": "John Doe", "email": "john@example.com" }
- Name
system- Type
- object
- Description
An action OneCal performed automatically, for example Directory Sync adding a member, a calendar sync failing, a managed sync creating a member's calendar sync, or a billing change from the payment provider. Includes
owner: the team member whose calendar sync, calendar connection or membership OneCal changed, withid,name, andemail.ownerisnullfor team-wide changes, such as billing, and when the owner's OneCal account has been deleted.{ "kind": "system", "owner": { "id": "cm7f3cfb000000clbc8pk5qtr", "name": "Jane Smith", "email": "jane@example.com" } }{ "kind": "system", "owner": null }
- Name
deleted- Type
- object
- Description
The action was attributed to a user whose OneCal account has since been deleted. No other fields. These events no longer match an
actorUserIdfilter.{ "kind": "deleted" }
The actorUserId filter matches both the team member who performed an action and the owner of a system action. Filtering by one team member's ID returns their own actions plus everything OneCal did automatically to their calendar syncs, calendar connections and membership, such as CALENDAR_CONNECTION_EXPIRED, SYNC_CONFIG_FAILED, SYNC_CONFIG_REPAIRED, and the managed sync events.
The impersonatedBy object
impersonatedBy is set when an administrator performed the action while impersonating the actor.
- Name
masked: false- Type
- object
- Description
The impersonator is a current member of your team. Includes their
nameandemail.{ "masked": false, "name": "Ada Admin", "email": "ada@example.com" }
- Name
masked: true- Type
- object
- Description
The impersonator was a OneCal system administrator, or is no longer a member of your team. No identifying details are returned.
{ "masked": true }
impersonatedBy is null when nobody impersonated the actor.
List all audit log events
This endpoint retrieves a paginated list of audit log events for your team, ordered from newest to oldest. All query parameters are optional and can be combined. An invalid parameter returns a BAD_REQUEST error.
Optional query parameters
- Name
page- Type
- integer
- Description
The page number to return, starting at
1. Defaults to1.
- Name
pageSize- Type
- integer
- Description
The number of events to return per page, between
1and100. Defaults to100.
- Name
category- Type
- enum
- Description
Only return events in this category. Possible values:
SECURITY,SYNC_CONFIG,BOOKING_LINKS,BOOKING_PAGES,CALENDARS,ACCESS_CONTROL,BILLING,WORKFLOWS,API_KEYS,MCP,WORKSPACE_POLICIES. Values are case-sensitive.
- Name
actorUserId- Type
- string
- Description
Only return events this user performed, or that OneCal performed on their calendar syncs, calendar connections or membership (see The actor object). Must be a OneCal user ID (a CUID, such as
cm6a1b2c300000clb1x2y3z4w). You can get user IDs from the memberships endpoint.
- Name
dateFrom- Type
- string
- Description
Only return events that happened at or after this point in time. Accepts an ISO 8601 date (
2026-10-01) or a date-time with a timezone offset (2026-10-01T09:00:00Zor2026-10-01T11:00:00+02:00). A date-time without an offset is rejected. A date means the start of that day in UTC.
- Name
dateTo- Type
- string
- Description
Only return events that happened at or before this point in time. Accepts the same formats as
dateFrom. A date includes the whole day, up to23:59:59.999UTC. Must not be earlier thandateFrom.
Request
curl -G https://app.onecal.io/api/v1/audit-logs \
-H "x-api-key: {apiKey}" \
-d category=ACCESS_CONTROL \
-d dateFrom=2026-10-01 \
-d dateTo=2026-10-31 \
-d pageSize=50 \
-d page=1
Response
{
"pageNumber": 1,
"pageSize": 50,
"total": 2,
"data": [
{
"id": "cm9x2k1q40001l70846gq7a1b",
"createdAt": "2026-10-14T09:12:44.512Z",
"category": "ACCESS_CONTROL",
"action": "MEMBERSHIP_REMOVED",
"details": {
"subject": {
"type": "user",
"id": "cm7f3cfb000000clbc8pk5qtr",
"label": "Jane Smith"
}
},
"actor": {
"kind": "user",
"id": "cm6a1b2c300000clb1x2y3z4w",
"name": "John Doe",
"email": "john@example.com"
},
"impersonatedBy": null
},
{
"id": "cm9x2j8r20000l708ab12cd34",
"createdAt": "2026-10-02T15:03:10.004Z",
"category": "ACCESS_CONTROL",
"action": "INVITATION_CREATED",
"details": {
"subject": {
"type": "invite",
"id": "cm9x2j8qz0000l708zz99yy88",
"label": "jane@example.com"
}
},
"actor": {
"kind": "user",
"id": "cm6a1b2c300000clb1x2y3z4w",
"name": "John Doe",
"email": "john@example.com"
},
"impersonatedBy": { "masked": true }
}
]
}
Pagination
Results are sorted by createdAt, newest first. Each response includes pageNumber, pageSize, and total, the number of events matching your filters across all pages. There are more pages while pageNumber * pageSize is less than total. The largest page size is 100.
New events can be recorded while you page through results, which shifts older events onto later pages. To page through a stable set, use the same dateFrom and dateTo for every page of the same query.
Actions
The action of an event is one of the following values, grouped by category. New actions may be added over time, so your integration should handle unknown values gracefully.
- Name
SECURITY- Description
LOG_IN,SSO_LOGIN,LOG_OUT,OAUTH_ACCOUNT_LINKED,OAUTH_ACCOUNT_UNLINKED,EMAIL_UPDATED,IMPERSONATION_STARTED,IMPERSONATION_ENDED,ADMIN_MANAGED_ACCOUNT_ENABLED,ADMIN_MANAGED_ACCOUNT_DISABLED,USER_IMPERSONATION_ENABLED,USER_IMPERSONATION_DISABLED
- Name
SYNC_CONFIG- Description
SYNC_CONFIG_CREATED,SYNC_CONFIG_UPDATED,SYNC_CONFIG_DELETED,SYNC_CONFIG_RE_RAN,SYNC_CONFIG_PAUSED,SYNC_CONFIG_UNPAUSED,SYNC_CONFIG_FAILED,SYNC_CONFIG_REPAIRED,SYNC_CONFIG_MANAGED,SYNC_CONFIG_UNMANAGED,SYNC_CONFIG_NOT_CREATED
- Name
BOOKING_LINKS- Description
BOOKING_LINK_CREATED,BOOKING_LINK_UPDATED,BOOKING_LINK_DELETED
- Name
BOOKING_PAGES- Description
BOOKING_PAGE_CREATED,BOOKING_PAGE_UPDATED
- Name
CALENDARS- Description
CALENDAR_CONNECTED,CALENDAR_DELETED,CALENDAR_DISCONNECTED,CALENDAR_CONNECTION_EXPIRED,CALENDAR_CONNECTION_RECONNECTED,CALENDAR_UPDATED,CALENDAR_EVENT_CREATED,CALENDAR_EVENT_UPDATED,CALENDAR_EVENT_DELETED,PUBLIC_CALENDAR_FEED_CREATED,PUBLIC_CALENDAR_FEED_UPDATED,PUBLIC_CALENDAR_FEED_DELETED
- Name
ACCESS_CONTROL- Description
INVITATION_CREATED,INVITATION_ACCEPTED,INVITATION_DECLINED,INVITATION_REVOKED,MEMBERSHIP_CREATED,MEMBERSHIP_REMOVED,ROLE_UPDATED
- Name
BILLING- Description
PLAN_UPDATED,SUBSCRIPTION_CHANGED,SEAT_ADDED,SEAT_REMOVED
- Name
WORKFLOWS- Description
WORKFLOW_CREATED,WORKFLOW_UPDATED,WORKFLOW_DELETED
- Name
API_KEYS- Description
API_KEY_CREATED,API_KEY_REVOKED
- Name
MCP- Description
MCP_CLIENT_CREATED,MCP_CLIENT_DELETED,MCP_CLIENT_SECRET_CREATED,MCP_CLIENT_SECRET_REVOKED,MCP_REDIRECT_URI_CREATED,MCP_REDIRECT_URI_DELETED
- Name
WORKSPACE_POLICIES- Description
WORKSPACE_POLICIES_SET_UP,WORKSPACE_POLICIES_UPDATED,ALLOWED_ACCOUNT_CREATED,ALLOWED_ACCOUNT_UPDATED,ALLOWED_ACCOUNT_DELETED,CALENDAR_TEMPLATE_CREATED,CALENDAR_TEMPLATE_UPDATED,CALENDAR_TEMPLATE_DELETED,CALENDAR_TEMPLATE_CHOSEN,SYNC_TEMPLATE_CREATED,SYNC_TEMPLATE_UPDATED,SYNC_TEMPLATE_PUBLISHED,SYNC_TEMPLATE_PAUSED,SYNC_TEMPLATE_RESUMED,SYNC_TEMPLATE_DELETED
In the API, a managed sync is a syncTemplate, an allowed account is an allowedAccount, and a calendar for managed syncs is a calendarTemplate. See Workspace Policies and Managed Syncs for how they work.
Event details
The subject object
Most events include details.subject, a snapshot of the entity the action concerns, taken when the action happened. It stays meaningful even if the entity is later renamed or deleted.
- Name
type- Type
- string
- Description
The kind of entity:
syncConfig(a calendar sync),calendar,calendarConnection,bookingLink,bookingPage,publicCalendarFeed,workflow,apiKey,mcpClient,invite,user,plan,allowedAccount,calendarTemplate(a calendar for managed syncs), orsyncTemplate(a managed sync).
- Name
id- Type
- string
- Description
Optional. The entity's ID.
- Name
label- Type
- string
- Description
Optional. A human-readable name for the entity, such as the calendar sync's name or the calendar connection's email address. Up to 200 characters.
Calendar sync and calendar connection events
These four actions describe the health of calendar syncs and calendar connections. Their details shapes are stable.
- Name
SYNC_CONFIG_FAILED- Type
- SYNC_CONFIG
- Description
A calendar sync failed. A
systemaction, with the owner of the calendar sync inactor.owner.subject:typeissyncConfig,idis the calendar sync's ID,labelis its name.syncConfigId: the calendar sync's ID, same assubject.id.errorCode: why it failed. See Error codes.
{ "subject": { "type": "syncConfig", "id": "cm9y4p0aa0003l7085syncab1", "label": "Work to Personal" }, "syncConfigId": "cm9y4p0aa0003l7085syncab1", "errorCode": "CONNECTION_EXPIRED" }
- Name
SYNC_CONFIG_REPAIRED- Type
- SYNC_CONFIG
- Description
A calendar sync that was failing completed a successful sync run. A
systemaction, with the owner of the calendar sync inactor.owner.subject: same asSYNC_CONFIG_FAILED.syncConfigId: the calendar sync's ID.previousErrorCode: the error code the calendar sync had before it recovered.
{ "subject": { "type": "syncConfig", "id": "cm9y4p0aa0003l7085syncab1", "label": "Work to Personal" }, "syncConfigId": "cm9y4p0aa0003l7085syncab1", "previousErrorCode": "CONNECTION_EXPIRED" }
- Name
CALENDAR_CONNECTION_EXPIRED- Type
- CALENDARS
- Description
OneCal lost access to a calendar account. A
systemaction, with the owner of the calendar connection inactor.owner.subject:typeiscalendarConnection,idis the calendar connection's ID,labelis the calendar account's email address.provider:GOOGLE,MICROSOFT,APPLE, orCALDAV.status:INVALID_REFRESH_TOKEN(the provider rejected OneCal's access) orLOGIN_FAILED(an Apple or CalDAV sign-in failed).errorMessage: optional. The provider's own error text. It varies by provider and can change, so show it to people but don't match on it.
{ "subject": { "type": "calendarConnection", "id": "cm9y4n7tt0002l708conn1a2b", "label": "jane@example.com" }, "provider": "GOOGLE", "status": "INVALID_REFRESH_TOKEN", "errorMessage": "Token has been expired or revoked." }
- Name
CALENDAR_CONNECTION_RECONNECTED- Type
- CALENDARS
- Description
An expired calendar connection works again. When someone refreshed the calendar connection,
actoris that team member. When OneCal's access recovered on its own, it's asystemaction, with the owner of the calendar connection inactor.owner.subject: same asCALENDAR_CONNECTION_EXPIRED.provider:GOOGLE,MICROSOFT,APPLE, orCALDAV.
{ "subject": { "type": "calendarConnection", "id": "cm9y4n7tt0002l708conn1a2b", "label": "jane@example.com" }, "provider": "GOOGLE" }
Managed sync events
When a managed sync changes a team member's calendar sync, OneCal records one event per team member. These are system actions in the SYNC_CONFIG category, with the team member in actor.owner, so an actorUserId filter for that team member returns them.
- Name
SYNC_CONFIG_CREATED- Type
- SYNC_CONFIG
- Description
The managed sync created a calendar sync for the team member.
typeis the calendar sync type.
- Name
SYNC_CONFIG_MANAGED- Type
- SYNC_CONFIG
- Description
The team member already had a calendar sync between exactly the same calendars, and it became the managed sync instead of a duplicate.
changedSettingslists the settings that were replaced with the managed sync's, and is empty when nothing changed.
- Name
SYNC_CONFIG_PAUSED- Type
- SYNC_CONFIG
- Description
The managed sync was paused for everyone.
reasonisWORKSPACE_ADMIN_INITIATED.
- Name
SYNC_CONFIG_UNPAUSED- Type
- SYNC_CONFIG
- Description
The managed sync was resumed for everyone.
previousPauseReasonisWORKSPACE_ADMIN_INITIATED. Calendar syncs the team member paused themselves stay paused and get no event.
- Name
SYNC_CONFIG_DELETED- Type
- SYNC_CONFIG
- Description
The team member's calendar sync was deleted, because the managed sync was deleted together with its calendar syncs, or a calendar the managed sync uses was removed.
- Name
SYNC_CONFIG_UNMANAGED- Type
- SYNC_CONFIG
- Description
The calendar sync became the team member's own and keeps running. This happens when the managed sync is deleted while keeping its calendar syncs, when the team member leaves the team, or when their role changes to
BILLING_ONLY.
- Name
SYNC_CONFIG_NOT_CREATED- Type
- SYNC_CONFIG
- Description
OneCal couldn't create the managed sync for the team member. There is no calendar sync, so
subjectis the managed sync (typeissyncTemplate).causeis one of:sync_limit_reached: the team member is at the calendar sync limit. OneCal tries again on their next change, once they're under the limit.plan_not_allowed: the team's plan doesn't include calendar syncs.error: an unexpected error.
Each of these events carries the same fields next to subject:
- Name
subject- Type
- object
- Description
The team member's calendar sync (
typeissyncConfig), except onSYNC_CONFIG_NOT_CREATED.
- Name
syncTemplate- Type
- object
- Description
The managed sync that made the change, as a subject object with
typesyncTemplate, itsidand its name aslabel. Not set onSYNC_CONFIG_NOT_CREATED, where the managed sync is thesubject.
- Name
trigger- Type
- string
- Description
What caused the change. See the table below.
- Name
triggeredByUserId- Type
- string
- Description
Optional. The OneCal user ID of the admin or team member whose action caused the change. Not set when the change has no single person behind it, such as a team member joining or leaving the team.
trigger | Cause | Actions |
|---|---|---|
template_published | An admin published the managed sync. | SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED |
template_paused | An admin paused the managed sync for everyone. | SYNC_CONFIG_PAUSED |
template_resumed | An admin resumed the managed sync for everyone. Team members who became ready while it was paused get their calendar sync now. | SYNC_CONFIG_UNPAUSED, SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED |
template_deleted | An admin deleted the managed sync. | SYNC_CONFIG_DELETED, SYNC_CONFIG_UNMANAGED |
member_joined | The team member joined the team. | SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED |
member_left | The team member left the team. | SYNC_CONFIG_UNMANAGED |
became_billing_only | The team member's role changed to BILLING_ONLY. | SYNC_CONFIG_UNMANAGED |
role_changed | The team member's role changed from BILLING_ONLY to another role. | SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED |
calendar_connected | The team member connected a calendar the managed sync uses. | SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED |
calendar_chosen | The team member chose which of their calendars to use. | SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED |
calendar_removed | A calendar the managed sync uses was removed, by the team member or because the calendar provider no longer has it. If another of their calendars can take its place, OneCal creates the calendar sync again. | SYNC_CONFIG_DELETED, SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED |
New trigger and cause values may be added over time.
SYNC_CONFIG_CREATED details
{
"subject": { "type": "syncConfig", "id": "cmb2k8w1x0004l708mgd1sync", "label": "Personal to Dunder Mifflin" },
"syncTemplate": { "type": "syncTemplate", "id": "cmb2k7q0p0001l708tmpl0001", "label": "Personal to Dunder Mifflin" },
"trigger": "template_published",
"triggeredByUserId": "cm6a1b2c300000clb1x2y3z4w",
"type": "ONE_DIRECTIONAL"
}
SYNC_CONFIG_NOT_CREATED details
{
"subject": { "type": "syncTemplate", "id": "cmb2k7q0p0001l708tmpl0001", "label": "Personal to Dunder Mifflin" },
"trigger": "calendar_connected",
"triggeredByUserId": "cm7f3cfb000000clbc8pk5qtr",
"cause": "sync_limit_reached"
}
Workspace Policies events
Events in the WORKSPACE_POLICIES category are recorded when an admin changes Workspace Policies, with the admin as actor, except CALENDAR_TEMPLATE_CHOSEN, where the actor is the team member who chose a calendar. The fields below are added next to subject.
| Action | subject.type | Other fields |
|---|---|---|
WORKSPACE_POLICIES_SET_UP | No subject | workspaceId |
WORKSPACE_POLICIES_UPDATED | No subject | The settings that changed, with their new value: restrictCalendarConnections (Only allow accounts on this list), allowPersonalCalendar |
ALLOWED_ACCOUNT_CREATED, ALLOWED_ACCOUNT_DELETED | allowedAccount | kind (WORK or PERSONAL), provider (null for PERSONAL), domain, serverUrl (CalDAV only, otherwise empty) |
ALLOWED_ACCOUNT_UPDATED | allowedAccount | Same as ALLOWED_ACCOUNT_CREATED, plus changes |
CALENDAR_TEMPLATE_CREATED, CALENDAR_TEMPLATE_DELETED | calendarTemplate | fill (PRIMARY or MEMBER_CHOICE), allowedAccountId |
CALENDAR_TEMPLATE_UPDATED | calendarTemplate | Same as CALENDAR_TEMPLATE_CREATED, plus changes |
CALENDAR_TEMPLATE_CHOSEN | calendarTemplate | calendar, a subject object for the calendar the team member chose |
SYNC_TEMPLATE_CREATED | syncTemplate | type, the calendar sync type |
SYNC_TEMPLATE_UPDATED | syncTemplate | type, changes |
SYNC_TEMPLATE_PUBLISHED | syncTemplate | type, created, promoted, notCreated |
SYNC_TEMPLATE_PAUSED | syncTemplate | type, paused |
SYNC_TEMPLATE_RESUMED | syncTemplate | type, resumed, created, promoted, notCreated |
SYNC_TEMPLATE_DELETED | syncTemplate | type, mode (keep or delete), memberSyncCount |
changesmaps each changed field to its old and new value, for example{ "name": { "from": "Team Calendar", "to": "Scranton Calendar" } }. Only names and settings are included, never calendar event content.created,promotedandnotCreatedcount the team members who got a new calendar sync, whose existing calendar sync became the managed sync, and who couldn't get one.pausedandresumedcount the team members' calendar syncs that were paused or resumed. The counts can be missing if OneCal couldn't finish the change for everyone; the per-member events still show what happened.memberSyncCountis the number of team members' calendar syncs the managed sync had when it was deleted. Withmodedeletethey were deleted, withkeepthey became the team members' own.
SYNC_TEMPLATE_PUBLISHED details
{
"subject": { "type": "syncTemplate", "id": "cmb2k7q0p0001l708tmpl0001", "label": "Personal to Dunder Mifflin" },
"type": "ONE_DIRECTIONAL",
"created": 37,
"promoted": 4,
"notCreated": 1
}
Other actions
The fields below are added next to subject. Actions not listed here only include subject.
| Action | subject.type | Other fields |
|---|---|---|
SYNC_CONFIG_CREATED | syncConfig | type, the calendar sync type |
SYNC_CONFIG_UPDATED, SYNC_CONFIG_DELETED, SYNC_CONFIG_RE_RAN | syncConfig | None |
SYNC_CONFIG_PAUSED | syncConfig | reason, when OneCal paused the calendar sync (TRIAL_EXPIRED, REFRESH_TOKEN_EXPIRED, or WORKSPACE_ADMIN_INITIATED for a managed sync) |
SYNC_CONFIG_UNPAUSED | syncConfig | previousPauseReason, when OneCal resumed the calendar sync |
CALENDAR_CONNECTED | No subject | provider, connectedCount (number of calendars connected) |
CALENDAR_DISCONNECTED | calendarConnection | provider |
CALENDAR_DELETED | calendar | provider |
CALENDAR_UPDATED | calendar | None |
CALENDAR_EVENT_CREATED, CALENDAR_EVENT_UPDATED, CALENDAR_EVENT_DELETED | No subject | source, calendarId, eventId, provider |
LOG_IN, SSO_LOGIN | No subject | provider, the sign-in method |
OAUTH_ACCOUNT_LINKED, OAUTH_ACCOUNT_UNLINKED | No subject | provider |
EMAIL_UPDATED | No subject | oldEmail, newEmail |
IMPERSONATION_STARTED | user | actorScope |
IMPERSONATION_ENDED | user | None |
INVITATION_CREATED, INVITATION_ACCEPTED, INVITATION_DECLINED, INVITATION_REVOKED | invite, with the invited email as label | None |
MEMBERSHIP_CREATED | user | role |
MEMBERSHIP_REMOVED | user | None |
ROLE_UPDATED | user | oldRole, newRole |
PLAN_UPDATED | plan | planType, status |
SUBSCRIPTION_CHANGED | plan | event (created or cancelled), planType, status |
SEAT_ADDED, SEAT_REMOVED | No subject | planType |
API_KEY_CREATED | apiKey | accessType (FULL_ACCESS or READ_ONLY) |
MCP_CLIENT_CREATED | mcpClient | scopes, redirectUri, hasSecret |
MCP_CLIENT_SECRET_CREATED, MCP_CLIENT_SECRET_REVOKED | mcpClient | secretId |
MCP_REDIRECT_URI_CREATED, MCP_REDIRECT_URI_DELETED | mcpClient | redirectUriId, uri |
LOG_OUT, ADMIN_MANAGED_ACCOUNT_ENABLED, ADMIN_MANAGED_ACCOUNT_DISABLED, USER_IMPERSONATION_ENABLED, and USER_IMPERSONATION_DISABLED have no details (null). Fields may be added to details over time, so ignore fields you don't recognize.
Error codes
SYNC_CONFIG_FAILED events carry an errorCode, and SYNC_CONFIG_REPAIRED events carry the previousErrorCode. The Pauses column says whether OneCal pauses the calendar sync for this error. A paused calendar sync needs action: it does not run again until a team member fixes the problem. The other errors are usually temporary, and the next sync run often succeeds. For what each error means for your team members and how to fix it, see Error Messages Explained.
| Code | Meaning | Pauses |
|---|---|---|
CONNECTION_EXPIRED | The calendar provider rejected OneCal's sign-in. | Yes, when the calendar connection has expired. A one-off rejection does not pause, and the next sync run usually succeeds. |
CALENDAR_NOT_FOUND | One of the calendar sync's calendars no longer exists in the calendar account. | Yes, after it fails twice in a row on the same calendar. |
PERMISSION_DENIED | OneCal lost access to one of the calendar sync's calendars. | Sometimes. Yes when the provider says OneCal lost access to the calendar, after it fails twice in a row on the same calendar. A general "forbidden" response does not pause. |
ACCOUNT_UNAVAILABLE | The calendar account can't be used for calendars, for example because an administrator blocked OneCal or the mailbox is inactive or full. | Yes, after it fails twice in a row on the same calendar. |
RATE_LIMITED | The calendar provider is temporarily limiting requests. | Not on its own, see below. |
PROVIDER_UNAVAILABLE | The calendar provider was unavailable or returned a server error. | Not on its own, see below. |
SYNC_TOKEN_EXPIRED | The calendar provider reset its change tracking. The next sync run is a full sync. | No, temporary. |
CONFLICT | The calendar provider reported a conflict while saving an event. | No, temporary. |
INVALID_REQUEST | The calendar provider rejected a request, or an event could not be converted for the target calendar. | No. Often temporary. If it keeps coming back, contact support. |
UNKNOWN | The failure could not be classified. | No. If it keeps coming back, contact support. |
New error codes may be added over time. Treat an unknown code like UNKNOWN.
Temporary errors do not pause a calendar sync by themselves, but OneCal does not keep retrying them at full speed either. While they repeat, OneCal waits before each automatic sync run, and if they keep repeating for a long time it pauses the calendar sync. The memberships endpoint shows this state on the sync configuration: retryNotBefore is the time of the next automatic attempt, and a sync paused this way has isPaused true with pauseReason REPEATED_FAILURES. Un-pausing the calendar sync, from the dashboard or by a team member, tries again. The pause is not recorded as a separate audit log event.
When events are recorded
SYNC_CONFIG_FAILEDis recorded once per error, not once per attempt. A failing calendar sync runs again on every change, but a new event is only recorded when its error code differs from the previous failure. If the error changes, for example fromRATE_LIMITEDtoCONNECTION_EXPIRED, you get a secondSYNC_CONFIG_FAILEDwith noSYNC_CONFIG_REPAIREDin between. After the calendar sync recovers, the next failure is recorded again.SYNC_CONFIG_REPAIREDis recorded on the first successful sync run after a failure.- Automatic pauses are not recorded as
SYNC_CONFIG_PAUSED.SYNC_CONFIG_PAUSEDandSYNC_CONFIG_UNPAUSEDare recorded when a team member pauses or un-pauses a calendar sync, and when an admin pauses or resumes a managed sync for everyone. When OneCal pauses a calendar sync because of an error, look for theSYNC_CONFIG_FAILEDwith that error's code. No separate event is recorded for the pause itself. - Managed syncs record one event per team member. Publishing, pausing, resuming or deleting a managed sync records one
WORKSPACE_POLICIESevent for the admin's action, plus oneSYNC_CONFIGevent for each team member's calendar sync it changed. CALENDAR_CONNECTION_EXPIREDis recorded when a working calendar connection expires, not on every later failed attempt.CALENDAR_CONNECTION_RECONNECTEDis recorded when an expired calendar connection works again.- Events are only recorded for teams with at least two members. See Access and recording.
Monitoring sync errors
You can use audit logs to alert your team when a calendar sync or calendar connection needs attention.
Poll the endpoint
Audit logs have no webhooks, so poll the endpoint. Every 10 to 15 minutes is reasonable. On each check:
- Request events with
dateFromset to the time of your last check, anddateToset to now. Optionally addcategory=SYNC_CONFIGorcategory=CALENDARS, or make one request withoutcategoryand filter byactionyourself. - Read every page. Events are returned newest first. Keep requesting the next
pagewhilepageNumber * pageSizeis less thantotal. UsepageSize=100, the largest page size, to make fewer requests. dateFromanddateToinclude events at exactly those times, so an event can appear in two checks. Skip events whoseidyou have already handled.- Save the
dateToyou used as the starting point for the next check.
Stay within the API's rate limits.
Decide what needs action
| Event | Suggested handling |
|---|---|
CALENDAR_CONNECTION_EXPIRED | Action required. The owner (actor.owner) needs to refresh the calendar connection for details.subject.label. |
SYNC_CONFIG_FAILED with CALENDAR_NOT_FOUND, PERMISSION_DENIED, or ACCOUNT_UNAVAILABLE | Action required. The calendar sync is paused, or will be if the error repeats. |
SYNC_CONFIG_FAILED with CONNECTION_EXPIRED | Action required if a CALENDAR_CONNECTION_EXPIRED is also recorded for the same owner. Otherwise it was likely a one-off. |
SYNC_CONFIG_FAILED with any other code | Usually temporary. Alert only if no SYNC_CONFIG_REPAIRED follows for the same syncConfigId within a time you choose. If it keeps failing for a long time, OneCal pauses the calendar sync with pauseReason REPEATED_FAILURES; check the memberships endpoint and ask the owner to un-pause it once the provider has recovered. |
SYNC_CONFIG_REPAIRED | Resolve any open alert for the same syncConfigId. |
CALENDAR_CONNECTION_RECONNECTED | Resolve any open alert for the same details.subject.id. |
The team member who owns the calendar connection or calendar sync is actor.owner on events OneCal recorded automatically, and actor when they acted themselves, such as refreshing a calendar connection. Its email tells you who to contact. Use actorUserId to list all events for one team member.
Handle new values
New actions, error codes, and details fields may be added over time. Ignore actions you don't monitor, treat an unknown error code like UNKNOWN, and ignore fields you don't recognize instead of failing.
Example
A calendar connection expires and the calendar sync that uses it fails. Later the owner refreshes the calendar connection and the calendar sync recovers. Events are returned newest first, so the recovery comes first.
Request
curl -G https://app.onecal.io/api/v1/audit-logs \
-H "x-api-key: {apiKey}" \
-d dateFrom=2026-10-20T08:00:00Z \
-d dateTo=2026-10-20T12:00:00Z \
-d pageSize=100
Response
{
"pageNumber": 1,
"pageSize": 100,
"total": 4,
"data": [
{
"id": "cm9y5c2dd0007l708rep4x9yz",
"createdAt": "2026-10-20T11:42:05.318Z",
"category": "SYNC_CONFIG",
"action": "SYNC_CONFIG_REPAIRED",
"details": {
"subject": {
"type": "syncConfig",
"id": "cm9y4p0aa0003l7085syncab1",
"label": "Work to Personal"
},
"syncConfigId": "cm9y4p0aa0003l7085syncab1",
"previousErrorCode": "CONNECTION_EXPIRED"
},
"actor": {
"kind": "system",
"owner": {
"id": "cm7f3cfb000000clbc8pk5qtr",
"name": "Jane Smith",
"email": "jane@example.com"
}
},
"impersonatedBy": null
},
{
"id": "cm9y5bz8c0006l708rec3w8xy",
"createdAt": "2026-10-20T11:40:51.902Z",
"category": "CALENDARS",
"action": "CALENDAR_CONNECTION_RECONNECTED",
"details": {
"subject": {
"type": "calendarConnection",
"id": "cm9y4n7tt0002l708conn1a2b",
"label": "jane@example.com"
},
"provider": "GOOGLE"
},
"actor": {
"kind": "user",
"id": "cm7f3cfb000000clbc8pk5qtr",
"name": "Jane Smith",
"email": "jane@example.com"
},
"impersonatedBy": null
},
{
"id": "cm9y4q1bb0005l708fail2v7w",
"createdAt": "2026-10-20T08:17:33.640Z",
"category": "SYNC_CONFIG",
"action": "SYNC_CONFIG_FAILED",
"details": {
"subject": {
"type": "syncConfig",
"id": "cm9y4p0aa0003l7085syncab1",
"label": "Work to Personal"
},
"syncConfigId": "cm9y4p0aa0003l7085syncab1",
"errorCode": "CONNECTION_EXPIRED"
},
"actor": {
"kind": "system",
"owner": {
"id": "cm7f3cfb000000clbc8pk5qtr",
"name": "Jane Smith",
"email": "jane@example.com"
}
},
"impersonatedBy": null
},
{
"id": "cm9y4q0zz0004l708exp1u6v",
"createdAt": "2026-10-20T08:17:32.115Z",
"category": "CALENDARS",
"action": "CALENDAR_CONNECTION_EXPIRED",
"details": {
"subject": {
"type": "calendarConnection",
"id": "cm9y4n7tt0002l708conn1a2b",
"label": "jane@example.com"
},
"provider": "GOOGLE",
"status": "INVALID_REFRESH_TOKEN",
"errorMessage": "Token has been expired or revoked."
},
"actor": {
"kind": "system",
"owner": {
"id": "cm7f3cfb000000clbc8pk5qtr",
"name": "Jane Smith",
"email": "jane@example.com"
}
},
"impersonatedBy": null
}
]
}