Update event

Update the properties of the event object.

When updating the time zone of the start or end time of an event, first find the supported time zones to make sure you set only time zones that have been configured for the user's mailbox server.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) Calendars.ReadWrite
Delegated (personal Microsoft account) Calendars.ReadWrite
Application Calendars.ReadWrite

HTTP request

PATCH /me/events/{id}
PATCH /users/{id | userPrincipalName}/events/{id}
PATCH /groups/{id}/events/{id}

PATCH /me/calendar/events/{id}
PATCH /users/{id | userPrincipalName}/calendar/events/{id}
PATCH /groups/{id}/calendar/events/{id}

PATCH /me/calendars/{id}/events/{id}
PATCH /users/{id | userPrincipalName}/calendars/{id}/events/{id}

PATCH /me/calendargroup/calendars/{id}/events/{id}
PATCH /users/{id | userPrincipalName}/calendargroup/calendars/{id}/events/{id}

PATCH /me/calendargroups/{id}/calendars/{id}/events/{id}
PATCH /users/{id | userPrincipalName}/calendargroups/{id}/calendars/{id}/events/{id}

Request headers

Name Type Description
Authorization string Bearer {token}. Required.

Request body

In the request body, supply the values for relevant fields that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values. For best performance you shouldn't include existing values that haven't changed.

Property Type Description
attendees Attendee The collection of attendees for the event.
body ItemBody The body of the message associated with the event.
categories String The categories associated with the event.
end DateTimeTimeZone The date, time, and time zone that the event ends.
importance String The importance of the event. The possible values are: low, normal, high.
isAllDay Boolean Set to true if the event lasts all day.
isReminderOn Boolean Set to true if an alert is set to remind the user of the event.
location Location The location of the event.
locations location collection The locations where the event is held or attended from. The location and locations properties always correspond with each other. If you update the location property, any prior locations in the locations collection would be removed and replaced by the new location value.
recurrence PatternedRecurrence The recurrence pattern for the event.
reminderMinutesBeforeStart Int32 The number of minutes before the event start time that the reminder alert occurs.
responseRequested Boolean Set to true if the sender would like a response when the event is accepted or declined.
sensitivity String The possible values are: normal, personal, private, confidential.
showAs String The status to show. The possible values are: free, tentative, busy, oof, workingElsewhere, unknown.
start DateTimeTimeZone The start date, time, and time zone of the event.
subject String The text of the event's subject line.

Because the event resource supports extensions, you can use the PATCH operation to add, update, or delete your own app-specific data in custom properties of an extension in an existing event instance.

If the event you're updating is the master event of a recurring series, contains multiple attendees, and has instances that have been updated separately, multiple notification emails will be sent out: one for the master series and one per instance that has been updated.

Response

If successful, this method returns a 200 OK response code and updated event object in the response body.

Note: This method can return an HTTP 400 Bad Request response with an error code of ErrorOccurrenceCrossingBoundary and the following error message: Modified occurrence is crossing or overlapping adjacent occurrence. This indicates that the update violates the following Outlook restriction on recurrence exceptions: an occurrence cannot be moved to or before the day of the previous occurrence, and cannot be moved to or after the day of the following occurrence.

Example

Request

Here is an example of the request.

PATCH https://graph.microsoft.com/v1.0/me/events/{id}
Content-type: application/json
Content-length: 285

{
  "originalStartTimeZone": "originalStartTimeZone-value",
  "originalEndTimeZone": "originalEndTimeZone-value",
  "responseStatus": {
    "response": "",
    "time": "datetime-value"
  },
  "recurrence": null,
  "iCalUId": "iCalUId-value",
  "reminderMinutesBeforeStart": 99,
  "isReminderOn": true
}
Response

Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json
Content-length: 285

{
  "originalStartTimeZone": "originalStartTimeZone-value",
  "originalEndTimeZone": "originalEndTimeZone-value",
  "responseStatus": {
    "response": "",
    "time": "datetime-value"
  },
  "recurrence": null,  
  "iCalUId": "iCalUId-value",
  "reminderMinutesBeforeStart": 99,
  "isReminderOn": true
}

See also