Delete Calendar Event
Permanently delete a calendar event by EventToken. The event must belong to the authenticated user.
DELETE
https://api-v3.sweeppea.com/calendar/delete
Description
This endpoint permanently deletes a calendar event by its EventToken. The event must belong to the authenticated user. This action cannot be undone.
Authentication
This endpoint requires Bearer token authentication via the Authorization header.
Request Body
{
"EventToken": "uuid-v4-string"
}
| Parameter | Type | Description |
|---|---|---|
EventToken |
string | UUID v4 format of the calendar event to delete |
Code Examples
curl -X DELETE "https://api-v3.sweeppea.com/calendar/delete" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"EventToken": "cf1b198f-5c58-4bc6-b944-f466d3e38bc7"}'
const response = await fetch('https://api-v3.sweeppea.com/calendar/delete', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
EventToken: 'cf1b198f-5c58-4bc6-b944-f466d3e38bc7'
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://api-v3.sweeppea.com/calendar/delete"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"EventToken": "cf1b198f-5c58-4bc6-b944-f466d3e38bc7"
}
response = requests.delete(url, headers=headers, json=payload)
print(response.json())
Response
{
"Response": true,
"Message": "Calendar Event Deleted Successfully"
}
Error Responses
{
"Response": false,
"Message": "EventToken is Required",
"Help": {
"ExpectedBody": {
"EventToken": "string (required) \u2014 UUID v4 of the calendar event"
}
},
"Code": 400
}
{
"Response": false,
"Message": "Missing or invalid Bearer token. Send your API token in the Authorization header as: Authorization: Bearer YOUR_API_TOKEN",
"Code": 401
}
{
"Response": false,
"Message": "Invalid API token. It does not match any account.",
"Code": 403
}
{
"Response": false,
"Message": "Calendar Event Not Found",
"Code": 404
}
{
"Response": false,
"Message": "Internal server error. Please try again; if it persists, contact support with the time of this request.",
"Code": 500
}