Skip to content

iCal Subscriptions API

Import events from external calendars (Google Calendar, Outlook, etc.) into Chronary calendars. Imported events are read-only and block availability.

iCal subscriptions start on Developer or Pro. Free includes 0 iCal subscriptions: creating one returns 429 quota_exceeded.

  • A feed can be up to 2 MB.
  • A response must be a complete iCalendar document, from BEGIN:VCALENDAR to END:VCALENDAR. Anything else (a sign-in or maintenance page, an empty or cut-off response) counts as a failed sync: the events imported last time stay, and last_error says the feed is not a complete iCalendar document. A complete calendar with no events clears the imported events.
  • Two failed syncs in a row (for any reason: an HTTP error, an unreachable host, or a response that is not a complete calendar) set the subscription’s status to error, and scheduled polls stop. The events imported last time stay. A manual sync that reaches the feed, or POST /v1/ical-subscriptions/:id/resume, returns it to scheduled polling.
  • Only events that ended within the past year, or start within the next five years, are imported.
  • A feed can import up to 5,000 events within that window. If its one-off events alone are more than that, the feed imports nothing, and its last_error says it has too many events. Edited instances of a recurring event (RECURRENCE-ID) count as one-off events and follow the one-off window above. Recurring occurrences fill the room left: upcoming ones first, then the most recent past ones.
  • A recurring event is imported as one busy block per occurrence, from 30 days back to at least 180 days ahead. The window moves forward every week. A repeat pattern Chronary can’t expand imports its first occurrence only.
  • Free events (TRANSP:TRANSPARENT, Outlook’s “Show as: Free”) and cancelled events don’t block time and aren’t imported.
  • An event with an invalid start or end, or an end before its start, is skipped. The rest of the feed is still imported.
  • An imported event that drops out of its feed is removed from the calendar at once and deleted for good 30 days later.
  • Imported events don’t count toward your monthly events quota. They are busy blocks only (no title or description), and the limits above plus your plan’s subscription limit already bound them.
POST /v1/agents/:agent_id/ical-subscriptions
FieldTypeRequiredDescription
calendar_idstringYesTarget calendar to import events into
urlstringYesHTTPS URL of the .ics feed
labelstringNoHuman-readable label (1–255 characters)
Terminal window
curl -X POST https://api.chronary.ai/v1/agents/agt_a1b2c3d4/ical-subscriptions \
-H "Authorization: Bearer chr_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"calendar_id": "cal_x1y2z3",
"url": "https://calendar.google.com/calendar/ical/user%40gmail.com/basic.ics",
"label": "Team Google Calendar"
}'
{
"id": "ics_a1b2c3",
"agent_id": "agt_a1b2c3d4",
"calendar_id": "cal_x1y2z3",
"url": "https://calendar.google.com/calendar/ical/user%40gmail.com/basic.ics",
"label": "Team Google Calendar",
"status": "active",
"last_synced_at": null,
"last_error": null,
"created_at": "2026-04-04T12:00:00Z"
}
StatusTypeCause
429quota_exceededSubscription limit reached
404not_foundAgent or calendar not found
400validation_errorURL not HTTPS or invalid format, or the calendar does not belong to the agent
409agent_inactiveThe agent is decommissioned, so its calendar is read-only

GET /v1/agents/:agent_id/ical-subscriptions
ParameterTypeDefaultDescription
statusstring—Filter by active, error, or paused
limitinteger501–200
offsetinteger0Pagination offset, at most 10,000

Returns 404 not_found when the agent doesn’t exist or belongs to another organization; an agent with no subscriptions returns an empty list.

Terminal window
curl "https://api.chronary.ai/v1/agents/agt_a1b2c3d4/ical-subscriptions?status=active" \
-H "Authorization: Bearer chr_sk_your_key_here"

GET /v1/ical-subscriptions/:id
StatusTypeCause
404not_foundSubscription not found

PATCH /v1/ical-subscriptions/:id
FieldTypeDescription
labelstring1–255 characters
urlstringMust be HTTPS

At least one field must be provided.

StatusTypeCause
404not_foundSubscription not found
400validation_errorInvalid URL format
409agent_inactiveThe subscription’s agent is decommissioned, so its calendar is read-only

POST /v1/ical-subscriptions/:id/sync

Starts an immediate fetch of the external feed instead of waiting for the next scheduled poll. Returns 202 Accepted as soon as the fetch has started; read the subscription (or the agent’s subscription list) a few seconds later, and last_synced_at or last_error shows the outcome. One manual sync per feed per minute on paid plans, and per 15 minutes on Free (the same as the scheduled poll).

Terminal window
curl -X POST https://api.chronary.ai/v1/ical-subscriptions/ics_a1b2c3/sync \
-H "Authorization: Bearer chr_sk_your_key_here"
{ "status": "syncing" }
StatusTypeCause
404not_foundSubscription not found
409conflictThe feed is paused. Resume it before syncing
409agent_inactiveThe subscription’s agent is decommissioned, so its calendar is read-only
429rate_limit_errorA sync for this feed started recently. Retry-After gives the seconds left (up to 60 on paid plans, 900 on Free)

POST /v1/ical-subscriptions/:id/pause

Stops polling the feed: scheduled polls skip it, and manual syncs return 409 until it is resumed. Busy blocks already imported stay on the calendar. Pausing a paused subscription changes nothing. Returns 200 OK with the subscription ("status": "paused").

Terminal window
curl -X POST https://api.chronary.ai/v1/ical-subscriptions/ics_a1b2c3/pause \
-H "Authorization: Bearer chr_sk_your_key_here"
StatusTypeCause
403forbiddenAn Agent key for another agent
404not_foundSubscription not found

POST /v1/ical-subscriptions/:id/resume

Returns a paused or failing subscription to scheduled polling and clears last_error. Resuming an active subscription changes nothing. Returns 200 OK with the subscription ("status": "active").

Terminal window
curl -X POST https://api.chronary.ai/v1/ical-subscriptions/ics_a1b2c3/resume \
-H "Authorization: Bearer chr_sk_your_key_here"
StatusTypeCause
403forbiddenAn Agent key for another agent
404not_foundSubscription not found
409agent_inactiveThe subscription’s agent is decommissioned, so its calendar is read-only

DELETE /v1/ical-subscriptions/:id

Returns 204 No Content. Previously imported events remain in the calendar.

StatusTypeCause
404not_foundSubscription not found