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

Parameters: publish_shifts
NameTypeDescription
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
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"}'
Python
result = client.call("deputy", "publish_shifts", {"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"})
Node.js
const result = await cotlet.call('deputy', 'publish_shifts', {"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"});
CLI
cotlet call deputy publish_shifts --data '{"location_id":1,"date_from":"2026-10-01","date_to":"2026-10-01"}'

Example response

JSON

{
  "published": 12,
  "location_id": 1,
  "date_from": "2026-10-26",
  "date_to": "2026-11-01"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.