Update an event
const url = 'https://calendar.work.optidata.cloud/api/events/4167';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"4167","inv_id":"4167-4166","ms":20125,"rev":20120,"calendar_id":"10","title":"Sprint review — August","datetime_start":"2026-08-24 14:00:00","datetime_end":"2026-08-24 15:00:00","is_all_day":false,"location":"Meeting room 2","organizer":"jane.doe@acme.example","attendees":[{"email":"john.smith@acme.example","type":"user","optiworkIdentifier":"9ef34ce3-3b69-4762-b5e8-045499390ce6"}],"attendees_to_add":[{"email":"sam.lee@acme.example","type":"user","optiworkIdentifier":"9f0021bb-5c2f-4a71-9c0e-6f2ad4c1e777"}],"should_notify_all_attendees":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://calendar.work.optidata.cloud/api/events/4167 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "4167", "inv_id": "4167-4166", "ms": 20125, "rev": 20120, "calendar_id": "10", "title": "Sprint review — August", "datetime_start": "2026-08-24 14:00:00", "datetime_end": "2026-08-24 15:00:00", "is_all_day": false, "location": "Meeting room 2", "organizer": "jane.doe@acme.example", "attendees": [ { "email": "john.smith@acme.example", "type": "user", "optiworkIdentifier": "9ef34ce3-3b69-4762-b5e8-045499390ce6" } ], "attendees_to_add": [ { "email": "sam.lee@acme.example", "type": "user", "optiworkIdentifier": "9f0021bb-5c2f-4a71-9c0e-6f2ad4c1e777" } ], "should_notify_all_attendees": true }'Rewrites an event. Read it first, change what you need and send the whole record back — the fields you omit are not preserved.
id, inv_id, ms, rev and calendar_id must come from the event you
just read. Moving the event to another calendar means sending the new
calendar_id together with the old one in original_calendar_id.
Attendee changes are a delta, like calendar sharing: attendees_to_add
and attendees_to_remove decide who gets invited or uninvited, while
attendees restates the current guest list. Set
should_notify_all_attendees to false to change the event without
e-mailing everybody who was already on it.
An edit that touches only the event itself — a rename, a new location, a new time — still reaches the people already invited: their calendars are updated and they are notified that the event changed.
To change only the start and end, prefer
POST /events/{eventId}/reschedule, which
needs far less of the record.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Id of the event, as returned in an event’s id.
Request Bodyrequired
Section titled “Request Bodyrequired”object
When the event starts. Interpreted in the caller’s display time zone unless it carries an offset.
When the event ends. Must not be before datetime_start.
true for an event that spans whole days; send midnight-to-midnight
bounds.
Meeting room to attach to the event.
Address of the organizer.
A single reminder. Send time_unit and value for a timed event, or
days_before and trigger_hour for an all-day one. Omit the object
entirely for an event with no reminder.
object
Unit of the lead time, for a timed event.
How many units before the start to fire the reminder.
How many days before the event to fire it, for an all-day event.
Hour of the day the reminder fires, for an all-day event.
Language for the invitation e-mails, e.g. pt_BR or en.
Id of the event, from the record you read.
Invitation id, from the record you read.
Modification sequence, from the record you read.
Revision, from the record you read.
Calendar the event should live in after the update.
Calendar the event is in now. Send it when calendar_id moves the
event elsewhere.
ICalendar UID of the event.
Start of the occurrence being edited, when the update targets one occurrence of a series.
The current guest list.
Somebody to invite.
object
Display name of the attendee. Mainly useful for somebody outside the tenant, who has no directory entry to take a name from.
Optiwork identifier of the attendee, from
GET /search/invitables. null for
somebody outside the tenant.
People to invite.
Somebody to invite.
object
Display name of the attendee. Mainly useful for somebody outside the tenant, who has no directory entry to take a name from.
Optiwork identifier of the attendee, from
GET /search/invitables. null for
somebody outside the tenant.
People to uninvite.
Somebody to invite.
object
Display name of the attendee. Mainly useful for somebody outside the tenant, who has no directory entry to take a name from.
Optiwork identifier of the attendee, from
GET /search/invitables. null for
somebody outside the tenant.
Whether everybody already on the event is e-mailed about the change.
Defaults to true.
How an event repeats, in iCalendar terms. frequency is the only required
part; count and until are two ways of ending the series, and the by_*
fields narrow which occurrences the frequency produces.
When a by_* field is omitted, it is inferred from datetime_start —
a weekly series repeats on the weekday it starts on, a monthly one on the
same day of the month.
object
How often the event repeats.
Repeat every N periods: 2 with WEEKLY means fortnightly.
End the series after this many occurrences.
End the series at this moment.
Weekdays the event falls on.
Days of the month, 1–31.
Months, 1–12.
Which occurrence within the period: 1–4 for first through fourth,
-1 for last. Combine with by_day for “the last Friday of the
month”.
Examples
Rename and add one guest
{ "id": "4167", "inv_id": "4167-4166", "ms": 20125, "rev": 20120, "calendar_id": "10", "title": "Sprint review — August", "datetime_start": "2026-08-24 14:00:00", "datetime_end": "2026-08-24 15:00:00", "is_all_day": false, "location": "Meeting room 2", "organizer": "jane.doe@acme.example", "attendees": [ { "email": "john.smith@acme.example", "type": "user", "optiworkIdentifier": "9ef34ce3-3b69-4762-b5e8-045499390ce6" } ], "attendees_to_add": [ { "email": "sam.lee@acme.example", "type": "user", "optiworkIdentifier": "9f0021bb-5c2f-4a71-9c0e-6f2ad4c1e777" } ], "should_notify_all_attendees": true}Responses
Section titled “ Responses ”The updated event.
object
An event and its occurrences. The event itself carries the identifiers;
everything about the schedule lives in instances.
object
ICalendar UID. Unlike id, it survives the event being copied between
calendars.
Calendar the event lives in.
Invitation id. Part of the concurrency triple you send back on an update.
Modification sequence. Send it back unchanged on an update.
Revision. Send it back unchanged on an update.
One occurrence of an event. A one-off event has exactly one; a recurring event has one per occurrence inside the window you asked for.
object
Invitation id. Send it back when updating or rescheduling.
CONF confirmed, TENT tentative, CANC cancelled, NEED awaiting
an answer.
Start of this occurrence, for a recurring event.
Title of the event.
true when the caller owns the event.
true when this occurrence was detached from its series.
Filled in on a single-event read; on a list, only when
include_description was requested.
Who owns the event.
Time zone the event was created in, when it differs.
Somebody invited to the event.
object
A reminder, expressed as an offset from the event. isNegative: true means
the reminder fires before the moment named by related; the unit fields
that do not apply are 0 or null.
object
Whether the offset is measured from the start or the end.
Who takes part in one occurrence, summarized for an event card. Present
only on a list (GET /events) called with
include_participants_summary=true; absent otherwise.
The participants are listed as the event details show them: the organizer first, when the occurrence has one, then the attendees in invitation order. The organizer is not looked up among the attendees, so an organizer who is also listed as an attendee counts twice. An exception occurrence is summarized from its own participants.
Even with the flag on, an occurrence can lack participantsSummary
when its participants could not be read, for instance when the event
was deleted while the list was being built. Read a missing
participantsSummary as unknown, not as zero participants.
object
Number of participants of the occurrence: the organizer, when there
is one, plus every attendee. 0 when it has none.
The first three participants, in the order above. Empty when the occurrence has none.
object
The participant’s name or, when it has none, their email
address. null when both are missing.
The participant’s avatar, or null when there is none.
Example
{ "event": { "id": "4167", "calendarId": "10", "instances": [ { "status": "CONF", "organizer": { "type": "user" }, "recurrenceRule": { "frequency": "DAILY" }, "userParticipationStatus": "NEEDS-ACTION", "attendees": [ { "type": "user", "participationStatus": "NEEDS-ACTION" } ], "alarms": [ { "related": "START" } ], "participantsSummary": { "participantsCount": 5, "participants": [ { "name": "Jane Doe" } ] } } ] }}Missing, malformed or expired authentication key.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The caller is not the organizer of the event, or lacks write access to the calendar it lives in.
Failures raised by the calendar layer itself — a permission refusal, or a
calendar or event that cannot be read. help is a hint for the end user
and is often empty.
object
What went wrong.
Repeats the HTTP status code.
Suggested next step, or an empty string.
Examples
{ "error": "Only the event organizer can change this event.", "status": 403, "help": "Ask the organizer to make this change for you."}The request body or query string failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The event title field is required.", "errors": { "title": [ "The event title field is required." ] }}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}