Delete Event
Required plan: StarterDescription #
Deletes an event from a user’s calendar. To delete an external event, please see the Delete External Event page.
URL format #
{data_center_url}/v1/calendars/{calendar_id}/events
Example Request #
DELETE /v1/calendars/cal_n23kjnwrw2_jsdfjksn234/events HTTP/1.1
Host: {data_center_url}
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json; charset=utf-8
{
"event_id": "qTtZdczOccgaPncGJaCiLg"
}
Example Response #
HTTP/1.1 202 Accepted
Request parameters #
data_center_url required
The URL for the data center you want to communicate with. Possible choices are:
api-au.cronofy.com
- π¦πΊ Australiaapi-ca.cronofy.com
- π¨π¦ Canadaapi-de.cronofy.com
- π©πͺ Germanyapi-sg.cronofy.com
- πΈπ¬ Singaporeapi-uk.cronofy.com
- π¬π§ United Kingdomapi.cronofy.com
- πΊπΈ United States
Find out more about Cronofy's data centers.
calendar_id required #
The calendar_id
of the calendar you wish the event to be removed from. This ID should have been discovered by making a list calendars request and must not have a calendar_readonly
value that is true
.
event_id required #
The String
that uniquely identifies the event. The combination of calendar_id
and event_id
combination will be used to delete the event.
String
.include_userinfo optional #
A Boolean
specifying whether the response should include an embedded userinfo response.
Response parameters #
This request has no response body unless include_userinfo
was specified, in which case it will include an embedded userinfo response under a userinfo
parameter.
Error responses #
401 Unauthorized #
The request was refused as the provided authentication credentials were not recognized.
When an OAuth refresh_token
is available then it should be used to request a replacement auth_token
before the request is retried.
403 Forbidden #
The request was refused as the provided authorization credentials were recognized but does not grant the delete_event
scope which was required for the request.
You will need to make an additional authorization request including the delete_event
scope before retrying the request.
404 Not Found #
The calendar_id
provided was not recognized, or the authorization used to make the request has not been granted access to the calendar.
If the calendar does exist, you will need to make an additional authorization request including the delete_event
scope, asking the user to authorize access to the calendar, before retrying the request.
422 Unprocessable #
The request was unable to be processed due to it containing invalid parameters.
The response will contain a JSON object containing one or more errors relating to the invalid parameters.
For example, if you omitted the required tzid
parameter, you would receive a response like:
{
"errors": {
"tzid": [
{
"key": "errors.required",
"description": "required"
}
]
}
}
The key
field is intended for programmatic use and the description
field is a human-readable equivalent.