inboxes > calendar

Deletes an event, or cancels dates of a recurring event.

  • One-off or series UUID: deletes the event and every date of it. The event disappears from reads immediately and is removed in the background; the response is 202 with a deletion_id. A retry returns the same deletion_id while removal runs (send the same Idempotency-Key, or none and the same send_invites); once it has finished, the event no longer exists and a retry returns 404. No calendar.event.starting or calendar.event.ending webhook is sent for the event after the delete is accepted.
  • Dated ID (<uuid>_<slot>): cancels that date (mode=single, the default) or that date and every later date (mode=future). Returns 202 with the cancelled date. A mode=future delete from the first date deletes the whole series and returns a deletion_id instead. A date that is already running still gets its calendar.event.ending.

Deleting a one-off or series event sends calendar.event.deleted. Cancelling dates sends calendar.event.updated with the cancelled date. With send_invites=true the organizer inbox also emails a cancellation to every attendee. Requires the calendar_event_delete permission. To make the delete conditional, send the current etag in If-Match.

Emailing cancellations counts one send per attendee against the organization, pod and inbox send limits, charged before the delete; an over-limit request returns 429 rate_limit_exceeded and deletes nothing.

Calendar is available in US production (api.agentmail.to) but not yet in EU production (api.agentmail.eu), which returns 403.

delete/v0/inboxes/{inbox_id}/calendar/events/{event_id}

Request

  • Base URL
    https://api.agentmail.to
  • URL
    https://api.agentmail.to/v0/inboxes/{inbox_id}/calendar/events/{event_id}
  • Auth
    HTTP bearer

Path parameters

inbox_idstring required

The ID of the inbox.

event_idstring required

ID of a calendar event. A one-off or recurring event is addressed by its UUID. One date of a recurring event is addressed by a dated ID, <uuid>_<slot>: <uuid>_t20261015T090000 for a timed date (the original wall-clock start in the event's time zone) or <uuid>_d20261015 for an all-day date. Dated IDs are stable: moving a date keeps its original ID.

Query parameters

mode'single' | 'future'

Which dates a change to a dated event applies to. single (default) changes only this date. future changes this date and every later date of the series. Applies only to dated event IDs; sending mode with a one-off or series UUID is a 400.

send_invitesboolean

When true, emails a cancellation (iCalendar CANCEL) to every attendee. Only the organizer can send. Defaults to false.

Headers

If-Matchstring

The event's or date's current etag. Optional; makes the delete conditional; * matches any current version.

Idempotency-Keystring

1 to 128 visible ASCII characters. Optional. Retrying a delete with the same key returns the original result; without a key, retries of the same delete share one derived from the event and send_invites, so a keyless retry that changes send_invites is a different delete and returns 404 while removal runs. Keys are unique across your organization: reusing one to delete a different event returns 409 idempotency_conflict.

Response

Response with status 202

deletion_idstring

ID of an accepted deletion. While the event is being removed, retrying the same delete (with the same Idempotency-Key, or none and the same send_invites) returns it again. Once removal has finished, a retry returns 404.

operation_idstring

ID of the change this request made. The calendar.event.created, calendar.event.updated, calendar.event.deleted or calendar.event.responded webhook for the change carries the same value as its event_id, so you can match webhooks to your own requests.

Changes