Skip to main content
DELETE
/
calendar
/
schedule
/
{event_id}
Unschedule Bot for Event
curl --request DELETE \
  --url https://api.meestream.ai/api/v1/calendar/schedule/{event_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "cancel_all_occurrences": true,
  "from_date": "2023-11-07T05:31:56Z"
}
'
{
  "unscheduled": true,
  "cancelled": true,
  "event_id": "<string>",
  "master_event_id": "<string>",
  "cancelled_schedules": [
    "<string>"
  ],
  "schedules_cancelled": 123,
  "bots_deleted": 123,
  "cancel_all_occurrences": true,
  "from_date": "2023-11-07T05:31:56Z",
  "is_recurring_series": true,
  "occurrences_affected": 123
}

Overview

Cancels a scheduled bot for an event. Deletes the EventBridge schedule and updates the event status. Supports cancelling all occurrences for recurring events.

Request

Endpoint: DELETE /calendar/schedule/{event_id} Headers:
Authorization: Token <api_key>
Path Parameters:
ParameterTypeRequiredDescription
event_idstringYesThe EventID of the calendar event
Request Body (optional):
{
  "cancel_all_occurrences": true,
  "from_date": "2024-12-20T00:00:00Z"
}

Request Body Parameters

ParameterTypeRequiredDescription
cancel_all_occurrencesbooleanNoCancel all occurrences for recurring events
from_dateISO 8601NoCancel occurrences from this date onwards (for recurring events)

Response

Success Response - Single Event (200)

{
  "unscheduled": true,
  "event_id": "evt_abc123",
  "cancelled_schedules": ["bot-abc12345-xyz789012"],
  "schedules_cancelled": 1,
  "bots_deleted": 1,
  "cancel_all_occurrences": false,
  "from_date": null,
  "is_recurring_series": false
}

Success Response - Recurring Series (200)

{
  "cancelled": true,
  "master_event_id": "master_id",
  "from_date": "2024-12-20T00:00:00Z",
  "occurrences_affected": 8,
  "schedules_cancelled": 8,
  "cancelled_schedules": [
    "bot-abc12345-xyz789012",
    "bot-def67890-uvw345678"
  ]
}

Response Fields

FieldTypeDescription
unscheduledbooleanWhether unscheduling was successful
cancelledboolean(Recurring) Whether cancellation was successful
event_idstringEvent ID that was unscheduled
master_event_idstring(Recurring) Master event ID
cancelled_schedulesarrayList of EventBridge schedule IDs that were cancelled
schedules_cancelledintegerNumber of schedules cancelled
bots_deletedintegerNumber of bots deleted
cancel_all_occurrencesbooleanWhether all occurrences were cancelled
from_dateISO 8601 | nullDate from which occurrences were cancelled
is_recurring_seriesbooleanWhether this is a recurring event series
occurrences_affectedinteger(Recurring) Number of occurrences affected

Error Responses

400 Bad Request

  • Event not scheduled
  • Invalid from_date format
  • Master event ID not found (for recurring events)

401 Unauthorized

Missing user_id in token or invalid authentication.

404 Not Found

  • Event not found
  • User not found

500 Internal Server Error

An error occurred while unscheduling the bot.

Usage Examples

Cancel Single Event

DELETE /calendar/schedule/evt_abc123

Cancel All Occurrences from a Date

DELETE /calendar/schedule/evt_abc123
Content-Type: application/json

{
  "cancel_all_occurrences": true,
  "from_date": "2024-12-20T00:00:00Z"
}
This will cancel all scheduled bots for occurrences of the recurring event starting from the specified date.
For recurring events, you can use from_date to cancel only future occurrences while keeping past ones intact.

Authorizations

Authorization
string
header
required

All API endpoints are authenticated using API Keys. The key should be included in the 'Authorization' header, prefixed with 'Token '. Example: 'Authorization: Token YOUR_API_KEY'.

Path Parameters

event_id
string
required

The EventID of the calendar event.

Body

application/json
cancel_all_occurrences
boolean

Cancel all occurrences for recurring events

from_date
string<date-time>

Cancel occurrences from this date onwards (for recurring events)

Response

Bot unscheduled successfully.

unscheduled
boolean
required

Whether unscheduling was successful

cancelled
boolean

Whether cancellation was successful (for recurring events)

event_id
string

Event ID that was unscheduled

master_event_id
string

Master event ID (for recurring events)

cancelled_schedules
string[]

List of EventBridge schedule IDs that were cancelled

schedules_cancelled
integer

Number of schedules cancelled

bots_deleted
integer

Number of bots deleted

cancel_all_occurrences
boolean

Whether all occurrences were cancelled

from_date
string<date-time> | null

Date from which occurrences were cancelled

is_recurring_series
boolean

Whether this is a recurring event series

occurrences_affected
integer

Number of occurrences affected (for recurring events)