Start a bulk reassignment

POST
/v1/scheduling/reassignments

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.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.

Header Parameters

Idempotency-Key?string

Makes 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.

Length1 <= length <= 256
Coss-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.

Value in"2026-10-10"

Request Body

application/json
  1. body
selection*
strategy?
Default{}
reason_code*string
Value in"host_unavailable""out_of_office""workload""customer_request""offboarding""other"
note?string

Why, in your words: required with an override of someone's availability.

Lengthlength <= 500
overrides?array<>
Itemsitems <= 6
notify?

Response Body

The run, waiting to start.

application/json
  1. response
object*"scheduling.reassignment"
Value in"scheduling.reassignment"
id*string
status*string
Value in"pending""running""completed""cancelled"
reason_code*string
Value in"host_unavailable""out_of_office""workload""customer_request""offboarding""other"
out_of_office*string|null
undo_of*string|null
counts*
created_at*string
started_at*string|null
finished_at*string|null
import { 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"}