Publish shifts
Publish the draft shifts of a schedule so employees see them. All drafts, or only the shift ids you pass.
POST https://cotlet.dev/api/v1/connecteam/schedulers/{scheduler_id}/shifts/publish
Publishes drafts, which makes them visible to the assigned users. Without shift_ids it publishes every draft of the schedule, like the Publish button at the top right; with shift_ids it publishes only those, which is a bulk action of the Advanced plan in the Operations hub. A shift needs a title or a job, and assigned users or claiming turned on, to be published. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| scheduler_id integer required | integer | Schedule ID from list_schedulers. |
| shift_ids array | array | Shift IDs from list_shifts. Default: all drafts of the schedule. |
Request
curl -X POST https://cotlet.dev/api/v1/connecteam/schedulers/1/shifts/publish \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("connecteam", "publish_shifts", {"scheduler_id":1}) const result = await cotlet.call('connecteam', 'publish_shifts', {"scheduler_id":1}); cotlet call connecteam publish_shifts --data '{"scheduler_id":1}' Example response
{
"scheduler_id": 1177,
"published": 14
}