DELETE
/api/public/v1/shifts/{shiftId}Delete a shift
Takes the shift off the rota. Any time clock entry that linked itself to it keeps its own hours — deleting the plan does not rewrite what was worked.
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
| Name | Type | Required | Description |
|---|---|---|---|
shiftId | string | Required | Shift ID. |
DELETEExample request
curl
curl -X DELETE "https://www.pxb.app/api/public/v1/shifts/{shiftId}" \
-H "Authorization: Bearer your_access_token"200Example response
json
{
"message": "Shift deleted successfully!",
"content": {
"shiftId": "shf_9911"
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.