Create a calendar
POST/api/calendars
Creates a calendar owned by the signed-in user and returns it. For a local calendar send name and optionally color (hex, default #3498db); the user's first local calendar becomes their default. For a subscribed calendar set source to external_ics and icsUrl (http or https; localhost and private-network hosts are rejected): the feed is fetched right away, its X-WR-CALNAME takes precedence over name, its events are imported, and the response includes the sync result. For a holiday calendar set source to holiday and holidayId to an id from GET /api/holiday-calendars: the country name is used, the Thunderbird ICS feed is fetched, and the calendar is stored as a subscribed calendar (external_ics). An unknown holidayId returns 400. Any signed-in user may call it. A feed that cannot be fetched (HTTP error, timeout, larger than 5 MB, or not iCalendar) returns 500 and no calendar is created.
Request
Responses
- 201
- 400
- 500
Created calendar. Subscribed calendars include a sync result.
Request failed.
Request failed.