iCal Subscriptions
Import events from external calendars (Google Calendar, Outlook, etc.) into Chronary calendars. Imported events are read-only and block availability.
Create a subscription
Section titled “Create a subscription”POST /v1/agents/:agent_id/ical-subscriptionsRequest body
Section titled “Request body”| 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) |
Example
Section titled “Example”curl -X POST https://api.chronary.ai/v1/agents/agt_a1b2c3d4/ical-subscriptions \ -H "Authorization: Bearer chr_sk_test_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" }'Response 201 Created
Section titled “Response 201 Created”{ "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"}Errors
Section titled “Errors”| 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 |
List subscriptions
Section titled “List subscriptions”GET /v1/agents/:agent_id/ical-subscriptionsQuery parameters
Section titled “Query parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
status | string | — | Filter by active, error, or paused |
limit | integer | 50 | 1–200 |
offset | integer | 0 | Pagination offset |
Example
Section titled “Example”curl "https://api.chronary.ai/v1/agents/agt_a1b2c3d4/ical-subscriptions?status=active" \ -H "Authorization: Bearer chr_sk_test_your_key_here"Get a subscription
Section titled “Get a subscription”GET /v1/ical-subscriptions/:idErrors
Section titled “Errors”| Status | Type | Cause |
|---|---|---|
404 | not_found | Subscription not found |
Update a subscription
Section titled “Update a subscription”PATCH /v1/ical-subscriptions/:idRequest body
Section titled “Request body”| Field | Type | Description |
|---|---|---|
label | string | 1–255 characters |
url | string | Must be HTTPS |
At least one field must be provided.
Errors
Section titled “Errors”| Status | Type | Cause |
|---|---|---|
404 | not_found | Subscription not found |
422 | validation_error | Invalid URL format |
Trigger manual sync
Section titled “Trigger manual sync”POST /v1/ical-subscriptions/:id/syncForces an immediate sync of the external feed. Returns 202 Accepted — the sync runs asynchronously.
Example
Section titled “Example”curl -X POST https://api.chronary.ai/v1/ical-subscriptions/isub_a1b2c3/sync \ -H "Authorization: Bearer chr_sk_test_your_key_here"Response 202 Accepted
Section titled “Response 202 Accepted”{ "status": "syncing" }Errors
Section titled “Errors”| Status | Type | Cause |
|---|---|---|
404 | not_found | Subscription not found |
Delete a subscription
Section titled “Delete a subscription”DELETE /v1/ical-subscriptions/:idReturns 204 No Content. Previously imported events remain in the calendar.
Errors
Section titled “Errors”| Status | Type | Cause |
|---|---|---|
404 | not_found | Subscription not found |