Updates an event. This method does not support patch semantics and always updates the entire event resource. To do a partial update, perform a get
followed by an update
using etags to ensure atomicity. Try it now
.
Request
HTTP request
PUT https://www.googleapis.com/calendar/v3/calendars/ calendarId /events/ eventId
Parameters
calendarId
string
primary
" keyword.eventId
string
alwaysIncludeEmail
boolean
email
field for the organizer, creator and attendees, even if no real email address is available (i.e. a generated, non-working value will be provided).conferenceDataVersion
integer
0
to 1
, inclusive.maxAttendees
integer
sendNotifications
boolean
Whether to send notifications about the event update (for example, description changes, etc.). Note that some emails might still be sent even if you set the value to
false
. The default is false
.sendUpdates
string
Acceptable values are:
- "
all
": Notifications are sent to all guests. - "
externalOnly
": Notifications are sent to non-Google Calendar guests only. - "
none
": No notifications are sent. For calendar migration tasks, consider using the Events.import method instead.
supportsAttachments
boolean
Authorization
This request requires authorization with at least one of the following scopes:
Scope |
---|
https://www.googleapis.com/auth/calendar
|
https://www.googleapis.com/auth/calendar.events
|
https://www.googleapis.com/auth/calendar.app.created
|
https://www.googleapis.com/auth/calendar.events.owned
|
For more information, see the authentication and authorization page.
Request body
In the request body, supply an Events resource with the following properties:
end
nested object
start
nested object
anyoneCanAddSelf
boolean
attendees[]
list
attendees[].
additionalGuests
integer
attendees[].
displayName
string
attendees[].
email
string
Required when adding an attendee.
attendees[].
optional
boolean
attendees[].
resource
boolean
attendees[].
responseStatus
string
- "
needsAction
" - The attendee has not responded to the invitation (recommended for new events). - "
declined
" - The attendee has declined the invitation. - "
tentative
" - The attendee has tentatively accepted the invitation. - "
accepted
" - The attendee has accepted the invitation.
attendeesOmitted
boolean
maxAttendee
query parameter. When updating an event, this can be used to only update the participant's response. Optional. The default is False.colorId
string
event
section of the colors definition (see the colors endpoint
). Optional.conferenceData
nested object
createRequest
field. To persist your changes, remember to set the conferenceDataVersion
request parameter to 1
for all event modification requests.description
string
end.
date
date
end.
dateTime
datetime
timeZone
. end.
timeZone
string
extendedProperties.
private
object
focusTimeProperties
nested object
eventType
is focusTime
. gadget.
display
string
- "
icon
" - The gadget displays next to the event's title in the calendar view. - "
chip
" - The gadget displays when the event is clicked.
gadget.
height
integer
gadget.
iconLink
string
gadget.
link
string
gadget.
preferences
object
gadget.
title
string
gadget.
type
string
gadget.
width
integer
guestsCanInviteOthers
boolean
guestsCanModify
boolean
guestsCanSeeOtherGuests
boolean
location
string
originalStartTime.
date
date
originalStartTime.
dateTime
datetime
timeZone
. originalStartTime.
timeZone
string
outOfOfficeProperties
nested object
eventType
is outOfOffice
.recurrence[]
list
start
and end
fields. This field is omitted for single events or instances of recurring events. reminders.
overrides[]
list
reminders.overrides[].
method
string
- "
email
" - Reminders are sent via email. - "
popup
" - Reminders are sent via a UI popup.
Required when adding a reminder.
reminders.overrides[].
minutes
integer
Required when adding a reminder.
reminders.
useDefault
boolean
sequence
integer
source.
title
string
source.
url
string
start.
date
date
start.
dateTime
datetime
timeZone
. start.
timeZone
string
status
string
- "
confirmed
" - The event is confirmed. This is the default status. - "
tentative
" - The event is tentatively confirmed. - "
cancelled
" - The event is cancelled (deleted). The list method returns cancelled events only on incremental sync (whensyncToken
orupdatedMin
are specified) or if theshowDeleted
flag is set totrue
. The get method always returns them.A cancelled status represents two different states depending on the event type:
- Cancelled exceptions of an uncancelled recurring event indicate that this instance should no longer be presented to the user. Clients should store these events for the lifetime of the parent recurring event.
Cancelled exceptions are only guaranteed to have values for the
id
,recurringEventId
andoriginalStartTime
fields populated. The other fields might be empty. - All other cancelled events represent deleted events. Clients should remove their locally synced copies. Such cancelled events will eventually disappear, so do not rely on them being available indefinitely.
Deleted events are only guaranteed to have the
id
field populated.
showDeleted
set to false will not return these details.If an event changes its organizer (for example via the move operation) and the original organizer is not on the attendee list, it will leave behind a cancelled event where only the
id
field is guaranteed to be populated. - Cancelled exceptions of an uncancelled recurring event indicate that this instance should no longer be presented to the user. Clients should store these events for the lifetime of the parent recurring event.
summary
string
transparency
string
- "
opaque
" - Default value. The event does block time on the calendar. This is equivalent to setting Show me asto Busyin the Calendar UI. - "
transparent
" - The event does not block time on the calendar. This is equivalent to setting Show me asto Availablein the Calendar UI.
visibility
string
- "
default
" - Uses the default visibility for events on the calendar. This is the default value. - "
public
" - The event is public and event details are visible to all readers of the calendar. - "
private
" - The event is private and only event attendees may view event details. - "
confidential
" - The event is private. This value is provided for compatibility reasons.
workingLocationProperties
nested object
workingLocationProperties.
customLocation
object
workingLocationProperties.customLocation.
label
string
workingLocationProperties.
homeOffice
any value
workingLocationProperties.
officeLocation
object
workingLocationProperties.officeLocation.
buildingId
string
workingLocationProperties.officeLocation.
deskId
string
workingLocationProperties.officeLocation.
floorId
string
workingLocationProperties.officeLocation.
floorSectionId
string
workingLocationProperties.officeLocation.
label
string
workingLocationProperties.
type
string
- "
homeOffice
" - The user is working at home. - "
officeLocation
" - The user is working from an office. - "
customLocation
" - The user is working from a custom location.
Required when adding working location properties.
Response
If successful, this method returns an Events resource in the response body.
Try it!
Use the APIs Explorer below to call this method on live data and see the response.
attendees[]. comment
string