Skip to content

Upsert Calendar Events

POST
/users/{user_id}/calendar/events
curl --request POST \
--url https://example.com/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/calendar/events \
--header 'Content-Type: application/json' \
--data '{ "events": [ { "attendee_count": 1, "calendar_id": "example", "calendar_name": "example", "ends_at": "2026-04-15T12:00:00Z", "external_id": "example", "is_all_day": false, "rsvp_status": "example", "starts_at": "2026-04-15T12:00:00Z", "status": "confirmed", "title": "example" } ], "window_end": "2026-04-15", "window_start": "2026-04-15" }'

Batch upsert calendar events from the client.

If window_start and window_end are provided, any events for this user whose starts_at falls within that window and whose external_id is NOT in the payload are deleted — covering calendar deletions and cancellations the client won’t send.

user_id
required
User Id
string format: uuid
Media typeapplication/json
CalendarEventBatchIngest
object
events
required
Events
Array<object>
CalendarEventIngest
object
attendee_count
Any of:
integer
calendar_id
Any of:
string
calendar_name
Any of:
string
ends_at
required
Ends At
string format: date-time
external_id
required
External Id
string
is_all_day
Is All Day
boolean
rsvp_status
Any of:
string
starts_at
required
Starts At
string format: date-time
status
Status
string
default: confirmed
title
Any of:
string
window_end
Any of:
string format: date
window_start
Any of:
string format: date

Successful Response

Media typeapplication/json
CalendarEventBatchResult
object
deleted
required
Deleted
integer
upserted
required
Upserted
integer
Examplegenerated
{
"deleted": 1,
"upserted": 1
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}