Overview / Operations / Update a shift

Update a shift

patch https://api.flactrum.com/v1/shifts/{shift}
Required scope shifts.write
Success status200
Returns One Shift object

Parameters

NameInTypeDescription
shift * path string ULID of the record.

Request body

FieldTypeDescription
branch_id * string —
name * string —
start_time * string —
end_time * string An end before the start means the shift crosses midnight. That is valid.
color string|null —

Response fields

FieldTypeDescription
id string —
branch_id string —
name string —
start_time string —
end_time string —
crosses_midnight boolean True when the shift runs into the next day (23:00–07:00).
color string|null —
assignment_count integer —

Examples

Recorded from the test suite — these are real requests and their real responses.

curl -X PATCH 'https://api.flactrum.com/v1/shifts/01m43mzajhtwxa3zcyjz55tgf4' \
  -H 'Authorization: Bearer flk_your_key:your_secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Erken"
}'

HTTP 200 · application/json

{
    "data": {
        "id": "01m43mzajhtwxa3zcyjz55tgf4",
        "branch_id": "01m43mzaj0mr7w28veyst93v03",
        "name": "Erken",
        "start_time": "07:00:00",
        "end_time": "15:00:00",
        "crosses_midnight": false,
        "color": "#6A34E0",
        "assignment_count": 0,
        "created_at": "2026-10-04T14:27:03+00:00",
        "updated_at": "2026-10-04T14:27:03+00:00"
    }
}