5 minutes to help shape OpenTodo. Anonymous, no account. Take the survey

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

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)

Response 200
FieldTypeDescription
events requiredarray of object
events[].accessobject | null
events[].access.delete requiredboolean
events[].access.reasonstring
events[].access.update requiredboolean
events[].allDay requiredboolean
events[].changedByobject | null
events[].changedBy.kind requiredstring
events[].changedBy.name requiredstring
events[].end requiredobject
events[].end.date requiredstring
events[].end.timestring | null
events[].end.tzstring | null
events[].free requiredboolean
events[].id requiredstring
events[].location requiredstring
events[].revstring
events[].start requiredobject
events[].start.date requiredstring
events[].start.timestring | null
events[].start.tzstring | null
events[].subscriptionId requiredstring
events[].summary requiredstring
events[].uid requiredstring
subscriptions requiredarray of object
subscriptions[].calendarUrlstring
subscriptions[].capsobject
subscriptions[].caps.create requiredboolean
subscriptions[].caps.delete requiredboolean
subscriptions[].caps.update requiredboolean
subscriptions[].color requiredstring
subscriptions[].connectionIdstring
subscriptions[].editEventsboolean
subscriptions[].enabled requiredboolean
subscriptions[].id requiredstring
subscriptions[].lastSuccessAt requirednumber | null
subscriptions[].managedboolean
subscriptions[].name requiredstring

GET /api/v1/calendar-feeds/feed

Get calendar feeds feed · Token or session

{feed: {createdAt, lastUsedAt} | null}

Response 200
FieldTypeDescription
feed requiredobject | null
feed.createdAt requirednumber
feed.lastUsedAt requirednumber | 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.

Response 201
FieldTypeDescription
feed requiredobject | null
feed.createdAt requirednumber
feed.lastUsedAt requirednumber | null
url requiredstring

DELETE /api/v1/calendar-feeds/feed

Delete calendar feeds feed · Token or session

204, 404 when there is none; recorded as calendar_feed.revoked

Response 200: OK

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

Response 200
FieldTypeDescription
subscriptions requiredarray of object
subscriptions[].color requiredstring
subscriptions[].createdAt requirednumber
subscriptions[].enabled requiredboolean
subscriptions[].eventCount requirednumber
subscriptions[].id requiredstring
subscriptions[].intervalSeconds requirednumber
subscriptions[].lastError requiredstring
subscriptions[].lastFetchAt requirednumber | null
subscriptions[].lastSuccessAt requirednumber | null
subscriptions[].name requiredstring
subscriptions[].nextFetchAt requirednumber
subscriptions[].refreshSeconds requirednumber | null
subscriptions[].stoppedReason requiredstring
subscriptions[].updatedAt requirednumber
subscriptions[].url requiredstring
subscriptions[].warnings requiredarray 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}

Request body
FieldTypeDescription
colorstring | null
enabledboolean | null
namestring | null
urlstring | null
Response 201
FieldTypeDescription
subscription requiredobject | null
subscription.color requiredstring
subscription.createdAt requirednumber
subscription.enabled requiredboolean
subscription.eventCount requirednumber
subscription.id requiredstring
subscription.intervalSeconds requirednumber
subscription.lastError requiredstring
subscription.lastFetchAt requirednumber | null
subscription.lastSuccessAt requirednumber | null
subscription.name requiredstring
subscription.nextFetchAt requirednumber
subscription.refreshSeconds requirednumber | null
subscription.stoppedReason requiredstring
subscription.updatedAt requirednumber
subscription.url requiredstring
subscription.warnings requiredarray 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

Path parameters
FieldTypeDescription
id requiredstringpath
Request body
FieldTypeDescription
colorstring | null
enabledboolean | null
namestring | null
urlstring | null
Response 200
FieldTypeDescription
subscription requiredobject | null
subscription.color requiredstring
subscription.createdAt requirednumber
subscription.enabled requiredboolean
subscription.eventCount requirednumber
subscription.id requiredstring
subscription.intervalSeconds requirednumber
subscription.lastError requiredstring
subscription.lastFetchAt requirednumber | null
subscription.lastSuccessAt requirednumber | null
subscription.name requiredstring
subscription.nextFetchAt requirednumber
subscription.refreshSeconds requirednumber | null
subscription.stoppedReason requiredstring
subscription.updatedAt requirednumber
subscription.url requiredstring
subscription.warnings requiredarray of string

DELETE /api/v1/calendar-feeds/subscriptions/{id}

Delete a calendar feeds subscription · Token or session

204, its events go with it

Path parameters
FieldTypeDescription
id requiredstringpath

Response 200: OK

POST /api/v1/calendar-feeds/subscriptions/{id}/refresh

Calendar feeds subscription refresh · Token or session

fetch now, 200 {subscription}

Path parameters
FieldTypeDescription
id requiredstringpath
Response 200
FieldTypeDescription
subscription requiredobject | null
subscription.color requiredstring
subscription.createdAt requirednumber
subscription.enabled requiredboolean
subscription.eventCount requirednumber
subscription.id requiredstring
subscription.intervalSeconds requirednumber
subscription.lastError requiredstring
subscription.lastFetchAt requirednumber | null
subscription.lastSuccessAt requirednumber | null
subscription.name requiredstring
subscription.nextFetchAt requirednumber
subscription.refreshSeconds requirednumber | null
subscription.stoppedReason requiredstring
subscription.updatedAt requirednumber
subscription.url requiredstring
subscription.warnings requiredarray 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

Response 200
FieldTypeDescription
enabled requiredboolean

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.

Request body
FieldTypeDescription
enabled requiredboolean
Response 200
FieldTypeDescription
enabled requiredboolean

This group in the HTTP API guide