Respond to & cancel events

Manage calendar invitations, cancellations, and supported event restoration.

Use List all calendar events or Get a calendar event to retrieve the event and its identifiers before acting. These workflows support Google Calendar and Outlook, except restoration, which supports Google Calendar only.

Respond to an invitation

Use Respond to a calendar event to set the connected attendee's response. Set status to yes (accept), maybe (tentative), or no (decline). You can include an optional comment for the organizer. The request is POST /v2/{account_id}/calendars/{calendar_id}/events/{event_id}/rsvp with a JSON body such as {"status": "yes"}. A successful response is 204 with no body. This updates attendance; it does not cancel the organizer's event.

const response = await fetch(
  "https://api.unipile.com/v2/acc_123456789/calendars/calendar_id/events/event_id/rsvp",
  {
    method: "POST",
    headers: {
      "X-API-KEY": "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      status: "yes",
    }),
  },
);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
// Success: 204 No Content.
import requests

response = requests.post(
    "https://api.unipile.com/v2/acc_123456789/calendars/calendar_id/events/event_id/rsvp",
    headers={"X-API-KEY": "YOUR_API_KEY"},
    json={
        "status": 'yes'
    },
    timeout=30,
)
response.raise_for_status()
# Success: 204 No Content.
curl --request POST \
  --url "https://api.unipile.com/v2/acc_123456789/calendars/calendar_id/events/event_id/rsvp" \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "status": "yes"
}'

Cancel an event

Use Cancel a calendar event for a cancellation workflow. Use Delete a Calendar event when deletion is intended instead. Only the organizer can cancel the event, and attendees are notified. Send POST /v2/{account_id}/calendars/{calendar_id}/events/{event_id}/cancel with {} or an optional comment (Outlook only). A successful response is 204 with no body.

const response = await fetch(
  "https://api.unipile.com/v2/acc_123456789/calendars/calendar_id/events/event_id/cancel",
  {
    method: "POST",
    headers: {
      "X-API-KEY": "YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({}),
  },
);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
// Success: 204 No Content.
import requests

response = requests.post(
    "https://api.unipile.com/v2/acc_123456789/calendars/calendar_id/events/event_id/cancel",
    headers={"X-API-KEY": "YOUR_API_KEY"},
    json={},
    timeout=30,
)
response.raise_for_status()
# Success: 204 No Content.
curl --request POST \
  --url "https://api.unipile.com/v2/acc_123456789/calendars/calendar_id/events/event_id/cancel" \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{}'

Restore a cancelled event

For Google Calendar, use Restore a cancelled calendar event with the cancelled event's identifiers. Only the organizer can restore the event. Send POST /v2/{account_id}/calendars/{calendar_id}/events/{event_id}/restore; success returns 204 with no body. This operation is not implemented for Outlook. Retrieve the event again after the operation to refresh its state.

const response = await fetch(
  "https://api.unipile.com/v2/acc_123456789/calendars/calendar_id/events/event_id/restore",
  {
    method: "POST",
    headers: {
      "X-API-KEY": "YOUR_API_KEY",
    },
  },
);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
// Success: 204 No Content.
import requests

response = requests.post(
    "https://api.unipile.com/v2/acc_123456789/calendars/calendar_id/events/event_id/restore",
    headers={"X-API-KEY": "YOUR_API_KEY"},
    timeout=30,
)
response.raise_for_status()
# Success: 204 No Content.
curl --request POST \
  --url "https://api.unipile.com/v2/acc_123456789/calendars/calendar_id/events/event_id/restore" \
  --header 'X-API-KEY: YOUR_API_KEY'

Keep your application synchronized

Subscribe to calendar.event.new, calendar.event.update, and calendar.event.delete for changes made through the provider. Webhook availability does not imply that every method produces a separate event type: there is no dedicated RSVP or restore webhook type.


Did this page help you?