Create a draft shift

Add a shift to a location as a draft that only managers see.

POST https://cotlet.dev/api/v1/deputy/locations/{location_id}/shifts

write Confirm

Adds one shift as a draft, so it shows to managers and not to the team until publish_shifts runs. Leave employee_id out to create an open shift. Returns the shift_id. It never notifies anyone. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: create_shift
NameTypeDescription
location_id integer required integer Location ID from list_locations.
date date required date Day of the shift, YYYY-MM-DD.
start string required string Start time, HH:MM.
end string required string End time, HH:MM.
employee_id integer integer Employee ID from list_employees. Default: open shift.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/deputy/locations/1/shifts \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"2026-10-01","start":"start","end":"end"}'
Python
result = client.call("deputy", "create_shift", {"location_id":1,"date":"2026-10-01","start":"start","end":"end"})
Node.js
const result = await cotlet.call('deputy', 'create_shift', {"location_id":1,"date":"2026-10-01","start":"start","end":"end"});
CLI
cotlet call deputy create_shift --data '{"location_id":1,"date":"2026-10-01","start":"start","end":"end"}'

Example response

JSON

{
  "shift_id": 733,
  "date": "2026-10-26",
  "start": "09:00",
  "end": "17:00",
  "employee": "Ana Lopez",
  "state": "draft"
}

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.