> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update CalendarEvent

> Update an existing CalendarEvent record.

Updates an existing CalendarEvent record. You must include the `Id` of the record to update along with all required fields.

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
  The authenticated user must be a full unrestricted administrator or have the **`CalendarEvent-Edit`** role.
</Note>

## Enums

<Accordion title="eCalendarEventRepeatCycle — Repeats values">
  | Value | Name          |
  | ----- | ------------- |
  | 1     | Daily         |
  | 2     | Weekly        |
  | 3     | Monthly       |
  | 4     | Yearly        |
  | 5     | FirstOfMonth  |
  | 6     | SecondOfMonth |
  | 7     | ThirdOfMonth  |
  | 8     | LastOfMonth   |
  | 9     | FourthOfMonth |
</Accordion>

<Accordion title="eRepeatedCalendarEventUpdateAction — WhichEventsToUpdate values">
  | Value | Name                   |
  | ----- | ---------------------- |
  | 1     | UpdateThisEventOnly    |
  | 2     | UpdateFutureEventsOnly |
  | 3     | UpdateAllEvents        |
  | 4     | DeleteAllEvents        |
  | 5     | DeleteEventsAfterThis  |
  | 6     | UpdateEventProducts    |
</Accordion>

## Request Body

### Required Fields

<ParamField body="Id" type="integer" required>
  The Id of the CalendarEvent record to update.
</ParamField>

<ParamField body="BusinessId" type="integer" required>
  The location this event belongs to.
</ParamField>

<ParamField body="Name" type="string" required>
  Event name.
</ParamField>

<ParamField body="StartDate" type="string" required>
  Event start date and time (UTC).
</ParamField>

<ParamField body="EndDate" type="string" required>
  Event end date and time (UTC).
</ParamField>

<ParamField body="Repeats" type="integer" required>
  Recurrence pattern for the event series.
</ParamField>

<ParamField body="WhichEventsToUpdate" type="integer" required>
  Which events in the recurring series to update (update only).
</ParamField>

### Optional Fields

<ParamField body="HostFullName" type="string">
  Full name of the event host or presenter.
</ParamField>

<ParamField body="ShortDescription" type="string">
  Brief summary shown under the event name on the Members Portal.
</ParamField>

<ParamField body="LongDescription" type="string">
  Full event description visible when a customer opens the event on the Members Portal.
</ParamField>

<ParamField body="TicketNotes" type="string">
  Additional notes included in ticket confirmation emails.
</ParamField>

<ParamField body="EnableWaitList" type="boolean">
  Allow customers to join a waiting list when the event is at full capacity.
</ParamField>

<ParamField body="AskBuyerAddress" type="boolean">
  Request the buyer's postal address during ticket checkout.
</ParamField>

<ParamField body="ShowEventAttendees" type="boolean">
  Display the attendee list on the Members Portal event page.
</ParamField>

<ParamField body="Location" type="string">
  Venue or room name displayed on the event page.
</ParamField>

<ParamField body="VenueAddress" type="string">
  Street address of the event venue.
</ParamField>

<ParamField body="ResourceId" type="integer">
  Resource linked to this event; automatically blocked from bookings for the event's duration.
</ParamField>

<ParamField body="Allocation" type="integer">
  Maximum number of attendees; leave empty for unlimited.
</ParamField>

<ParamField body="EventCategories" type="integer[]">
  Categories assigned to this event.
</ParamField>

<ParamField body="AddedEventCategories" type="integer[]">
  Added Event Categories.
</ParamField>

<ParamField body="RemovedEventCategories" type="integer[]">
  Removed Event Categories.
</ParamField>

<ParamField body="PublishDate" type="string">
  Date and time the event becomes visible on the Members Portal (UTC).
</ParamField>

<ParamField body="ShowInHomeBanner" type="boolean">
  Display this event in the home page banner on the Members Portal.
</ParamField>

<ParamField body="ShowInHomePage" type="boolean">
  Display this event on the Members Portal home page.
</ParamField>

<ParamField body="AllowComments" type="boolean">
  Allow customers to post comments on the event.
</ParamField>

<ParamField body="IncludeZoomInvite" type="boolean">
  Attach a Zoom conference call link to this event.
</ParamField>

<ParamField body="CreateZoomWebinarInvite" type="boolean">
  Create a Zoom webinar instead of a regular conference call.
</ParamField>

<ParamField body="ZoomWebinarAlternativeHosts" type="string">
  Comma-separated email addresses of alternative Zoom hosts who can start the meeting.
</ParamField>

<ParamField body="ZoomEventData" type="string">
  Raw Zoom meeting data returned after the Zoom event is created.
</ParamField>

<ParamField body="ZoomMeetingId" type="string">
  Zoom meeting or webinar ID.
</ParamField>

<ParamField body="OnlyForContacts" type="boolean">
  Restrict event attendance to contacts only.
</ParamField>

<ParamField body="OnlyForMembers" type="boolean">
  Restrict event attendance to members only.
</ParamField>

<ParamField body="NewSmallLogoUrl" type="string">
  URL of an image to upload as the small event image.
</ParamField>

<ParamField body="ClearSmallLogoFile" type="boolean">
  Remove the current small event image.
</ParamField>

<ParamField body="NewLargeLogoUrl" type="string">
  URL of an image to upload as the large event image.
</ParamField>

<ParamField body="ClearLargeLogoFile" type="boolean">
  Remove the current large event image.
</ParamField>

<ParamField body="WebAddress" type="string">
  URL of an external website related to this event.
</ParamField>

<ParamField body="FacebookPage" type="string">
  URL of a Facebook event or page for this event.
</ParamField>

<ParamField body="TicketsPage" type="string">
  URL of an external ticketing page for this event.
</ParamField>

<ParamField body="RepeatSeriesUniqueId" type="string">
  Unique identifier shared by all occurrences in a repeat series.
</ParamField>

<ParamField body="RepeatEvent" type="boolean">
  Create this event as a recurring series (create only).
</ParamField>

<ParamField body="RepeatEvery" type="integer">
  Number of cycles between occurrences (e.g. 2 with Weekly means every two weeks).
</ParamField>

<ParamField body="RepeatUntil" type="string">
  Date the recurring series ends (create only).
</ParamField>

<ParamField body="RepeatOnMondays" type="boolean">
  Include Mondays in the recurring schedule.
</ParamField>

<ParamField body="RepeatOnTuesdays" type="boolean">
  Include Tuesdays in the recurring schedule.
</ParamField>

<ParamField body="RepeatOnWednesdays" type="boolean">
  Include Wednesdays in the recurring schedule.
</ParamField>

<ParamField body="RepeatOnThursdays" type="boolean">
  Include Thursdays in the recurring schedule.
</ParamField>

<ParamField body="RepeatOnFridays" type="boolean">
  Include Fridays in the recurring schedule.
</ParamField>

<ParamField body="RepeatOnSaturdays" type="boolean">
  Include Saturdays in the recurring schedule.
</ParamField>

<ParamField body="RepeatOnSundays" type="boolean">
  Include Sundays in the recurring schedule.
</ParamField>

<ParamField body="StartDateLocal" type="string">
  Event start date and time in the location's local timezone.
</ParamField>

<ParamField body="EndDateLocal" type="string">
  Event end date and time in the location's local timezone.
</ParamField>

<ParamField body="PublishDateLocal" type="string">
  Publish date and time in the location's local timezone.
</ParamField>

<ParamField body="AfterEventNotificationJobId" type="string">
  Background job ID for the scheduled post-event notification email.
</ParamField>

<ParamField body="SendAfterEventNotification" type="boolean">
  Send a follow-up notification email to attendees after the event ends.
</ParamField>

<ParamField body="AfterEventNotificationText" type="string">
  Custom message body for the post-event notification email.
</ParamField>

<ParamField body="SendBeforeEventNotification" type="boolean">
  Send a reminder notification email to attendees before the event starts.
</ParamField>

<ParamField body="HasEventForm" type="boolean">
  A form is linked to this event that attendees are asked to complete.
</ParamField>

<ParamField body="SendEventFormByEmail" type="boolean">
  Send the linked event form to attendees by email.
</ParamField>

<ParamField body="FormPageId" type="integer">
  ID of the form page linked to this event.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT \
    "https://spaces.nexudus.com/api/content/calendarevents" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "BusinessId": 0,
      "Name": "",
      "StartDate": "2025-01-15T10:30:00Z",
      "EndDate": "2025-01-15T10:30:00Z",
      "Repeats": 0,
      "WhichEventsToUpdate": 0,
      "Id": 87654321
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/content/calendarevents',
    {
      method: 'PUT',
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        BusinessId: 0,
        Name: '',
        StartDate: '2025-01-15T10:30:00Z',
        EndDate: '2025-01-15T10:30:00Z',
        Repeats: 0,
        WhichEventsToUpdate: 0,
        Id: 87654321
      })
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.put(
      'https://spaces.nexudus.com/api/content/calendarevents',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN',
          'Content-Type': 'application/json'
      },
      json={
          'BusinessId': 0,
          'Name': '',
          'StartDate': '2025-01-15T10:30:00Z',
          'EndDate': '2025-01-15T10:30:00Z',
          'Repeats': 0,
          'WhichEventsToUpdate': 0,
          'Id': 87654321
      }
  )

  data = response.json()
  ```
</CodeGroup>

## Response

### 200

<ResponseField name="Status" type="integer">
  HTTP status code. `200` on success.
</ResponseField>

<ResponseField name="Message" type="string">
  A human-readable message confirming the update.
</ResponseField>

<ResponseField name="Value" type="object">
  Contains the `Id` of the updated record.
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `true` if the calendarevent was updated successfully.
</ResponseField>

<ResponseField name="Errors" type="array">
  `null` on success.
</ResponseField>

```json Example Response theme={null}
{
  "Status": 200,
  "Message": "CalendarEvent was successfully updated.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}
```

### 400

<ResponseField name="Message" type="string">
  A summary of the validation error(s), in the format `PropertyName: error message`.
</ResponseField>

<ResponseField name="Value" type="any">
  `null` on validation failure.
</ResponseField>

<ResponseField name="Errors" type="object[]">
  Array of validation errors.

  <Expandable>
    <ResponseField name="AttemptedValue" type="any">
      The value that was submitted for the field, or `null` if missing.
    </ResponseField>

    <ResponseField name="Message" type="string">
      The validation error message.
    </ResponseField>

    <ResponseField name="PropertyName" type="string">
      The name of the property that failed validation.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `false` when the request fails validation.
</ResponseField>

```json Example Response theme={null}
{
  "Message": "Name: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Name"
    }
  ],
  "WasSuccessful": false
}
```
