> For the complete documentation index, see [llms.txt](https://docs.vomevolunteer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vomevolunteer.com/resources/schedule/shifts/write-operations.md).

# Write Operations

Shifts can be created, updated, cancelled and assigned in bulk.

* **Create shifts** adds new shifts to an opportunity.
* **Update shifts** changes existing ones, matched by ID.
* **Upsert shifts** does both in one call.
* **Cancel shifts** cancels shifts and can tell whoever was booked.
* **Assign users to shifts** books people onto shifts that already exist.

#### What happens when a shift is created

A shift created through the API behaves like one created in Vome. It gets:

* its reminder notifications (upcoming, almost over, ended)
* a shift chat room, unless the opportunity has shift chat switched off
* the "new shifts available" notification to approved users, when you set `notify_users`

`notify_users` is `false` by default, so an integration syncing a schedule on a timer does not mail everyone on every run.

#### What creating a shift does not do

|                                               | Instead                                                   |
| --------------------------------------------- | --------------------------------------------------------- |
| Assign anyone to the shift                    | Use **Assign users to shifts** after creating it.         |
| Add the shift to a series                     | Shifts created here are standalone. Build series in Vome. |
| Log hours for past-dated shifts               | In Vome this is part of assigning people, so do it there. |
| Reschedule reminders when you change the time | See below.                                                |

<mark style="color:red;">Changing a shift's start or end does</mark> <mark style="color:red;">**not**</mark> <mark style="color:red;">move its reminders. Small corrections are fine. If you are moving a shift by more than an hour or two, cancel it and create a new one so the reminders match.</mark>

#### Response shape

Every write endpoint answers with the same shape, where `errors` is keyed by the position of the entry in your request, starting at `1`.

```json
{
  "success": true,
  "processed": 2,
  "shifts": [
    { "id": "4a9f2c7e-...", "shift_start_at": "2026-11-02T14:00:00Z" }
  ],
  "notified": [
    {
      "opportunity_id": "2f56f3ef-...",
      "shift_ids": ["4a9f2c7e-...", "8c1d3f5a-..."]
    }
  ],
  "errors": {}
}
```

`notified` lists the shifts handed on for reminders, chat rooms and notifications, grouped by opportunity. It is empty on update, which never re-runs them.

By default nothing is written unless every entry is valid, and the response is `400`. Set `allow_partial` to `true` to write the valid entries and have the rest reported back. A request may carry at most 500 shifts.
