Skip to content

Delete a calendar

DELETE
/calendars/{calendarId}
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.

calendarId
required
string

Id of the calendar. Read it from GET /calendars.

Deletion accepted; the id that was removed is echoed back.

Media typeapplication/json
object
calendarId
required
integer format: int64
Examples
Exampledeleted
{
"calendarId": 3623
}

Missing, malformed or expired authentication key.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

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.

Media typeapplication/json

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
error
required

What went wrong.

string
status
required

Repeats the HTTP status code.

integer
help
required

Suggested next step, or an empty string.

string
Examples
Examplemissing
{
"error": "Cannot get calendar folder: no such folder id: 99999999",
"status": 422,
"help": ""
}

Rate limit exceeded. Retry after the window resets.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplethrottled
{
"message": "Too Many Attempts."
}