client.queues
Call queues and their live state. These methods are on client.queues, where client is a MoreVoice client (see the Python SDK). On AsyncMoreVoice the same methods are awaited. Each one returns the response object and raises an exception when the API answers with an error.
create()
Section titled “create()”Create a queue. Returns the new Queue.
def create(self, body: _m.QueueCreateParamsInput | Mapping[str, Any], *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.Queueclient.queues.create() · await async_client.queues.create() · POST /queues · API reference
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
name |
string |
yes | — |
away_on_missed |
boolean |
no | — |
callbacks |
object |
no | — |
copilot_profile_id |
string | null |
no | cop_… ID. |
enabled |
boolean |
no | — |
hold |
object |
no | — |
max_wait_seconds |
integer |
no | — |
member_team_ids |
string[] |
no | — |
member_user_ids |
string[] |
no | — |
overflow |
object |
no | Fields you leave out are kept. |
ring_timeout_seconds |
integer |
no | — |
strategy |
"longest_idle" | "round_robin" |
no | — |
voice_assistant_id |
string | null |
no | asst_… ID. |
voicemail |
object |
no | — |
wait_keys |
object |
no | — |
wrap_up_seconds |
integer |
no | — |
Returns
Section titled “Returns”Queue:
| Field | Type | Description |
|---|---|---|
id |
string |
The queue’s ID. |
object |
"queue" |
Always queue. |
livemode |
boolean |
true in live mode, false in test mode. |
name |
string |
— |
enabled |
boolean |
A disabled queue takes no calls: they overflow. |
strategy |
"longest_idle" | "round_robin" |
Which available agent rings first: the one idle longest, or in turn. |
member_user_ids |
string[] |
Users who answer this queue’s calls. |
member_team_ids |
string[] |
Teams whose members answer this queue’s calls. |
ring_timeout_seconds |
integer |
How long an agent’s phone rings before the next agent is tried. |
max_wait_seconds |
integer |
How long a caller waits before the overflow action (0: no limit). |
wrap_up_seconds |
integer |
After-call time before an agent gets the next call. |
away_on_missed |
boolean |
An agent who misses a call is set to away. |
overflow |
object |
What happens to callers who waited too long, or when nobody can answer. |
voicemail |
object |
— |
hold |
object |
— |
wait_keys |
object |
— |
callbacks |
object |
How callbacks requested in this queue are returned. |
voice_assistant_id |
string | null |
The assistant whose voice speaks the queue’s announcements. |
copilot_profile_id |
string | null |
The copilot profile agents get on this queue’s calls. |
created |
string |
An ISO-8601 timestamp in UTC. |
updated |
string |
An ISO-8601 timestamp in UTC. |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
queue = client.queues.create({ "max_wait_seconds": 180, "member_team_ids": [ "team_7Hj2Kl4Mn6Pq8Rs0Tu2Vw", ], "name": "Support", "overflow": { "action": "voicemail", },})print(queue)delete()
Section titled “delete()”Delete a queue. Deletes the queue. Inbound routes that sent calls to it no longer target a queue; callers waiting in it now overflow.
def delete(self, id: str, *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.DeletedQueueclient.queues.delete() · await async_client.queues.delete() · DELETE /queues/{id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A queue ID (q_…). |
Returns
Section titled “Returns”DeletedQueue:
| Field | Type | Description |
|---|---|---|
id |
string |
A queue ID (prefix q_). |
object |
"queue" |
Always queue. |
deleted |
true |
— |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
deleted_queue = client.queues.delete("q_7Hk2Lm9Qp")print(deleted_queue)list()
Section titled “list()”List queues. Your queues, newest first.
def list(self, *, limit: int | Unset = 20, starting_after: str | Unset = UNSET, ending_before: str | Unset = UNSET, more_voice_version: str | Unset = UNSET) -> AsyncPage[_m.Queue]client.queues.list() · await async_client.queues.list() · GET /queues · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
limit |
integer |
no | How many objects to return, 1–100 (default 20). |
starting_after |
string |
no | A cursor (next_cursor) or object ID: return the objects after it (older). |
ending_before |
string |
no | A cursor or object ID: return the objects before it (newer). |
Returns
Section titled “Returns”A page of results (QueueList): data, has_more and next_cursor.
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
for queue in client.queues.list(): print(queue)retrieve()
Section titled “retrieve()”Retrieve a queue. Returns the Queue object. Answers 404 with the code resource_missing when nothing has this ID in this organisation and mode.
def retrieve(self, id: str, *, more_voice_version: str | Unset = UNSET) -> _m.Queueclient.queues.retrieve() · await async_client.queues.retrieve() · GET /queues/{id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A queue ID (q_…). |
Returns
Section titled “Returns”Queue:
| Field | Type | Description |
|---|---|---|
id |
string |
The queue’s ID. |
object |
"queue" |
Always queue. |
livemode |
boolean |
true in live mode, false in test mode. |
name |
string |
— |
enabled |
boolean |
A disabled queue takes no calls: they overflow. |
strategy |
"longest_idle" | "round_robin" |
Which available agent rings first: the one idle longest, or in turn. |
member_user_ids |
string[] |
Users who answer this queue’s calls. |
member_team_ids |
string[] |
Teams whose members answer this queue’s calls. |
ring_timeout_seconds |
integer |
How long an agent’s phone rings before the next agent is tried. |
max_wait_seconds |
integer |
How long a caller waits before the overflow action (0: no limit). |
wrap_up_seconds |
integer |
After-call time before an agent gets the next call. |
away_on_missed |
boolean |
An agent who misses a call is set to away. |
overflow |
object |
What happens to callers who waited too long, or when nobody can answer. |
voicemail |
object |
— |
hold |
object |
— |
wait_keys |
object |
— |
callbacks |
object |
How callbacks requested in this queue are returned. |
voice_assistant_id |
string | null |
The assistant whose voice speaks the queue’s announcements. |
copilot_profile_id |
string | null |
The copilot profile agents get on this queue’s calls. |
created |
string |
An ISO-8601 timestamp in UTC. |
updated |
string |
An ISO-8601 timestamp in UTC. |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
queue = client.queues.retrieve("q_7Hk2Lm9Qp")print(queue)retrieve_live()
Section titled “retrieve_live()”Retrieve a queue’s live state. Who is waiting and for how long, which agents can take the calls, and today’s numbers. A snapshot: poll it, or follow queue.* events.
def retrieve_live(self, id: str, *, more_voice_version: str | Unset = UNSET) -> _m.QueueLiveclient.queues.retrieve_live() · await async_client.queues.retrieve_live() · GET /queues/{id}/live · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A queue ID (q_…). |
Returns
Section titled “Returns”QueueLive:
| Field | Type | Description |
|---|---|---|
object |
"queue_live" |
Always queue_live. |
queue_id |
string |
A queue ID (prefix q_). |
livemode |
boolean |
true in live mode, false in test mode. |
enabled |
boolean |
— |
waiting |
integer |
Callers waiting for an agent right now. |
longest_wait_seconds |
integer | null |
How long the longest-waiting caller has waited (null: nobody waits). |
agents |
object |
The queue’s signed-in members by status. |
callers |
object[] |
Waiting callers, longest wait first. |
members |
object[] |
The queue’s signed-in members. |
callbacks_offered |
integer |
Callbacks ringing this queue’s agents right now. |
today |
object | null |
Since midnight (Israel time); null when the statistics are unavailable. |
as_of |
string |
An ISO-8601 timestamp in UTC. |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
queue_live = client.queues.retrieve_live("q_7Hk2Lm9Qp")print(queue_live)update()
Section titled “update()”Update a queue. Updates the fields you send. Nested objects (overflow, hold, callbacks…) merge with the stored values; lists replace them.
def update(self, id: str, body: _m.QueueUpdateParamsInput | Mapping[str, Any] | Unset = UNSET, *, more_voice_version: str | Unset = UNSET) -> _m.Queueclient.queues.update() · await async_client.queues.update() · PATCH /queues/{id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A queue ID (q_…). |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
away_on_missed |
boolean |
no | — |
callbacks |
object |
no | — |
copilot_profile_id |
string | null |
no | cop_… ID. |
enabled |
boolean |
no | — |
hold |
object |
no | — |
max_wait_seconds |
integer |
no | — |
member_team_ids |
string[] |
no | — |
member_user_ids |
string[] |
no | — |
name |
string |
no | — |
overflow |
object |
no | Fields you leave out are kept. |
ring_timeout_seconds |
integer |
no | — |
strategy |
"longest_idle" | "round_robin" |
no | — |
voice_assistant_id |
string | null |
no | asst_… ID. |
voicemail |
object |
no | — |
wait_keys |
object |
no | — |
wrap_up_seconds |
integer |
no | — |
Returns
Section titled “Returns”Queue:
| Field | Type | Description |
|---|---|---|
id |
string |
The queue’s ID. |
object |
"queue" |
Always queue. |
livemode |
boolean |
true in live mode, false in test mode. |
name |
string |
— |
enabled |
boolean |
A disabled queue takes no calls: they overflow. |
strategy |
"longest_idle" | "round_robin" |
Which available agent rings first: the one idle longest, or in turn. |
member_user_ids |
string[] |
Users who answer this queue’s calls. |
member_team_ids |
string[] |
Teams whose members answer this queue’s calls. |
ring_timeout_seconds |
integer |
How long an agent’s phone rings before the next agent is tried. |
max_wait_seconds |
integer |
How long a caller waits before the overflow action (0: no limit). |
wrap_up_seconds |
integer |
After-call time before an agent gets the next call. |
away_on_missed |
boolean |
An agent who misses a call is set to away. |
overflow |
object |
What happens to callers who waited too long, or when nobody can answer. |
voicemail |
object |
— |
hold |
object |
— |
wait_keys |
object |
— |
callbacks |
object |
How callbacks requested in this queue are returned. |
voice_assistant_id |
string | null |
The assistant whose voice speaks the queue’s announcements. |
copilot_profile_id |
string | null |
The copilot profile agents get on this queue’s calls. |
created |
string |
An ISO-8601 timestamp in UTC. |
updated |
string |
An ISO-8601 timestamp in UTC. |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
queue = client.queues.update("q_7Hk2Lm9Qp", { "enabled": False,})print(queue)