---
title: "POST /calendarEvents/{calendarEventId}"
method: POST
path: "/calendarEvents/{calendarEventId}"
tags: ["Calendar Events"]
---

# POST /calendarEvents/{calendarEventId}

`POST /calendarEvents/{calendarEventId}`

Updates a calendar event.
  - To set the event to update to recurring, **frequency** must be set to a value other than `NEVER`.
    - **interval** controls how often the event repeats, 
      - Example:  `WEEKLY` with an `interval = 2`, the event repeats every 2 weeks.
      - Default is `1`.
    - **repeatEndType** must be one of:
      - `NEVER`: Repeats indefinitely. Default value.
      - `ON_DATE`: Repeats until the specified **repeatEndDate**.
      - `AFTER`: Repeats for the specified **repeatCount** number of occurrences.
    - If `repeatEndType = ON_DATE`, the **repeatEndDate** must be provided.
    - If `repeatEndType = AFTER`, the **repeatCount** must be provided.
  - If the event to update is recurring, **updateAllRecurring** must be specified:
    - If **updateAllRecurring** is true, all future occurrences of the current event are updated.
    - If **updateAllRecurring** is false, only the current event is updated and future occurrences are not updated. 
      - An optional **repeatSplitOnDate** can be provided and the event is only updated on the specified date and future occurrences are not updated.
      - if the **repeatSplitOnDate** is not provided, this is set to the event's **startTime** value.
  - If the event to update is assigned to a group, **updateAllGrouped** must be specified:
    - If **updateAllGrouped** is true, all events in the group are updated otherwise only the current event is updated.
  - To assign the event to update, **userId** or **linkedUserIds** can be provided, and the event is assigned to those user(s). Otherwise, the event is unassigned.
    - When assigning to a group, i.e. the **linkedUserIds** is provided, the **updateAllGrouped** property must be set to true.

## Path parameters

- `calendarEventId` integer, required

## Request body

- object
  - `startTime` string, date-time, required
  - `endTime` string, date-time, required
  - `eventTitle` string, required
  - `description` string
  - `userId` number
  - `linkedUserIds` number[]
  - `frequency` 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'YEARLY' | 'NEVER'
  - `interval` number
  - `repeatEndType` 'NEVER' | 'ON_DATE' | 'AFTER'
  - `repeatEndDate` string, date, nullable
  - `repeatCount` number
  - `repeatSplitOnDate` string, date-time, nullable
  - `updateAllRecurring` 'TRUE' | 'FALSE', nullable
  - `updateAllGrouped` 'TRUE' | 'FALSE', nullable

## Response `200`

Successful Response

- CalendarEventsResponse
  - `result` string, required
  - `data` CalendarEvent[], required
    - `id` number, required
    - `companyId` number, required
    - `userId` number, nullable, required
    - `userName` string, nullable, required
    - `groupId` number, nullable, required
    - `title` string, required
    - `description` string, nullable, required
    - `eventType` 'JOB_PHASE' | 'QUOTE' | 'ESTIMATE' | 'OTHER', required
    - `jobPhaseId` number, nullable, required
    - `jobId` number, nullable, required
    - `startTime` string, date-time, required — The start time of the calendar event in ISO string format in 15 minute intervals
    - `endTime` string, date-time, required — The end time of the calendar event in ISO string format in 15 minute intervals
    - `isActive` boolean, required
    - `isAllDay` boolean, required
    - `isRecurring` boolean, required
    - `recurringEventDetails` RecurringEventDetails, required
      - `startDate` string, date-time, required
      - `endDate` string, date-time, nullable, required
      - `rRule` string, required
      - `text` string, required
    - `createdAt` string, date-time, required
    - `links` Links[], required
      - `href` string, required
      - `rel` string, required
      - `type` 'GET' | 'POST' | 'PUT' | 'PATCH', required

## Other responses

- `4XX` — Client Request Errors
- `5XX` — Server Errors

---

[API](https://skmtc.dev/fergus/apis/fergus-api.md) · [All operations](https://skmtc.dev/fergus/apis/fergus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fergus/fergus-api/revisions/b4f232a22363/schema)
