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
| Name | Type | Description |
|---|---|---|
| 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 -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"}' result = client.call("deputy", "create_shift", {"location_id":1,"date":"2026-10-01","start":"start","end":"end"}) const result = await cotlet.call('deputy', 'create_shift', {"location_id":1,"date":"2026-10-01","start":"start","end":"end"}); cotlet call deputy create_shift --data '{"location_id":1,"date":"2026-10-01","start":"start","end":"end"}' Example response
{
"shift_id": 733,
"date": "2026-10-26",
"start": "09:00",
"end": "17:00",
"employee": "Ana Lopez",
"state": "draft"
}