Call a WhatsApp user
import MoreVoice from "@morevoice/sdk";
const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment
const whatsAppCall = await mv.whatsappCalls.create({ assistant_id: "asst_7Kp1Ns4Vy6Ab9Dg2Hj5Lm8", biz_opaque_callback_data: "chat_88:req_4f2a", metadata: { crm_contact_id: "0031x00000AbCdE", }, mode: "ai", to: "972501234567", whatsapp_number_id: "wan_4Gk2LmN9pQ4rS6tV8wX0yZ",});console.log(whatsAppCall);from morevoice import MoreVoice
client = MoreVoice() # MOREVOICE_API_KEY from the environment
whats_app_call = client.whatsapp_calls.create({ "assistant_id": "asst_7Kp1Ns4Vy6Ab9Dg2Hj5Lm8", "biz_opaque_callback_data": "chat_88:req_4f2a", "metadata": { "crm_contact_id": "0031x00000AbCdE", }, "mode": "ai", "to": "972501234567", "whatsapp_number_id": "wan_4Gk2LmN9pQ4rS6tV8wX0yZ",})print(whats_app_call)curl -X POST https://api.morevoice.ai/v1/whatsapp_calls \ -H "Authorization: Bearer $MOREVOICE_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "assistant_id": "asst_7Kp1Ns4Vy6Ab9Dg2Hj5Lm8", "biz_opaque_callback_data": "chat_88:req_4f2a", "metadata": { "crm_contact_id": "0031x00000AbCdE" }, "mode": "ai", "to": "972501234567", "whatsapp_number_id": "wan_4Gk2LmN9pQ4rS6tV8wX0yZ"}'Calls a WhatsApp user from one of your WhatsApp numbers, with an assistant (mode: ai) or with an agent in the browser (mode: agent: the agent’s browser rings first, then the user). The user must have allowed your business to call them (409 permission_required otherwise) and WhatsApp’s call limits per user apply (429 limit_reached, with the limits in details and when they reset in details.resets_at); biz_opaque_callback_data goes to WhatsApp with the call as written; the do-not-call list applies as for any call. Needs a live key and WhatsApp calling enabled for the organization. The Idempotency-Key header is required, so a retried request never calls anyone twice. The call is a normal call: follow it with GET /v1/calls/{id} and the call.* webhooks.
Try it in the API playground with a test-mode key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”The API version to use for this request. Defaults to the version the API key is pinned to.
Example
2026-11-01Required on this endpoint (400 parameter_missing without it). A unique key (for example a UUID) for this request: for 24 hours, a retry with the same key and parameters returns the first response instead of acting twice.
Example
5f0c1e8a-7b2d-4c3e-9f1a-2b6d8e4c0a17Request Bodyrequired
Section titled “Request Bodyrequired”Calls a WhatsApp user from one of your WhatsApp numbers. The user must have allowed your business to call them (otherwise 409 permission_required), the number’s calling limits apply (429 limit_reached), and the do-not-call list applies as for any call. WhatsApp calls never reach the phone network: the AI or an agent in the browser takes them.
object
Mode agent: the member who talks, in the browser. Required with mode agent.
Mode ai: the assistant that talks (default: the number’s assistant).
Your data for this call at WhatsApp (biz_opaque_callback_data, at most 512 characters): WhatsApp returns it in the call’s own webhooks (status and terminate), so a relay can match them to its records. Sent as written; returned on the call object.
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent.
object
ai: the assistant talks to the user. agent: the agent’s browser rings first; the user is called once they answer.
The WhatsApp user to call by the business-scoped ID WhatsApp gave you, when they don’t share their number. Instead of to.
The WhatsApp user to call: their WhatsApp number (country code first, + optional).
The business number that calls (one of yours).
WhatsApp’s ID of the business number that calls (digits), instead of whatsapp_number_id.
Example
{ "assistant_id": "asst_7Kp1Ns4Vy6Ab9Dg2Hj5Lm8", "biz_opaque_callback_data": "chat_88:req_4f2a", "metadata": { "crm_contact_id": "0031x00000AbCdE" }, "mode": "ai", "to": "972501234567", "whatsapp_number_id": "wan_4Gk2LmN9pQ4rS6tV8wX0yZ"}Responses
Section titled “Responses”Created
A call your business placed to a WhatsApp user.
object
Your data for this call at WhatsApp (biz_opaque_callback_data, at most 512 characters): WhatsApp returns it in the call’s own webhooks (status and terminate), so a relay can match them to its records. Null when none was sent.
An ISO-8601 timestamp in UTC.
The call’s ID (GET /v1/calls/{id}).
true in live mode, false in test mode.
Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent.
object
The user’s business-scoped WhatsApp ID (null when called by to).
ringing: the user’s phone rings. queued: ringing the agent first (mode agent), or WhatsApp has not confirmed the call yet. Follow the call with GET /v1/calls/{id} or the call.* webhooks.
The user’s WhatsApp number in E.164 (null when called by recipient).
WhatsApp’s ID of the call; null until WhatsApp named it.
The business number that calls.
Example
{ "agent_id": null, "assistant_id": "asst_7Kp1Ns4Vy6Ab9Dg2Hj5Lm8", "biz_opaque_callback_data": "chat_88:req_4f2a", "created": "2026-11-08T09:14:22.000Z", "id": "call_4Gk2LmN9pQ4r", "livemode": true, "metadata": { "crm_contact_id": "0031x00000AbCdE" }, "mode": "ai", "object": "whatsapp_call", "recipient": null, "status": "ringing", "to": "+972501234567", "wacid": "wacid.HBgLMTIzNDU2Nzg5MDEVAgARGBI", "whatsapp_number_id": "wan_4Gk2LmN9pQ4rS6tV8wX0yZ"}The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "parameter_missing", "doc_url": "https://docs.morevoice.ai/api/errors#parameter-missing", "message": "Missing required parameter: to.", "param": "to", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "invalid_request_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
No valid API key was sent.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "invalid_api_key", "doc_url": "https://docs.morevoice.ai/api/errors#invalid-api-key", "message": "Invalid API key.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "authentication_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
The key may not do this (a missing scope, a plan limit, or a compliance block).
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "missing_scope", "doc_url": "https://docs.morevoice.ai/api/errors#missing-scope", "message": "This API key lacks the calls:write scope.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "permission_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
No object with this ID (in the path or the body) exists in this organisation and mode.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "resource_missing", "doc_url": "https://docs.morevoice.ai/api/errors#resource-missing", "message": "No such object: 'call_4Gk2'.", "param": "id", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "not_found" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
The request conflicts with the object’s state, or the Idempotency-Key was reused with other parameters.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "idempotency_mismatch", "doc_url": "https://docs.morevoice.ai/api/errors#idempotency-mismatch", "message": "This Idempotency-Key was already used with different parameters.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "idempotency_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
The request body is larger than the endpoint accepts, or has more parts or files than it takes.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "body_too_large", "doc_url": "https://docs.morevoice.ai/api/errors#body-too-large", "message": "The request body is larger than the endpoint accepts.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "invalid_request_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
The request body’s Content-Type is not one the endpoint takes.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "unsupported_media_type", "doc_url": "https://docs.morevoice.ai/api/errors#unsupported-media-type", "message": "This endpoint takes application/json.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "invalid_request_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.
Too many requests, or no call capacity right now. Retry after the Retry-After delay.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "rate_limited", "doc_url": "https://docs.morevoice.ai/api/errors#rate-limited", "message": "Too many requests. Retry after 1 second.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "rate_limit_error" }}Headers
Section titled “Headers”Seconds to wait before retrying.
The request’s ID (req_…). Quote it when you contact support.
Something went wrong on MoreVoice’s side. Retry with the same Idempotency-Key.
Every /v1 error.
object
object
A stable, machine-readable code from the error-code catalogue.
Structured context, e.g. required_scope or the compliance verdict.
object
A link to the documentation of this code.
A human-readable explanation. Do not parse it.
The request parameter the error relates to, e.g. to or metadata[order_id].
The X-Request-Id of this request. Quote it when you contact support.
The category of the error.
Example
{ "error": { "code": "internal_error", "doc_url": "https://docs.morevoice.ai/api/errors#internal-error", "message": "Something went wrong on MoreVoice's side.", "request_id": "req_7Hk2LmN9pQ4rS6tV8wX0yZ", "type": "api_error" }}Headers
Section titled “Headers”The request’s ID (req_…). Quote it when you contact support.