> 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/create-shifts.md).

# Create shifts

This endpoint creates one or more shifts on opportunities in your organization.

Shifts created here behave like shifts created in Vome: they get their reminder notifications and a chat room, and they can announce themselves to approved users. See Write Operations for exactly what does and does not happen.

#### Endpoint

```plaintext
POST api/shifts/bulk-create/
```

#### Example Request Payload

```json
{
    "allow_partial": false,
    "allow_duplicate_times": false,
    "notify_users": true,
    "shifts": [
        {
            "opportunity_id": "2f56f3ef-08f5-4e5a-bf5b-76ca8fc4d5f1",
            "shift_start_at": "2026-11-02T14:00:00Z",
            "shift_end_at": "2026-11-02T17:00:00Z",
            "shift_timezone": "ET",
            "spots": 12,
            "minimum_time_minutes": 90,
            "shift_title": "Saturday morning",
            "shift_description": "Meet at the front desk.",
            "shift_location_id": "6f3b1c2a-9a1e-4a3f-9d21-0f0a2f5c77aa",
            "shift_type": 0  // 0 Fixed, 1 Flexible, 2 Self Schedule
        },
        {
            "opportunity_id": "2f56f3ef-08f5-4e5a-bf5b-76ca8fc4d5f1",
            "shift_start_at": "2026-11-09T14:00:00Z",
            "shift_end_at": "2026-11-09T17:00:00Z",
            "spots": 12,
            "use_default_location": true
        }
    ]
}
```

#### Request options

| Field                   | Required | Description                                                                          |
| ----------------------- | -------- | ------------------------------------------------------------------------------------ |
| `shifts`                | yes      | Between 1 and 500 shifts.                                                            |
| `notify_users`          | no       | Send the "new shifts available" notification to approved users. Defaults to `false`. |
| `allow_duplicate_times` | no       | Allow a shift at a time another shift already occupies. Defaults to `false`.         |
| `allow_partial`         | no       | Create the valid shifts and report the rest. Defaults to `false`.                    |

#### Shift fields

| Field                  | Required | Description                                                                                                    |
| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| `opportunity_id`       | yes      | The opportunity the shift belongs to.                                                                          |
| `shift_start_at`       | yes      | Start time, in UTC.                                                                                            |
| `shift_end_at`         | yes      | End time, in UTC. Must be after the start.                                                                     |
| `spots`                | yes      | How many people can book.                                                                                      |
| `shift_timezone`       | no       | The zone the shift is read in. See **Time zones** below.                                                       |
| `shift_type`           | no       | `0` Fixed, `1` Flexible, `2` Self Schedule. Defaults to `0`.                                                   |
| `minimum_time_minutes` | no       | Shortest time someone can book, in minutes.                                                                    |
| `shift_title`          | no       | Shown instead of the opportunity title.                                                                        |
| `shift_description`    | no       | Shown on the shift.                                                                                            |
| `shift_location_id`    | no       | A shift location. See [Shift Locations](https://docs.vomevolunteer.com/resources/schedule/shift-locations.md). |
| `use_default_location` | no       | Inherit the opportunity's address instead of naming a location.                                                |

#### Time zones

Start and end times are always sent **in UTC**. `shift_timezone` is separate: it records the zone the shift is read in, so it shows the right local hour to the people booking it.

You can leave `shift_timezone` out. When you do, the shift takes **your organization's account holder's time zone**, which is the closest thing Vome stores to an organization time zone.

When you do send it, either form works:

| Send                                                                         | Meaning                                |
| ---------------------------------------------------------------------------- | -------------------------------------- |
| `ET`, `CT`, `MT`, `PT`                                                       | The short codes shown throughout Vome. |
| `AT`, `NT`, `MST`, `AKST`, `HST`                                             | Other North American zones.            |
| `GMT`, `CET`, `JST`, `IST`, `SGT`, `HKT`, `MYT`, `ICT`, `WIB`, `PHT`, `AEST` | Zones outside North America.           |
| `America/Toronto`                                                            | A full IANA name, if you prefer.       |

Codes are case-insensitive, so `et` and `ET` are the same.

A code can cover several zones that keep the same clock. When your account holder already sits in one of them, that is the one used, so an organization in Toronto sending `ET` gets `America/Toronto`.

<mark style="color:red;">A time zone we do not recognise is an error, not a fall back to UTC. A shift in the wrong zone looks correct until somebody turns up at the wrong hour, so the request is refused and the response lists the codes you can use.</mark>

#### The location switch

A shift either points at a shift location or inherits its opportunity's address.

* Send `shift_location_id` to point at a location.
* Send `use_default_location: true` to inherit the opportunity's address.
* Send neither and the shift inherits the opportunity's address, the same as the default.

Sending both is rejected.

#### Duplicate times

A shift on the same opportunity at exactly the same start and end is refused, because sending a batch twice is the easiest mistake to make. Set `allow_duplicate_times` to `true` when two shifts really do run at the same time.
