Skip to main content
POST
Apply Rerouted Operations

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer <key>. Create one in the SWITCH Copilot under Settings → API keys (needs the API keys permission in your company), or with POST /auth/api-keys. The key is shown once, at creation.

Path Parameters

route_id
integer
required

Route ID, from the session detail or the route list.

Body

application/json

Request body for applying a reroute preview.

Contains the new operations to insert. This is the output of generate/optimize, sent back to apply.

new_operations
RerouteSuggestion · object[]
required

Operations to insert (from a previous generate/optimize call).

Minimum array length: 1

Response

Reroute applied. Returns removed/inserted counts.

Confirmation of a reroute apply action.

route_id
integer
required

Route ID.

removed_operations
integer
required

Number of pending operations removed.

inserted_operations
integer
required

Number of new operations inserted.