Delete a calendar
const url = 'https://calendar.work.optidata.cloud/api/calendars/454';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://calendar.work.optidata.cloud/api/calendars/454 \ --header 'Authorization: Bearer <token>'Deletes the calendar and everything scheduled in it. The primary calendar
(isHomeCalendar: true) cannot be deleted.
Deleting a calendar somebody shared with you removes your copy of the link, not the owner’s calendar.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Id of the calendar. Read it from GET /calendars.
Responses
Section titled “ Responses ”Deletion accepted; the id that was removed is echoed back.
object
Examples
{ "calendarId": 3623}Missing, malformed or expired authentication key.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The calendar could not be read — it does not exist, or is no longer reachable.
Failures raised by the calendar layer itself — a permission refusal, or a
calendar or event that cannot be read. help is a hint for the end user
and is often empty.
object
What went wrong.
Repeats the HTTP status code.
Suggested next step, or an empty string.
Examples
{ "error": "Cannot get calendar folder: no such folder id: 99999999", "status": 422, "help": ""}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}