Publish draft shifts
Publish the draft shifts of a location between two dates to the team.
POST https://cotlet.dev/api/v1/deputy/locations/{location_id}/shifts/publish
write Confirm
Publishes every draft shift of one location between two dates, so the team sees them. Returns how many were published. Employees may be notified by Deputy, so it waits for you. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| location_id integer required | integer | Location ID from list_locations. |
| date_from date required | date | First day, YYYY-MM-DD. |
| date_to date required | date | Last day, YYYY-MM-DD. |
Request
curl -X POST https://cotlet.dev/api/v1/deputy/locations/1/shifts/publish \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"date_from":"2026-10-01","date_to":"2026-10-01"}' result = client.call("deputy", "publish_shifts", {"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"}) const result = await cotlet.call('deputy', 'publish_shifts', {"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"}); cotlet call deputy publish_shifts --data '{"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"}' Example response
{
"published": 12,
"location_id": 1,
"date_from": "2026-10-26",
"date_to": "2026-11-01"
}