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, or BILLING_ONLY role can access audit logs. Other roles get a FORBIDDEN error. 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, or SYNC_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 as errorCode on SYNC_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, and email. name and email can be null.

    { "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, with id, name, and email. owner is null for 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 actorUserId filter.

    { "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 name and email.

    { "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.


GET/v1/audit-logs

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 to 1.

  • Name
    pageSize
    Type
    integer
    Description

    The number of events to return per page, between 1 and 100. Defaults to 100.

  • 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:00Z or 2026-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 to 23:59:59.999 UTC. Must not be earlier than dateFrom.

Request

GET
/v1/audit-logs
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), or syncTemplate (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 system action, with the owner of the calendar sync in actor.owner.

    • subject: type is syncConfig, id is the calendar sync's ID, label is its name.
    • syncConfigId: the calendar sync's ID, same as subject.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 system action, with the owner of the calendar sync in actor.owner.

    • subject: same as SYNC_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 system action, with the owner of the calendar connection in actor.owner.

    • subject: type is calendarConnection, id is the calendar connection's ID, label is the calendar account's email address.
    • provider: GOOGLE, MICROSOFT, APPLE, or CALDAV.
    • status: INVALID_REFRESH_TOKEN (the provider rejected OneCal's access) or LOGIN_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, actor is that team member. When OneCal's access recovered on its own, it's a system action, with the owner of the calendar connection in actor.owner.

    • subject: same as CALENDAR_CONNECTION_EXPIRED.
    • provider: GOOGLE, MICROSOFT, APPLE, or CALDAV.
    {
      "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. type is 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. changedSettings lists 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. reason is WORKSPACE_ADMIN_INITIATED.

  • Name
    SYNC_CONFIG_UNPAUSED
    Type
    SYNC_CONFIG
    Description

    The managed sync was resumed for everyone. previousPauseReason is WORKSPACE_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 subject is the managed sync (type is syncTemplate). cause is 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 (type is syncConfig), except on SYNC_CONFIG_NOT_CREATED.

  • Name
    syncTemplate
    Type
    object
    Description

    The managed sync that made the change, as a subject object with type syncTemplate, its id and its name as label. Not set on SYNC_CONFIG_NOT_CREATED, where the managed sync is the subject.

  • 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.

triggerCauseActions
template_publishedAn admin published the managed sync.SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED
template_pausedAn admin paused the managed sync for everyone.SYNC_CONFIG_PAUSED
template_resumedAn 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_deletedAn admin deleted the managed sync.SYNC_CONFIG_DELETED, SYNC_CONFIG_UNMANAGED
member_joinedThe team member joined the team.SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED
member_leftThe team member left the team.SYNC_CONFIG_UNMANAGED
became_billing_onlyThe team member's role changed to BILLING_ONLY.SYNC_CONFIG_UNMANAGED
role_changedThe team member's role changed from BILLING_ONLY to another role.SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED
calendar_connectedThe team member connected a calendar the managed sync uses.SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED
calendar_chosenThe team member chose which of their calendars to use.SYNC_CONFIG_CREATED, SYNC_CONFIG_MANAGED, SYNC_CONFIG_NOT_CREATED
calendar_removedA 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.

Actionsubject.typeOther fields
WORKSPACE_POLICIES_SET_UPNo subjectworkspaceId
WORKSPACE_POLICIES_UPDATEDNo subjectThe settings that changed, with their new value: restrictCalendarConnections (Only allow accounts on this list), allowPersonalCalendar
ALLOWED_ACCOUNT_CREATED, ALLOWED_ACCOUNT_DELETEDallowedAccountkind (WORK or PERSONAL), provider (null for PERSONAL), domain, serverUrl (CalDAV only, otherwise empty)
ALLOWED_ACCOUNT_UPDATEDallowedAccountSame as ALLOWED_ACCOUNT_CREATED, plus changes
CALENDAR_TEMPLATE_CREATED, CALENDAR_TEMPLATE_DELETEDcalendarTemplatefill (PRIMARY or MEMBER_CHOICE), allowedAccountId
CALENDAR_TEMPLATE_UPDATEDcalendarTemplateSame as CALENDAR_TEMPLATE_CREATED, plus changes
CALENDAR_TEMPLATE_CHOSENcalendarTemplatecalendar, a subject object for the calendar the team member chose
SYNC_TEMPLATE_CREATEDsyncTemplatetype, the calendar sync type
SYNC_TEMPLATE_UPDATEDsyncTemplatetype, changes
SYNC_TEMPLATE_PUBLISHEDsyncTemplatetype, created, promoted, notCreated
SYNC_TEMPLATE_PAUSEDsyncTemplatetype, paused
SYNC_TEMPLATE_RESUMEDsyncTemplatetype, resumed, created, promoted, notCreated
SYNC_TEMPLATE_DELETEDsyncTemplatetype, mode (keep or delete), memberSyncCount
  • changes maps 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, promoted and notCreated count the team members who got a new calendar sync, whose existing calendar sync became the managed sync, and who couldn't get one. paused and resumed count 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.
  • memberSyncCount is the number of team members' calendar syncs the managed sync had when it was deleted. With mode delete they were deleted, with keep they 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.

Actionsubject.typeOther fields
SYNC_CONFIG_CREATEDsyncConfigtype, the calendar sync type
SYNC_CONFIG_UPDATED, SYNC_CONFIG_DELETED, SYNC_CONFIG_RE_RANsyncConfigNone
SYNC_CONFIG_PAUSEDsyncConfigreason, when OneCal paused the calendar sync (TRIAL_EXPIRED, REFRESH_TOKEN_EXPIRED, or WORKSPACE_ADMIN_INITIATED for a managed sync)
SYNC_CONFIG_UNPAUSEDsyncConfigpreviousPauseReason, when OneCal resumed the calendar sync
CALENDAR_CONNECTEDNo subjectprovider, connectedCount (number of calendars connected)
CALENDAR_DISCONNECTEDcalendarConnectionprovider
CALENDAR_DELETEDcalendarprovider
CALENDAR_UPDATEDcalendarNone
CALENDAR_EVENT_CREATED, CALENDAR_EVENT_UPDATED, CALENDAR_EVENT_DELETEDNo subjectsource, calendarId, eventId, provider
LOG_IN, SSO_LOGINNo subjectprovider, the sign-in method
OAUTH_ACCOUNT_LINKED, OAUTH_ACCOUNT_UNLINKEDNo subjectprovider
EMAIL_UPDATEDNo subjectoldEmail, newEmail
IMPERSONATION_STARTEDuseractorScope
IMPERSONATION_ENDEDuserNone
INVITATION_CREATED, INVITATION_ACCEPTED, INVITATION_DECLINED, INVITATION_REVOKEDinvite, with the invited email as labelNone
MEMBERSHIP_CREATEDuserrole
MEMBERSHIP_REMOVEDuserNone
ROLE_UPDATEDuseroldRole, newRole
PLAN_UPDATEDplanplanType, status
SUBSCRIPTION_CHANGEDplanevent (created or cancelled), planType, status
SEAT_ADDED, SEAT_REMOVEDNo subjectplanType
API_KEY_CREATEDapiKeyaccessType (FULL_ACCESS or READ_ONLY)
MCP_CLIENT_CREATEDmcpClientscopes, redirectUri, hasSecret
MCP_CLIENT_SECRET_CREATED, MCP_CLIENT_SECRET_REVOKEDmcpClientsecretId
MCP_REDIRECT_URI_CREATED, MCP_REDIRECT_URI_DELETEDmcpClientredirectUriId, 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.

CodeMeaningPauses
CONNECTION_EXPIREDThe 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_FOUNDOne 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_DENIEDOneCal 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_UNAVAILABLEThe 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_LIMITEDThe calendar provider is temporarily limiting requests.Not on its own, see below.
PROVIDER_UNAVAILABLEThe calendar provider was unavailable or returned a server error.Not on its own, see below.
SYNC_TOKEN_EXPIREDThe calendar provider reset its change tracking. The next sync run is a full sync.No, temporary.
CONFLICTThe calendar provider reported a conflict while saving an event.No, temporary.
INVALID_REQUESTThe 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.
UNKNOWNThe 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_FAILED is 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 from RATE_LIMITED to CONNECTION_EXPIRED, you get a second SYNC_CONFIG_FAILED with no SYNC_CONFIG_REPAIRED in between. After the calendar sync recovers, the next failure is recorded again.
  • SYNC_CONFIG_REPAIRED is recorded on the first successful sync run after a failure.
  • Automatic pauses are not recorded as SYNC_CONFIG_PAUSED. SYNC_CONFIG_PAUSED and SYNC_CONFIG_UNPAUSED are 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 the SYNC_CONFIG_FAILED with 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_POLICIES event for the admin's action, plus one SYNC_CONFIG event for each team member's calendar sync it changed.
  • CALENDAR_CONNECTION_EXPIRED is recorded when a working calendar connection expires, not on every later failed attempt. CALENDAR_CONNECTION_RECONNECTED is 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:

  1. Request events with dateFrom set to the time of your last check, and dateTo set to now. Optionally add category=SYNC_CONFIG or category=CALENDARS, or make one request without category and filter by action yourself.
  2. Read every page. Events are returned newest first. Keep requesting the next page while pageNumber * pageSize is less than total. Use pageSize=100, the largest page size, to make fewer requests.
  3. dateFrom and dateTo include events at exactly those times, so an event can appear in two checks. Skip events whose id you have already handled.
  4. Save the dateTo you used as the starting point for the next check.

Stay within the API's rate limits.

Decide what needs action

EventSuggested handling
CALENDAR_CONNECTION_EXPIREDAction 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_UNAVAILABLEAction required. The calendar sync is paused, or will be if the error repeats.
SYNC_CONFIG_FAILED with CONNECTION_EXPIREDAction 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 codeUsually 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_REPAIREDResolve any open alert for the same syncConfigId.
CALENDAR_CONNECTION_RECONNECTEDResolve 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

GET
/v1/audit-logs
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
    }
  ]
}

Was this page helpful?