Calendar Sync for Your Apps

Keep members' calendars current in your own apps: a webhook to your server, or a snapshot plus a live feed to the member's app with their own token.

Your bots put things on members' calendars: a booking, a request waiting for your answer, a reminder or a call. There are two ways to keep your own apps in step. Use either or both.

You haveUseWhat it gets
A serverA webhook (Settings, Sync API, Webhooks)Every member's changes, signed, retried for hours
Only an app, no serverThe member feed below, with the member's own tokenThat one member's calendar and its changes, live

Both carry the same events with the same ids (evt_<n>), so an app that gets both can drop repeats.

Events

  • calendar.entry_created, calendar.entry_changed (a change includes a cancellation: the entry's status is cancelled)
  • appointment.booked, .confirmed, .cancelled, .rescheduled, .requested, .declined, .expired and the other booking events

Each change carries the whole entry (data.entry) or appointment (data.appointment), so you never need a second call. An entry's data field holds whatever ids your app gave it, such as an order id or a project id.

The member feed (no server needed)

Sign the member in as you do now, then trade their sign-in for a token bound to them: POST /api/v1/chat/token with the bot's public id (a published bot) and their sign-in token (see the chat session token in Tokens and credentials). It lasts an hour; on a 401, refresh the sign-in and trade again. That token only ever reaches this member's calendar. For a member signed in with Oalo, that's the calendar of their own verified email (or phone): an email typed in a chat never changes whose calendar it is.

1. Take a snapshot.

GET /api/v1/chat/calendar?from=2026-11-01&to=2026-12-01
Authorization: Bearer <member token>

Returns items (entries and appointments, sorted by start), timezone, and a cursor. from and to take a date or an ISO time. Without them you get 60 days starting a week ago; at most 120 days at a time.

2. Follow the changes from that cursor. Pick one:

  • SSE: GET /api/v1/chat/calendar/stream?since=<cursor>. Each change frame's id is its cursor, so a reconnect resumes with Last-Event-ID. A ready frame follows the catch-up, ping comes after 15 quiet seconds, and gap means too much was missed (more than 1,000 changes): take a new snapshot. A browser EventSource can't send an Authorization header, so read the stream with fetch or use the channel.
  • Phoenix channel: connect to /chat-api-ws with {token}, join chat:api:calendar with {since: <cursor>}, and listen for change and gap.
  • Polling (for a phone app waking in the background): GET /api/v1/chat/calendar/changes?since=<cursor> returns changes, the next cursor, and has_more.

Keep the last cursor you handled and start from it next time.

A server token works on these too. It then names the member with external_ref=<their app user id>.

Changing the calendar from the app

The app writes through the bot's calendar tool on the member's conversation. Open one with POST /api/v1/chat/conversations (the member token names the member), then POST /api/v1/chat/conversations/:id/widget/call_tool with {"tool_name": "calendar", "args": {"action": "add", "title": "Leg day", "start": "2026-11-24"}}. The actions are view, add, update, cancel and done; times are the member's local time. Turn the calendar tool on for the bot first. The change then reaches the feed and your webhooks like any other.

Try it on your own Base

Sign up, install the CLI, and deploy your repo in a few minutes.

bring your repo