Calendar feeds API
Other calendars shown in Day and Week, and your tasks as a calendar that calendar apps subscribe to.
Implementation notes
Other calendars shown in Day and Week, and your tasks as a calendar that calendar apps subscribe to (OpenSpec calendar-feeds). Everything here answers 404 feeds_disabled while the owner's switch is off, and 403 demo_restricted on the public demo. Read and agent tokens may use the GET routes only (403 insufficient_scope otherwise).
- GET
/api/v1/calendar-feeds/events - GET
/api/v1/calendar-feeds/feed - POST
/api/v1/calendar-feeds/feed - DELETE
/api/v1/calendar-feeds/feed - GET
/api/v1/calendar-feeds/subscriptions - POST
/api/v1/calendar-feeds/subscriptions - PATCH
/api/v1/calendar-feeds/subscriptions/{id} - DELETE
/api/v1/calendar-feeds/subscriptions/{id} - POST
/api/v1/calendar-feeds/subscriptions/{id}/refresh - GET
/api/v1/settings/calendar-feeds - PUT
/api/v1/settings/calendar-feeds
GET /api/v1/calendar-feeds/events
List calendar feeds events · Token or session
at most 92 days; {events: [{id, subscriptionId, uid, summary, location, start, end, allDay, free, rev?, access?, changedBy?}], subscriptions: [{id, name, color, enabled, lastSuccessAt, managed?, connectionId?, calendarUrl?, caps?, editEvents?}]} (managed: a calendar of a calendar sync connection, which also carries connectionId, calendarUrl, caps and editEvents; its events carry rev, the version to send with a change, access: {update, delete, reason?} (Calendar events) and, while an assistant's change can be undone, changedBy: {kind: "assistant", name}); answers while calendar feeds or calendar sync is on; start and end are shaped like a task's due ({date, time?, tz?}; no tz means floating)
| Field | Type | Description |
|---|---|---|
events required | array of object | |
events[].access | object | null | |
events[].access.delete required | boolean | |
events[].access.reason | string | |
events[].access.update required | boolean | |
events[].allDay required | boolean | |
events[].changedBy | object | null | |
events[].changedBy.kind required | string | |
events[].changedBy.name required | string | |
events[].end required | object | |
events[].end.date required | string | |
events[].end.time | string | null | |
events[].end.tz | string | null | |
events[].free required | boolean | |
events[].id required | string | |
events[].location required | string | |
events[].rev | string | |
events[].start required | object | |
events[].start.date required | string | |
events[].start.time | string | null | |
events[].start.tz | string | null | |
events[].subscriptionId required | string | |
events[].summary required | string | |
events[].uid required | string | |
subscriptions required | array of object | |
subscriptions[].calendarUrl | string | |
subscriptions[].caps | object | |
subscriptions[].caps.create required | boolean | |
subscriptions[].caps.delete required | boolean | |
subscriptions[].caps.update required | boolean | |
subscriptions[].color required | string | |
subscriptions[].connectionId | string | |
subscriptions[].editEvents | boolean | |
subscriptions[].enabled required | boolean | |
subscriptions[].id required | string | |
subscriptions[].lastSuccessAt required | number | null | |
subscriptions[].managed | boolean | |
subscriptions[].name required | string |
GET /api/v1/calendar-feeds/feed
Get calendar feeds feed · Token or session
{feed: {createdAt, lastUsedAt} | null}
| Field | Type | Description |
|---|---|---|
feed required | object | null | |
feed.createdAt required | number | |
feed.lastUsedAt required | number | null |
POST /api/v1/calendar-feeds/feed
Calendar feeds feed · Token or session
create or replace the feed URL: 201 {feed, url}, the only time the URL is shown; recorded as calendar_feed.created or calendar_feed.rotated
Needs a recently confirmed session or second factor.
| Field | Type | Description |
|---|---|---|
feed required | object | null | |
feed.createdAt required | number | |
feed.lastUsedAt required | number | null | |
url required | string |
DELETE /api/v1/calendar-feeds/feed
Delete calendar feeds feed · Token or session
204, 404 when there is none; recorded as calendar_feed.revoked
GET /api/v1/calendar-feeds/subscriptions
List calendar feeds subscriptions · Token or session
{subscriptions: [...]} with status: name, color, enabled, eventCount, lastSuccessAt, lastError (timeout, http_404, too_large, invalid_calendar, private_target, …), stoppedReason, warnings
| Field | Type | Description |
|---|---|---|
subscriptions required | array of object | |
subscriptions[].color required | string | |
subscriptions[].createdAt required | number | |
subscriptions[].enabled required | boolean | |
subscriptions[].eventCount required | number | |
subscriptions[].id required | string | |
subscriptions[].intervalSeconds required | number | |
subscriptions[].lastError required | string | |
subscriptions[].lastFetchAt required | number | null | |
subscriptions[].lastSuccessAt required | number | null | |
subscriptions[].name required | string | |
subscriptions[].nextFetchAt required | number | |
subscriptions[].refreshSeconds required | number | null | |
subscriptions[].stoppedReason required | string | |
subscriptions[].updatedAt required | number | |
subscriptions[].url required | string | |
subscriptions[].warnings required | array of string |
POST /api/v1/calendar-feeds/subscriptions
Create a calendar feeds subscription · Token or session
{url, name?, color?}; webcal:// is read as https://; the address must not be on a private network unless the owner allows private targets for webhooks (400 private_target); at most 10 per account (400 limit_reached); fetched once before answering 201 {subscription}
| Field | Type | Description |
|---|---|---|
color | string | null | |
enabled | boolean | null | |
name | string | null | |
url | string | null |
| Field | Type | Description |
|---|---|---|
subscription required | object | null | |
subscription.color required | string | |
subscription.createdAt required | number | |
subscription.enabled required | boolean | |
subscription.eventCount required | number | |
subscription.id required | string | |
subscription.intervalSeconds required | number | |
subscription.lastError required | string | |
subscription.lastFetchAt required | number | null | |
subscription.lastSuccessAt required | number | null | |
subscription.name required | string | |
subscription.nextFetchAt required | number | |
subscription.refreshSeconds required | number | null | |
subscription.stoppedReason required | string | |
subscription.updatedAt required | number | |
subscription.url required | string | |
subscription.warnings required | array of string |
PATCH /api/v1/calendar-feeds/subscriptions/{id}
Update a calendar feeds subscription · Token or session
{url?, name?, color?, enabled?}; a new URL is checked and fetched; enabled: true restarts a subscription stopped for a private target
| Field | Type | Description |
|---|---|---|
id required | string | path |
| Field | Type | Description |
|---|---|---|
color | string | null | |
enabled | boolean | null | |
name | string | null | |
url | string | null |
| Field | Type | Description |
|---|---|---|
subscription required | object | null | |
subscription.color required | string | |
subscription.createdAt required | number | |
subscription.enabled required | boolean | |
subscription.eventCount required | number | |
subscription.id required | string | |
subscription.intervalSeconds required | number | |
subscription.lastError required | string | |
subscription.lastFetchAt required | number | null | |
subscription.lastSuccessAt required | number | null | |
subscription.name required | string | |
subscription.nextFetchAt required | number | |
subscription.refreshSeconds required | number | null | |
subscription.stoppedReason required | string | |
subscription.updatedAt required | number | |
subscription.url required | string | |
subscription.warnings required | array of string |
DELETE /api/v1/calendar-feeds/subscriptions/{id}
Delete a calendar feeds subscription · Token or session
204, its events go with it
| Field | Type | Description |
|---|---|---|
id required | string | path |
POST /api/v1/calendar-feeds/subscriptions/{id}/refresh
Calendar feeds subscription refresh · Token or session
fetch now, 200 {subscription}
| Field | Type | Description |
|---|---|---|
id required | string | path |
| Field | Type | Description |
|---|---|---|
subscription required | object | null | |
subscription.color required | string | |
subscription.createdAt required | number | |
subscription.enabled required | boolean | |
subscription.eventCount required | number | |
subscription.id required | string | |
subscription.intervalSeconds required | number | |
subscription.lastError required | string | |
subscription.lastFetchAt required | number | null | |
subscription.lastSuccessAt required | number | null | |
subscription.name required | string | |
subscription.nextFetchAt required | number | |
subscription.refreshSeconds required | number | null | |
subscription.stoppedReason required | string | |
subscription.updatedAt required | number | |
subscription.url required | string | |
subscription.warnings required | array of string |
GET /api/v1/settings/calendar-feeds
List settings calendar feeds · Token or session
{enabled}; off by default, OPENTODO_CALENDAR_FEEDS=true presets it on first start; a change is recorded as settings.changed
| Field | Type | Description |
|---|---|---|
enabled required | boolean |
PUT /api/v1/settings/calendar-feeds
Update settings calendar feeds · Token or session
{enabled}; off by default, OPENTODO_CALENDAR_FEEDS=true presets it on first start; a change is recorded as settings.changed
Only the server's owner.
| Field | Type | Description |
|---|---|---|
enabled required | boolean |
| Field | Type | Description |
|---|---|---|
enabled required | boolean |