PATCH
/api/public/v1/shifts/{shiftId}

Update a shift

Move the times, swap who is on it, or change the role. A shift stays at its location — to move somebody to a different one, create the shift there and delete this.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.

schedule:write

Path Parameters

NameTypeRequiredDescription
shiftIdstringRequiredShift ID.

Request Body

PropertyTypeDescription
employeeIdstringHand it to someone else.
startAtstringISO 8601.
endAtstringISO 8601.
rolestring
notestring
PATCHExample request
curl
curl -X PATCH "https://www.pxb.app/api/public/v1/shifts/{shiftId}" \
  -H "Authorization: Bearer your_access_token" \
  -H "Content-Type: application/json" \
  -d '{
    "endAt": "2026-08-29T22:00:00.000Z"
  }'
200Example response
json
{
  "message": "Shift updated successfully!",
  "content": {
    "shift": {
      "id": "shf_9911",
      "companyId": "com_001",
      "locationId": "loc_abc123",
      "employeeId": "emp_44f1",
      "startAt": "2026-08-29T13:00:00.000Z",
      "endAt": "2026-08-29T21:00:00.000Z",
      "role": "Front desk",
      "note": null,
      "createdById": "emp_12ab",
      "createdAt": "2026-08-20T10:00:00.000Z",
      "updatedAt": "2026-08-20T10:00:00.000Z"
    }
  }
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

Employees → Scheduling
/employee/scheduling
  1. Open Scheduling.
  2. Edit a shift on the grid.