Upsert shifts
This endpoint creates and updates shifts in one call. An entry with no id is created. An entry with an id is updated.
An id that does not match a shift in your organization is reported as an error rather than created, so that a stale ID cannot quietly produce a duplicate shift.
Endpoint
POST api/shifts/bulk-upsert/Example Request Payload
{
"allow_partial": true,
"shifts": [
{
"id": "4a9f2c7e-1b2c-4d3e-8f90-a1b2c3d4e5f6",
"spots": 20
},
{
"opportunity_id": "2f56f3ef-08f5-4e5a-bf5b-76ca8fc4d5f1",
"shift_start_at": "2026-11-16T14:00:00Z",
"shift_end_at": "2026-11-16T17:00:00Z",
"spots": 12,
"use_default_location": true
}
]
}Behavior
Entries without an
idfollow the same rules as Create shifts, including the duplicate-time guard.Entries with an
idfollow the same rules as Update shifts, changing only the fields you send.