Switch a merge queue's mode
Starts a conversion between queue and graph mode. Switching to the mode the queue is already in is an idempotent no-op. A queue already mid-conversion is refused with MODE_CHANGE_IN_PROGRESS. The response carries the state the merge engine reported after the write, so a started conversion reports switchingModes.
Authorizations
An API key, sent as Authorization: Bearer <key>. An organization admin creates one in the Trunk app under Settings → Developer → API Keys and chooses the merge-queue permissions it holds; a key with none can read merge queues but change nothing. Those permissions scope merge queue only: every key can use the Flaky Tests and Dynamic CI endpoints, including their writes, whatever permissions it holds.
Path Parameters
The merge queue's id.
"xK9mP2nQ"
Body
queue, graph Response
The queue's post-write state
The queue's state after the write, as the merge engine reported it — never an echo of the requested action, so a queue mid-conversion reports switchingModes.
"xK9mP2nQ"
The queue's lifecycle state. switchingModes is a transient conversion state during which config and mode writes are refused.
running, paused, draining, switchingModes "running"
The engine a queue runs. queue tests entries in strict arrival order, one line. graph builds a dependency graph and may test entries speculatively in parallel, which merges faster but can require bisection to attribute a failure. Changing mode is a real conversion, not a flag flip — see mergeQueues.switchModes.
queue, graph "queue"
Path — not an absolute URL — of this queue's pull-request collection on the Trunk API.
"/v2/merge-queues/xK9mP2nQ/pull-requests"