client.callbacks
Callback requests and their scheduling. These methods are on client.callbacks, 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.
add_note()
Section titled “add_note()”Add a note to a callback. Appends a note, stamped with the time and the API key’s name. Needs a live key.
def add_note(self, id: str, body: _m.CallbacksAddNoteBody | Mapping[str, Any], *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.Callbackclient.callbacks.add_note() · await async_client.callbacks.add_note() · POST /callbacks/{id}/notes · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A callback ID (cb_…). |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
text |
string |
yes | The note (stamped with the time and the API key’s name). |
Returns
Section titled “Returns”Callback:
| Field | Type | Description |
|---|---|---|
object |
"callback" |
Always callback. |
id |
string |
A callback ID (prefix cb_). |
livemode |
boolean |
true in live mode, false in test mode. |
phone |
string |
The number to call back, E.164. |
name |
string |
The person’s name, when known. |
status |
string |
pending (waiting for its time), offered (ringing an agent), dialing, connected (on the call back), completed, failed (attempts used up), cancelled or expired (past its window, or too old). |
source |
string |
Where the request came from: queue (a caller pressed the callback key), ivr, flow, ai (the assistant booked it), web (a website form), manual, campaign, voicemail or api. |
site_id |
string | null |
The website form it came from (source = web). |
due_at |
string |
The earliest time to call back (moved into business hours). |
window_end |
string | null |
Don’t call after this time; null: no limit. |
priority |
integer |
1 (low) … 10 (urgent); higher is returned sooner. |
route |
string |
Who returns it: agent_queue (offered to the next free agent of queue_id, then dialled), agent (agent_id calls back) or assistant (the AI assistant_id calls back). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
usr_… ID. |
claimed_by |
string | null |
usr_… ID. |
assistant_id |
string | null |
asst_… ID. |
attempts |
integer |
Call-back attempts made so far. |
max_attempts |
integer |
— |
last_attempt_at |
string | null |
— |
last_result |
string | null |
The last attempt’s result, e.g. answered, no-answer, busy, done-manually. |
call_id |
string | null |
call_… ID. |
origin_call_id |
string | null |
call_… ID. |
notes |
string |
Notes for whoever returns it (each note is stamped with its time and author). |
summary |
string | null |
The AI summary of the originating call, when there is one. |
voicemail |
CallbackVoicemail | null |
source = voicemail: the message the caller left. null for every other source. |
sla_at |
string | null |
When it should have been returned by (the SLA target, in business hours). |
merged_requests |
integer |
Later requests for the same number merged into this one. |
context |
object |
— |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
completed_at |
string | null |
— |
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
callback = client.callbacks.add_note("cb_7Hk2Lm9Qp", { "text": "Prefers a call after 17:00.",})print(callback)attach()
Section titled “attach()”Attach the agent’s call to a callback. Step 2 after POST …/start: the call the agent’s softphone placed for the callback (it must be running). Its end records the attempt (answered: completed). A callback this agent did not start is a 409 (reason not-started). Needs a live key.
def attach(self, id: str, body: _m.CallbacksAttachBody | Mapping[str, Any], *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.Callbackclient.callbacks.attach() · await async_client.callbacks.attach() · POST /callbacks/{id}/attach · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A callback ID (cb_…). |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
agent_id |
string |
yes | The agent who started the callback (POST …/start). |
call_id |
string |
yes | The call the agent’s softphone placed for it (running now). |
Returns
Section titled “Returns”Callback:
| Field | Type | Description |
|---|---|---|
object |
"callback" |
Always callback. |
id |
string |
A callback ID (prefix cb_). |
livemode |
boolean |
true in live mode, false in test mode. |
phone |
string |
The number to call back, E.164. |
name |
string |
The person’s name, when known. |
status |
string |
pending (waiting for its time), offered (ringing an agent), dialing, connected (on the call back), completed, failed (attempts used up), cancelled or expired (past its window, or too old). |
source |
string |
Where the request came from: queue (a caller pressed the callback key), ivr, flow, ai (the assistant booked it), web (a website form), manual, campaign, voicemail or api. |
site_id |
string | null |
The website form it came from (source = web). |
due_at |
string |
The earliest time to call back (moved into business hours). |
window_end |
string | null |
Don’t call after this time; null: no limit. |
priority |
integer |
1 (low) … 10 (urgent); higher is returned sooner. |
route |
string |
Who returns it: agent_queue (offered to the next free agent of queue_id, then dialled), agent (agent_id calls back) or assistant (the AI assistant_id calls back). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
usr_… ID. |
claimed_by |
string | null |
usr_… ID. |
assistant_id |
string | null |
asst_… ID. |
attempts |
integer |
Call-back attempts made so far. |
max_attempts |
integer |
— |
last_attempt_at |
string | null |
— |
last_result |
string | null |
The last attempt’s result, e.g. answered, no-answer, busy, done-manually. |
call_id |
string | null |
call_… ID. |
origin_call_id |
string | null |
call_… ID. |
notes |
string |
Notes for whoever returns it (each note is stamped with its time and author). |
summary |
string | null |
The AI summary of the originating call, when there is one. |
voicemail |
CallbackVoicemail | null |
source = voicemail: the message the caller left. null for every other source. |
sla_at |
string | null |
When it should have been returned by (the SLA target, in business hours). |
merged_requests |
integer |
Later requests for the same number merged into this one. |
context |
object |
— |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
completed_at |
string | null |
— |
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
callback = client.callbacks.attach("cb_7Hk2Lm9Qp", { "agent_id": "usr_4Gk2LmN9pQ4rS6tV8wX0yZ", "call_id": "call_8tRPaZp5hLMbrGqdJ9AmNa",})print(callback)call()
Section titled “call()”Call a callback now. Calls the customer back now, without waiting for its time. via agent: rings agent_id’s softphone right away (they must be connected and not on a call: 409 offline / on-call); answering dials the customer. via assistant: the AI assistant calls them now. A callback ringing for someone else, on a call or closed is a 409; a number on the do-not-call list a 403. Needs a live key.
def call(self, id: str, body: _m.CallbacksCallBody | Mapping[str, Any] | Unset = UNSET, *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.CallbackCallResultclient.callbacks.call() · await async_client.callbacks.call() · POST /callbacks/{id}/call · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A callback ID (cb_…). |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
agent_id |
string |
no | The agent the action is taken for (a member’s user ID): the callback must be one they see in the inbox (theirs, claimed or created by them, or their queues’), as in the app. Required with via agent; they must be connected and free. |
via |
"agent" | "assistant" |
no | agent (default): ring agent_id’s softphone now; answering dials the customer. assistant: the callback’s AI assistant calls the customer now. |
Returns
Section titled “Returns”CallbackCallResult:
| Field | Type | Description |
|---|---|---|
object |
"callback_call" |
Always callback_call. |
via |
"agent" | "assistant" |
— |
call_id |
string | null |
call_… ID. |
callback |
Callback |
A request to call someone back, and its progress. |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
callback_call_result = client.callbacks.call("cb_7Hk2Lm9Qp", { "agent_id": "usr_4Gk2LmN9pQ4rS6tV8wX0yZ", "via": "agent",})print(callback_call_result)cancel()
Section titled “cancel()”Cancel a callback. Cancels an open callback that is not on a call right now (409 otherwise). Emits callback.cancelled. Needs a live key.
def cancel(self, id: str, body: _m.CallbacksCancelBody | Mapping[str, Any] | Unset = UNSET, *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.Callbackclient.callbacks.cancel() · await async_client.callbacks.cancel() · POST /callbacks/{id}/cancel · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A callback ID (cb_…). |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
reason |
string |
no | Why (kept in the callback’s history). |
Returns
Section titled “Returns”Callback:
| Field | Type | Description |
|---|---|---|
object |
"callback" |
Always callback. |
id |
string |
A callback ID (prefix cb_). |
livemode |
boolean |
true in live mode, false in test mode. |
phone |
string |
The number to call back, E.164. |
name |
string |
The person’s name, when known. |
status |
string |
pending (waiting for its time), offered (ringing an agent), dialing, connected (on the call back), completed, failed (attempts used up), cancelled or expired (past its window, or too old). |
source |
string |
Where the request came from: queue (a caller pressed the callback key), ivr, flow, ai (the assistant booked it), web (a website form), manual, campaign, voicemail or api. |
site_id |
string | null |
The website form it came from (source = web). |
due_at |
string |
The earliest time to call back (moved into business hours). |
window_end |
string | null |
Don’t call after this time; null: no limit. |
priority |
integer |
1 (low) … 10 (urgent); higher is returned sooner. |
route |
string |
Who returns it: agent_queue (offered to the next free agent of queue_id, then dialled), agent (agent_id calls back) or assistant (the AI assistant_id calls back). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
usr_… ID. |
claimed_by |
string | null |
usr_… ID. |
assistant_id |
string | null |
asst_… ID. |
attempts |
integer |
Call-back attempts made so far. |
max_attempts |
integer |
— |
last_attempt_at |
string | null |
— |
last_result |
string | null |
The last attempt’s result, e.g. answered, no-answer, busy, done-manually. |
call_id |
string | null |
call_… ID. |
origin_call_id |
string | null |
call_… ID. |
notes |
string |
Notes for whoever returns it (each note is stamped with its time and author). |
summary |
string | null |
The AI summary of the originating call, when there is one. |
voicemail |
CallbackVoicemail | null |
source = voicemail: the message the caller left. null for every other source. |
sla_at |
string | null |
When it should have been returned by (the SLA target, in business hours). |
merged_requests |
integer |
Later requests for the same number merged into this one. |
context |
object |
— |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
completed_at |
string | null |
— |
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
callback = client.callbacks.cancel("cb_7Hk2Lm9Qp", { "reason": "Customer called us back",})print(callback)claim()
Section titled “claim()”Take a callback for an agent. The agent takes the callback (“I’ll take it”): it becomes theirs (route agent, agent_id and claimed_by them) until they give it back. The callback must be in the agent’s inbox; an agent can’t take one another agent took (409, reason claimed), a supervisor or admin can. Needs a live key.
def claim(self, id: str, body: _m.CallbacksClaimBody | Mapping[str, Any], *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.Callbackclient.callbacks.claim() · await async_client.callbacks.claim() · POST /callbacks/{id}/claim · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A callback ID (cb_…). |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
agent_id |
string |
yes | The agent the action is taken for (a member’s user ID): the callback must be one they see in the inbox (theirs, claimed or created by them, or their queues’), as in the app. It becomes theirs (route agent). |
Returns
Section titled “Returns”Callback:
| Field | Type | Description |
|---|---|---|
object |
"callback" |
Always callback. |
id |
string |
A callback ID (prefix cb_). |
livemode |
boolean |
true in live mode, false in test mode. |
phone |
string |
The number to call back, E.164. |
name |
string |
The person’s name, when known. |
status |
string |
pending (waiting for its time), offered (ringing an agent), dialing, connected (on the call back), completed, failed (attempts used up), cancelled or expired (past its window, or too old). |
source |
string |
Where the request came from: queue (a caller pressed the callback key), ivr, flow, ai (the assistant booked it), web (a website form), manual, campaign, voicemail or api. |
site_id |
string | null |
The website form it came from (source = web). |
due_at |
string |
The earliest time to call back (moved into business hours). |
window_end |
string | null |
Don’t call after this time; null: no limit. |
priority |
integer |
1 (low) … 10 (urgent); higher is returned sooner. |
route |
string |
Who returns it: agent_queue (offered to the next free agent of queue_id, then dialled), agent (agent_id calls back) or assistant (the AI assistant_id calls back). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
usr_… ID. |
claimed_by |
string | null |
usr_… ID. |
assistant_id |
string | null |
asst_… ID. |
attempts |
integer |
Call-back attempts made so far. |
max_attempts |
integer |
— |
last_attempt_at |
string | null |
— |
last_result |
string | null |
The last attempt’s result, e.g. answered, no-answer, busy, done-manually. |
call_id |
string | null |
call_… ID. |
origin_call_id |
string | null |
call_… ID. |
notes |
string |
Notes for whoever returns it (each note is stamped with its time and author). |
summary |
string | null |
The AI summary of the originating call, when there is one. |
voicemail |
CallbackVoicemail | null |
source = voicemail: the message the caller left. null for every other source. |
sla_at |
string | null |
When it should have been returned by (the SLA target, in business hours). |
merged_requests |
integer |
Later requests for the same number merged into this one. |
context |
object |
— |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
completed_at |
string | null |
— |
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
callback = client.callbacks.claim("cb_7Hk2Lm9Qp", { "agent_id": "usr_4Gk2LmN9pQ4rS6tV8wX0yZ",})print(callback)complete()
Section titled “complete()”Mark a callback done. Closes an open callback that was resolved another way (409 while it is on a call). Emits callback.completed. Needs a live key.
def complete(self, id: str, body: _m.CallbacksCompleteBody | Mapping[str, Any] | Unset = UNSET, *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.Callbackclient.callbacks.complete() · await async_client.callbacks.complete() · POST /callbacks/{id}/complete · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A callback ID (cb_…). |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
note |
string |
no | How it was resolved (added to the notes). |
Returns
Section titled “Returns”Callback:
| Field | Type | Description |
|---|---|---|
object |
"callback" |
Always callback. |
id |
string |
A callback ID (prefix cb_). |
livemode |
boolean |
true in live mode, false in test mode. |
phone |
string |
The number to call back, E.164. |
name |
string |
The person’s name, when known. |
status |
string |
pending (waiting for its time), offered (ringing an agent), dialing, connected (on the call back), completed, failed (attempts used up), cancelled or expired (past its window, or too old). |
source |
string |
Where the request came from: queue (a caller pressed the callback key), ivr, flow, ai (the assistant booked it), web (a website form), manual, campaign, voicemail or api. |
site_id |
string | null |
The website form it came from (source = web). |
due_at |
string |
The earliest time to call back (moved into business hours). |
window_end |
string | null |
Don’t call after this time; null: no limit. |
priority |
integer |
1 (low) … 10 (urgent); higher is returned sooner. |
route |
string |
Who returns it: agent_queue (offered to the next free agent of queue_id, then dialled), agent (agent_id calls back) or assistant (the AI assistant_id calls back). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
usr_… ID. |
claimed_by |
string | null |
usr_… ID. |
assistant_id |
string | null |
asst_… ID. |
attempts |
integer |
Call-back attempts made so far. |
max_attempts |
integer |
— |
last_attempt_at |
string | null |
— |
last_result |
string | null |
The last attempt’s result, e.g. answered, no-answer, busy, done-manually. |
call_id |
string | null |
call_… ID. |
origin_call_id |
string | null |
call_… ID. |
notes |
string |
Notes for whoever returns it (each note is stamped with its time and author). |
summary |
string | null |
The AI summary of the originating call, when there is one. |
voicemail |
CallbackVoicemail | null |
source = voicemail: the message the caller left. null for every other source. |
sla_at |
string | null |
When it should have been returned by (the SLA target, in business hours). |
merged_requests |
integer |
Later requests for the same number merged into this one. |
context |
object |
— |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
completed_at |
string | null |
— |
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
callback = client.callbacks.complete("cb_7Hk2Lm9Qp", { "note": "Reached by email",})print(callback)counts()
Section titled “counts()”Callback inbox counts. The numbers on the callbacks inbox’s badges and tabs: open, due, mine, queue, breached, voicemails, and the missed calls. With agent_id, as that agent’s inbox counts them (their queues and their own); without it, for the whole organization. Test keys get zeros (callbacks are live).
def counts(self, *, agent_id: str | Unset = UNSET, more_voice_version: str | Unset = UNSET) -> _m.CallbackCountsclient.callbacks.counts() · await async_client.callbacks.counts() · GET /callbacks/counts · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
agent_id |
string |
no | Count as this agent sees the inbox (their badge): mine, voicemails and missed_mine are theirs. Default: the whole organization. |
Returns
Section titled “Returns”CallbackCounts:
| Field | Type | Description |
|---|---|---|
object |
"callback_counts" |
Always callback_counts. |
livemode |
boolean |
true in live mode, false in test mode. |
agent_id |
string | null |
Whose counts these are; null: the whole organization. |
open |
integer |
Open callbacks. |
due |
integer |
Open callbacks whose time has come. |
mine |
integer | null |
Open callbacks assigned to or claimed by the agent; null without agent_id. |
queue |
integer |
Open queue callbacks nobody has claimed. |
breached |
integer |
Open callbacks past their SLA target. |
voicemails |
integer | null |
Open voicemail callbacks of the agent; null without agent_id. |
missed |
integer |
The badge’s missed calls: an agent’s own and the unclaimed ones when missed calls are work items, else every open one. |
missed_open |
integer | null |
Open missed-call items (null when missed calls are not work items). |
missed_mine |
integer | null |
Open missed-call items assigned to the agent (null without agent_id, or when missed calls are not work items). |
missed_queue |
integer | null |
Open missed-call items nobody holds (null when missed calls are not work items). |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
callback_counts = client.callbacks.counts()print(callback_counts)create()
Section titled “create()”Request a callback. Books a call back to phone, routed like the dashboard’s (to a queue’s agents, an agent or an AI assistant). If the number already has an open callback, the request is merged into it and that callback is returned (merged_requests counts the merges). With call_id, repeating the request for the same call returns the first callback. The call that returns it carries the callback’s metadata (on the call and its call.* events); an AI assistant that returns it gets variables and first_message, as POST /v1/calls does. variables and first_message are not returned, and are deleted once the callback is closed. Needs a live key.
def create(self, body: _m.CallbacksCreateBody | Mapping[str, Any], *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.Callbackclient.callbacks.create() · await async_client.callbacks.create() · POST /callbacks · API reference
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
phone |
string |
yes | The number to call back: E.164 (+972501234567) or a local form (050-123-4567). |
agent_id |
string |
no | The agent who should call back (a member’s user ID; route agent). |
assistant_id |
string |
no | The AI assistant that should call back (route assistant). |
call_id |
string |
no | The call the request came from. One callback per call: repeating the request for the same call returns the first callback. |
due_at |
string |
no | The earliest time to call back (default: now). Moved into business hours; at most 90 days ahead. |
first_message |
string |
no | What the assistant says first when it returns the call (route assistant), instead of its own first message. At most 500 characters, at most 2,000 once rendered. {{name}} placeholders are filled from variables or from the callback itself (name, phone, callback_reason: the note, callback_summary, callback_context); each one must be one of those. The assistant speaks first; when the call needs an AI disclosure, it is still said before this text. Empty: the assistant’s own first message. An assistant that runs a voice flow starts with the flow’s Start node instead. |
max_attempts |
integer |
no | How many times to try (default: the callback settings’). |
metadata |
MetadataInput |
no | Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
name |
string |
no | The person’s name. |
note |
string |
no | A note for whoever returns it. |
priority |
integer |
no | 1 (low) … 10 (urgent). Default: the callback settings’ priority for API requests. |
queue_id |
string |
no | A queue ID (q_…). |
route |
"agent_queue" | "agent" | "assistant" |
no | Who returns it: agent_queue (offered to the next free agent of queue_id, then dialled), agent (agent_id calls back) or assistant (the AI assistant_id calls back). Default: the callback settings’ default route. |
variables |
Record<string, string> |
no | Template variables for the assistant that returns the call: its prompt and first message ({{customer_name}}), as on POST /v1/calls; at most 50. Used when an AI assistant returns the call (route assistant). |
window_end |
string |
no | Don’t call after this time. |
Returns
Section titled “Returns”Callback:
| Field | Type | Description |
|---|---|---|
object |
"callback" |
Always callback. |
id |
string |
A callback ID (prefix cb_). |
livemode |
boolean |
true in live mode, false in test mode. |
phone |
string |
The number to call back, E.164. |
name |
string |
The person’s name, when known. |
status |
string |
pending (waiting for its time), offered (ringing an agent), dialing, connected (on the call back), completed, failed (attempts used up), cancelled or expired (past its window, or too old). |
source |
string |
Where the request came from: queue (a caller pressed the callback key), ivr, flow, ai (the assistant booked it), web (a website form), manual, campaign, voicemail or api. |
site_id |
string | null |
The website form it came from (source = web). |
due_at |
string |
The earliest time to call back (moved into business hours). |
window_end |
string | null |
Don’t call after this time; null: no limit. |
priority |
integer |
1 (low) … 10 (urgent); higher is returned sooner. |
route |
string |
Who returns it: agent_queue (offered to the next free agent of queue_id, then dialled), agent (agent_id calls back) or assistant (the AI assistant_id calls back). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
usr_… ID. |
claimed_by |
string | null |
usr_… ID. |
assistant_id |
string | null |
asst_… ID. |
attempts |
integer |
Call-back attempts made so far. |
max_attempts |
integer |
— |
last_attempt_at |
string | null |
— |
last_result |
string | null |
The last attempt’s result, e.g. answered, no-answer, busy, done-manually. |
call_id |
string | null |
call_… ID. |
origin_call_id |
string | null |
call_… ID. |
notes |
string |
Notes for whoever returns it (each note is stamped with its time and author). |
summary |
string | null |
The AI summary of the originating call, when there is one. |
voicemail |
CallbackVoicemail | null |
source = voicemail: the message the caller left. null for every other source. |
sla_at |
string | null |
When it should have been returned by (the SLA target, in business hours). |
merged_requests |
integer |
Later requests for the same number merged into this one. |
context |
object |
— |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
completed_at |
string | null |
— |
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
callback = client.callbacks.create({ "due_at": "2026-11-03T12:00:00+02:00", "metadata": { "crm_ticket": "T-1042", }, "name": "Dana Levi", "note": "Asked about the renewal offer.", "phone": "+972501234567", "queue_id": "q_3hRf8Kd2LmPq", "route": "agent_queue",})print(callback)list()
Section titled “list()”List callbacks. Returns a page of Callback objects, newest first. Pass next_cursor as starting_after for the next page; the SDKs iterate every page for you.
def list(self, *, limit: int | Unset = 20, starting_after: str | Unset = UNSET, ending_before: str | Unset = UNSET, status: _m.CallbacksListStatus | Unset = UNSET, source: _m.CallbacksListSource | Unset = UNSET, queue_id: str | Unset = UNSET, agent_id: str | Unset = UNSET, phone: str | Unset = UNSET, more_voice_version: str | Unset = UNSET) -> AsyncPage[_m.Callback]client.callbacks.list() · await async_client.callbacks.list() · GET /callbacks · 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). |
status |
"pending" | "offered" | "dialing" | "connected" | "completed" | "failed" | "cancelled" | "expired" |
no | Only callbacks in this status: pending (waiting for its time), offered (ringing an agent), dialing, connected (on the call back), completed, failed (attempts used up), cancelled or expired (past its window, or too old). |
source |
"queue" | "ivr" | "flow" | "ai" | "web" | "manual" | "campaign" | "voicemail" | … |
no | Only callbacks from this source (voicemail: callbacks created from a voicemail message, each with its voicemail). |
queue_id |
string |
no | Only callbacks routed to this queue. |
agent_id |
string |
no | Only callbacks assigned to this agent. |
phone |
string |
no | Only callbacks for this number (any common form). |
Returns
Section titled “Returns”A page of results (CallbackList): data, has_more and next_cursor.
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
for callback in client.callbacks.list(): print(callback)release()
Section titled “release()”Give a callback back. Gives a taken callback back to its queue (offered to the queue’s agents again). With agent_id, only the agent who took it can (403 otherwise); without it the organization gives it back, whoever took it. Needs a live key.
def release(self, id: str, body: _m.CallbacksReleaseBody | Mapping[str, Any] | Unset = UNSET, *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.Callbackclient.callbacks.release() · await async_client.callbacks.release() · POST /callbacks/{id}/release · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A callback ID (cb_…). |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
agent_id |
string |
no | The agent giving it back: only the agent who took it can. Leave it out to give it back as a supervisor (whoever took it). |
Returns
Section titled “Returns”Callback:
| Field | Type | Description |
|---|---|---|
object |
"callback" |
Always callback. |
id |
string |
A callback ID (prefix cb_). |
livemode |
boolean |
true in live mode, false in test mode. |
phone |
string |
The number to call back, E.164. |
name |
string |
The person’s name, when known. |
status |
string |
pending (waiting for its time), offered (ringing an agent), dialing, connected (on the call back), completed, failed (attempts used up), cancelled or expired (past its window, or too old). |
source |
string |
Where the request came from: queue (a caller pressed the callback key), ivr, flow, ai (the assistant booked it), web (a website form), manual, campaign, voicemail or api. |
site_id |
string | null |
The website form it came from (source = web). |
due_at |
string |
The earliest time to call back (moved into business hours). |
window_end |
string | null |
Don’t call after this time; null: no limit. |
priority |
integer |
1 (low) … 10 (urgent); higher is returned sooner. |
route |
string |
Who returns it: agent_queue (offered to the next free agent of queue_id, then dialled), agent (agent_id calls back) or assistant (the AI assistant_id calls back). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
usr_… ID. |
claimed_by |
string | null |
usr_… ID. |
assistant_id |
string | null |
asst_… ID. |
attempts |
integer |
Call-back attempts made so far. |
max_attempts |
integer |
— |
last_attempt_at |
string | null |
— |
last_result |
string | null |
The last attempt’s result, e.g. answered, no-answer, busy, done-manually. |
call_id |
string | null |
call_… ID. |
origin_call_id |
string | null |
call_… ID. |
notes |
string |
Notes for whoever returns it (each note is stamped with its time and author). |
summary |
string | null |
The AI summary of the originating call, when there is one. |
voicemail |
CallbackVoicemail | null |
source = voicemail: the message the caller left. null for every other source. |
sla_at |
string | null |
When it should have been returned by (the SLA target, in business hours). |
merged_requests |
integer |
Later requests for the same number merged into this one. |
context |
object |
— |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
completed_at |
string | null |
— |
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
callback = client.callbacks.release("cb_7Hk2Lm9Qp", { "agent_id": "usr_4Gk2LmN9pQ4rS6tV8wX0yZ",})print(callback)retrieve()
Section titled “retrieve()”Retrieve a callback. Returns the Callback 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.Callbackclient.callbacks.retrieve() · await async_client.callbacks.retrieve() · GET /callbacks/{id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A callback ID (cb_…). |
Returns
Section titled “Returns”Callback:
| Field | Type | Description |
|---|---|---|
object |
"callback" |
Always callback. |
id |
string |
A callback ID (prefix cb_). |
livemode |
boolean |
true in live mode, false in test mode. |
phone |
string |
The number to call back, E.164. |
name |
string |
The person’s name, when known. |
status |
string |
pending (waiting for its time), offered (ringing an agent), dialing, connected (on the call back), completed, failed (attempts used up), cancelled or expired (past its window, or too old). |
source |
string |
Where the request came from: queue (a caller pressed the callback key), ivr, flow, ai (the assistant booked it), web (a website form), manual, campaign, voicemail or api. |
site_id |
string | null |
The website form it came from (source = web). |
due_at |
string |
The earliest time to call back (moved into business hours). |
window_end |
string | null |
Don’t call after this time; null: no limit. |
priority |
integer |
1 (low) … 10 (urgent); higher is returned sooner. |
route |
string |
Who returns it: agent_queue (offered to the next free agent of queue_id, then dialled), agent (agent_id calls back) or assistant (the AI assistant_id calls back). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
usr_… ID. |
claimed_by |
string | null |
usr_… ID. |
assistant_id |
string | null |
asst_… ID. |
attempts |
integer |
Call-back attempts made so far. |
max_attempts |
integer |
— |
last_attempt_at |
string | null |
— |
last_result |
string | null |
The last attempt’s result, e.g. answered, no-answer, busy, done-manually. |
call_id |
string | null |
call_… ID. |
origin_call_id |
string | null |
call_… ID. |
notes |
string |
Notes for whoever returns it (each note is stamped with its time and author). |
summary |
string | null |
The AI summary of the originating call, when there is one. |
voicemail |
CallbackVoicemail | null |
source = voicemail: the message the caller left. null for every other source. |
sla_at |
string | null |
When it should have been returned by (the SLA target, in business hours). |
merged_requests |
integer |
Later requests for the same number merged into this one. |
context |
object |
— |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
completed_at |
string | null |
— |
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
callback = client.callbacks.retrieve("cb_7Hk2Lm9Qp")print(callback)start()
Section titled “start()”Start dialling a callback from an agent’s softphone. Step 1 of calling back from the agent’s own softphone: the callback is the agent’s and dialing while their softphone calls dial_to. Step 2: attach the call it placed (POST …/attach) before attach_before; without it the callback goes back to the list with no attempt counted. A callback ringing for another agent right now, already on a call or closed is a 409; a number on the do-not-call list a 403. Needs a live key.
def start(self, id: str, body: _m.CallbacksStartBody | Mapping[str, Any], *, more_voice_version: str | Unset = UNSET, idempotency_key: str | Unset = UNSET) -> _m.CallbackDialclient.callbacks.start() · await async_client.callbacks.start() · POST /callbacks/{id}/start · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A callback ID (cb_…). |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
agent_id |
string |
yes | The agent the action is taken for (a member’s user ID): the callback must be one they see in the inbox (theirs, claimed or created by them, or their queues’), as in the app. Their softphone places the call. |
Returns
Section titled “Returns”CallbackDial:
| Field | Type | Description |
|---|---|---|
object |
"callback_dial" |
Always callback_dial. |
callback |
Callback |
A request to call someone back, and its progress. |
dial_to |
string |
The number the agent’s softphone dials (E.164). |
attach_before |
string |
Attach the call (POST …/attach) before this time, or the callback goes back to the list. |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
callback_dial = client.callbacks.start("cb_7Hk2Lm9Qp", { "agent_id": "usr_4Gk2LmN9pQ4rS6tV8wX0yZ",})print(callback_dial)stats()
Section titled “stats()”Callback statistics. Totals for callbacks requested in a period (default: the last 7 days): outcomes, SLA, time to return, by source and by agent.
def stats(self, *, from_: _dt.datetime | Unset = UNSET, to: _dt.datetime | Unset = UNSET, queue_id: str | Unset = UNSET, more_voice_version: str | Unset = UNSET) -> _m.CallbackStatsclient.callbacks.stats() · await async_client.callbacks.stats() · GET /callbacks/stats · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
from |
string |
no | Start of the period (default: 7 days before to). |
to |
string |
no | End of the period (default: now). |
queue_id |
string |
no | A queue ID (q_…). |
Returns
Section titled “Returns”CallbackStats:
| Field | Type | Description |
|---|---|---|
object |
"callback_stats" |
Always callback_stats. |
livemode |
boolean |
true in live mode, false in test mode. |
from |
string |
An ISO-8601 timestamp in UTC. |
to |
string |
An ISO-8601 timestamp in UTC. |
total |
integer |
Requests in the period. |
open |
integer |
— |
completed |
integer |
— |
failed |
integer |
— |
expired |
integer |
— |
cancelled |
integer |
— |
within_sla |
integer |
Completed within their SLA target. |
breached_open |
integer |
Still open past their SLA target. |
sla_rate |
number | null |
within_sla / completed; null with nothing completed. |
avg_return_ms |
integer | null |
Average time from request to completion. |
attempts |
integer |
— |
by_source |
object[] |
— |
by_agent |
object[] |
— |
Example
Section titled “Example”from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
callback_stats = client.callbacks.stats()print(callback_stats)stream()
Section titled “stream()”Stream callback inbox changes. Server-Sent Events: one frame per change in the organization’s callbacks inbox (callback.changed, missed_call.changed), for this key’s mode, as the app’s inbox refreshes on them. Frames carry IDs and the new status only; read the object to refresh. Counts against the key’s stream limit (concurrency_limit, limit_type: api_streams).
def stream(self, *, more_voice_version: str | Unset = UNSET, last_event_id: str | None = None, max_retries: int | None = None, deadline: float | None = None) -> AsyncEventStream[dict[str, Any]]client.callbacks.stream() · await async_client.callbacks.stream() · GET /callbacks/stream · API reference
Returns
Section titled “Returns”A stream of events (Server-Sent Events): iterate it, or async for it on AsyncMoreVoice.
Example
Section titled “Example”import os
import httpx
url = "https://api.morevoice.ai/v1/callbacks/stream"headers = {"Authorization": f"Bearer {os.environ['MOREVOICE_API_KEY']}", "Accept": "text/event-stream"}with httpx.stream("GET", url, headers=headers, timeout=None) as response: response.raise_for_status() for line in response.iter_lines(): if line.startswith("data:"): print(line[5:].strip())update()
Section titled “update()”Update a callback. Reschedule, re-route or edit an open callback. A callback on a call right now can’t be re-routed (409). Needs a live key.
def update(self, id: str, body: _m.CallbacksUpdateBody | Mapping[str, Any] | Unset = UNSET, *, more_voice_version: str | Unset = UNSET) -> _m.Callbackclient.callbacks.update() · await async_client.callbacks.update() · PATCH /callbacks/{id} · API reference
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
id |
str |
yes | A callback ID (cb_…). |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
agent_id |
string | null |
no | usr_… ID. |
assistant_id |
string | null |
no | asst_… ID. |
due_at |
string |
no | Reschedule (moved into business hours). |
max_attempts |
integer |
no | How many times to try (default: the callback settings’). |
name |
string |
no | — |
notes |
string |
no | Replaces the notes (use POST …/notes to add one). |
priority |
integer |
no | 1 (low) … 10 (urgent). Default: the callback settings’ priority for API requests. |
queue_id |
string | null |
no | q_… ID. |
route |
"agent_queue" | "agent" | "assistant" |
no | — |
Returns
Section titled “Returns”Callback:
| Field | Type | Description |
|---|---|---|
object |
"callback" |
Always callback. |
id |
string |
A callback ID (prefix cb_). |
livemode |
boolean |
true in live mode, false in test mode. |
phone |
string |
The number to call back, E.164. |
name |
string |
The person’s name, when known. |
status |
string |
pending (waiting for its time), offered (ringing an agent), dialing, connected (on the call back), completed, failed (attempts used up), cancelled or expired (past its window, or too old). |
source |
string |
Where the request came from: queue (a caller pressed the callback key), ivr, flow, ai (the assistant booked it), web (a website form), manual, campaign, voicemail or api. |
site_id |
string | null |
The website form it came from (source = web). |
due_at |
string |
The earliest time to call back (moved into business hours). |
window_end |
string | null |
Don’t call after this time; null: no limit. |
priority |
integer |
1 (low) … 10 (urgent); higher is returned sooner. |
route |
string |
Who returns it: agent_queue (offered to the next free agent of queue_id, then dialled), agent (agent_id calls back) or assistant (the AI assistant_id calls back). |
queue_id |
string | null |
q_… ID. |
agent_id |
string | null |
usr_… ID. |
claimed_by |
string | null |
usr_… ID. |
assistant_id |
string | null |
asst_… ID. |
attempts |
integer |
Call-back attempts made so far. |
max_attempts |
integer |
— |
last_attempt_at |
string | null |
— |
last_result |
string | null |
The last attempt’s result, e.g. answered, no-answer, busy, done-manually. |
call_id |
string | null |
call_… ID. |
origin_call_id |
string | null |
call_… ID. |
notes |
string |
Notes for whoever returns it (each note is stamped with its time and author). |
summary |
string | null |
The AI summary of the originating call, when there is one. |
voicemail |
CallbackVoicemail | null |
source = voicemail: the message the caller left. null for every other source. |
sla_at |
string | null |
When it should have been returned by (the SLA target, in business hours). |
merged_requests |
integer |
Later requests for the same number merged into this one. |
context |
object |
— |
metadata |
Metadata |
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
completed_at |
string | null |
— |
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
callback = client.callbacks.update("cb_7Hk2Lm9Qp", { "due_at": "2026-11-04T09:30:00+02:00", "priority": 8,})print(callback)