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

# updateCalendarEvent

> Change a calendar event's fields and agenda in one step. Returns null when this store has no event with that id. Editing an event Redo found on the brand's homepage stops Redo from updating it.

**Required scopes:** [`calendar_events_write`](/docs/api-reference/v3/reference/scopes#scope-calendar_events_write)

## Arguments

<ResponseField name="id" type="ID!" required>
  The event's `id`.
</ResponseField>

<ResponseField name="input" type={<a href="/docs/api-reference/v3/reference/commerce-agent/update-calendar-event-input">UpdateCalendarEventInput!</a>} required>
  The changes to make.

  <Expandable title="fields" lazyRender>
    <ResponseField name="agendaOperations" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-agenda-operation-input">[CalendarAgendaOperationInput!]</a>}>
      Changes to the agenda, applied in order after the field changes. At most 50.

      <Expandable title="fields" lazyRender>
        <ResponseField name="add" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-agenda-item-input">CalendarAgendaItemInput</a>}>
          Append a new item to the end of the agenda.
        </ResponseField>

        <ResponseField name="remove" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-agenda-item-remove-input">CalendarAgendaItemRemoveInput</a>}>
          Remove an existing item. A promotion Redo found on the brand's homepage returns DETECTED\_PROMOTION\_NOT\_REMOVABLE, since Redo would add it again; delete the event to dismiss it.
        </ResponseField>

        <ResponseField name="update" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-agenda-item-update-input">CalendarAgendaItemUpdateInput</a>}>
          Change fields on an existing item.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="allDay" type="Boolean">
      Whether the event spans whole days in `timezone`.
    </ResponseField>

    <ResponseField name="description" type="String">
      Notes about the event, at most 1000 characters. The Commerce Agent reads them for MARKETING events and may repeat them to shoppers, so keep internal notes out.
    </ResponseField>

    <ResponseField name="endAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
      When the event ends. Must not be before `startAt`.
    </ResponseField>

    <ResponseField name="startAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime</a>}>
      When the event starts.
    </ResponseField>

    <ResponseField name="timezone" type="String">
      The IANA time zone the event is written in, such as `America/New_York`.
    </ResponseField>

    <ResponseField name="title" type="String">
      The name of the event, 1 to 200 characters. The Commerce Agent reads it for MARKETING events and may repeat it to shoppers.
    </ResponseField>
  </Expandable>
</ResponseField>

## Returns

<ResponseField name="updateCalendarEvent" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event">CalendarEvent</a>}>
  Something happening for the brand on a known date, such as a sale, launch, or holiday, with an agenda of typed items that give it behavior. The Commerce Agent reads MARKETING events near the current date as context, both when it answers shoppers and when it writes outbound marketing messages, and may repeat what they say to shoppers.

  <Expandable title="fields" lazyRender>
    <ResponseField name="agenda" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event-agenda-item">[CalendarEventAgendaItem!]!</a>} required>
      The typed items attached to this event, in order. A kind this API version does not model is returned as CalendarUnknownAgendaItem. Change them with `agendaOperations` on updateCalendarEvent.

      <Expandable title="fields" lazyRender>
        <ResponseField name="id" type="ID!" required>
          The id of this agenda item. Pass it to an `update` or `remove` agenda operation on updateCalendarEvent.
        </ResponseField>

        <ResponseField name="kind" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-agenda-item-kind">CalendarAgendaItemKind!</a>} required>
          What this item adds to the event.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="agendaJson" type={<a href="/docs/api-reference/v3/reference/common/json">[JSON!]!</a>} required>
      `agenda` with every field selected, as JSON: one element per item, in order, with `__typename`.
    </ResponseField>

    <ResponseField name="allDay" type="Boolean!" required>
      Whether the event spans whole days in `timezone` rather than specific times.
    </ResponseField>

    <ResponseField name="createdAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
      When the event was created.
    </ResponseField>

    <ResponseField name="description" type="String">
      Notes about the event. The Commerce Agent reads them for MARKETING events and may repeat them to shoppers, so keep internal notes out.
    </ResponseField>

    <ResponseField name="endAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
      When the event ends. Never before `startAt`.
    </ResponseField>

    <ResponseField name="id" type="ID!" required>
      The id of this calendar event.
    </ResponseField>

    <ResponseField name="startAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
      When the event starts.
    </ResponseField>

    <ResponseField name="status" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event-status">CalendarEventStatus!</a>} required>
      Whether the event is upcoming, happening now, or ended.
    </ResponseField>

    <ResponseField name="timezone" type="String!" required>
      The IANA time zone the event was written in, such as `America/New_York`. `startAt` and `endAt` are instants; this is how to show them.
    </ResponseField>

    <ResponseField name="title" type="String!" required>
      The name of the event. The Commerce Agent reads it for MARKETING events and may repeat it to shoppers.
    </ResponseField>

    <ResponseField name="type" type={<a href="/docs/api-reference/v3/reference/commerce-agent/calendar-event-type">CalendarEventType!</a>} required>
      The part of the business this event belongs to.
    </ResponseField>

    <ResponseField name="updatedAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
      When the event or its agenda was last changed.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```graphql theme={null}
mutation {
  updateCalendarEvent(id: "...", input: { ... }) {
    agendaJson
    allDay
    createdAt
    description
    endAt
    id
    startAt
    status
    # ...
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.