Reorder a call in the queue
const url = 'https://api.caller9.app/v1/calls/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reorder';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"dir":-1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.caller9.app/v1/calls/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reorder \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "dir": -1 }'Changes a main-queue call’s position. Send either dir (swap with the
adjacent call above/below) or beforeGuid (move in front of that call, or
null to move to the end). Moving past the top/bottom edge, or dropping a
call on itself, is a no-op. Hotline calls cannot be reordered. The new order
is shared by every operator viewing the studio.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Call ID (UUID).
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Action accepted.
object
Example
{ "ok": true}only queued calls can be reordered (hotline call),
target call not found (beforeGuid not in the queue), or
dir (1 | -1) or beforeGuid (guid | null) is required.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Missing, invalid, expired or revoked API key.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}The key isn’t allowed to do this (e.g. a read-only key making a change).
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}call not found — the call doesn’t exist, belongs to another organization,
or has already ended (or, for reorder, call not found in queue).
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Too many requests for this API key. Retry after Retry-After seconds.
object
Human-readable error message.
Machine-readable code (authentication failures only, e.g. KEY_EXPIRED, RATE_LIMITED).
Example generated
{ "error": "example", "code": "example"}Headers
Section titled “Headers”Seconds until the rate-limit window resets.