Skip to content

iCal Subscriptions

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

POST /v1/agents/:agent_id/ical-subscriptions

| Field | Type | Required | Description | |-------|------|----------|-------------| | calendar_id | string | Yes | Target calendar to import events into | | url | string | Yes | HTTPS URL of the .ics feed | | label | string | No | Human-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": "isub_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,
"created_at": "2026-04-04T12:00:00Z"
}

| Status | Type | Cause | |--------|------|-------| | 402 | quota_exceeded | Subscription limit reached | | 404 | not_found | Agent or calendar not found | | 422 | validation_error | URL not HTTPS or invalid format |


GET /v1/agents/:agent_id/ical-subscriptions

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | status | string | — | Filter by active, error, or paused | | limit | integer | 50 | 1–200 | | offset | integer | 0 | Pagination offset |

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

| Status | Type | Cause | |--------|------|-------| | 404 | not_found | Subscription not found |


PATCH /v1/ical-subscriptions/:id

| Field | Type | Description | |-------|------|-------------| | label | string | 1–255 characters | | url | string | Must be HTTPS |

At least one field must be provided.

| Status | Type | Cause | |--------|------|-------| | 404 | not_found | Subscription not found | | 422 | validation_error | Invalid URL format |


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

Forces an immediate sync of the external feed. Returns 202 Accepted — the sync runs asynchronously.

Terminal window
curl -X POST https://api.chronary.ai/v1/ical-subscriptions/isub_a1b2c3/sync \
-H "Authorization: Bearer chr_sk_your_key_here"
{ "status": "syncing" }

| Status | Type | Cause | |--------|------|-------| | 404 | not_found | Subscription not found |


DELETE /v1/ical-subscriptions/:id

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

| Status | Type | Cause | |--------|------|-------| | 404 | not_found | Subscription not found |