Start a bulk reassignment
Moves up to 5,000 bookings in the background, each on its own, so one that can't move never holds up the rest. Nothing's ever cancelled: a booking nobody can take stays where it is, and its item says so. It answers at once: follow the run by its id, or wait for scheduling.reassignment.completed.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
Idempotency-Key?stringMakes retries safe: a repeated request with the same key and body returns the original run instead of starting another, for 24 hours. 1-256 characters.
1 <= length <= 256Coss-Version?"2026-10-10"The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.
"2026-10-10"application/json- body
- body
- …
selection*strategy?{}reason_code*string"host_unavailable""out_of_office""workload""customer_request""offboarding""other"note?stringWhy, in your words: required with an override of someone's availability.
length <= 500overrides?array<>items <= 6notify?The run, waiting to start.
application/json- response
- response
- …
object*"scheduling.reassignment""scheduling.reassignment"id*stringstatus*string"pending""running""completed""cancelled"reason_code*string"host_unavailable""out_of_office""workload""customer_request""offboarding""other"out_of_office*string|nullundo_of*string|nullcounts*created_at*stringstarted_at*string|nullfinished_at*string|nullimport { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.scheduling.reassignments.create({ selection: { out_of_office: "ooo_01kd2m9a0b1c2d3e4f5g6h7j8m", }, strategy: { preferred_hosts: [ "doctor_518", ], }, reason_code: "out_of_office",});{ "object": "scheduling.reassignment", "id": "reasn_01kd2m9a0b1c2d3e4f5g6h7j8m", "status": "completed", "reason_code": "out_of_office", "out_of_office": "ooo_01kd2m9a0b1c2d3e4f5g6h7j8m", "undo_of": null, "counts": { "total": 12, "pending": 0, "reassigned": 11, "skipped": 0, "no_candidate": 1, "failed": 0, "cancelled": 0 }, "created_at": "2027-01-01T10:00:00.000Z", "started_at": "2027-01-01T10:00:01.000Z", "finished_at": "2027-01-01T10:00:09.000Z"}