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

write Confirm

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

Parameters: publish_shifts
NameTypeDescription
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
curl -X POST https://cotlet.dev/api/v1/connecteam/schedulers/1/shifts/publish \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("connecteam", "publish_shifts", {"scheduler_id":1})
Node.js
const result = await cotlet.call('connecteam', 'publish_shifts', {"scheduler_id":1});
CLI
cotlet call connecteam publish_shifts --data '{"scheduler_id":1}'

Example response

JSON

{
  "scheduler_id": 1177,
  "published": 14
}

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.