Skip to content

Relay a WhatsApp call event

POST
/whatsapp/events
import os
import uuid
import requests
response = requests.post(
"https://api.morevoice.ai/v1/whatsapp/events",
headers={"Idempotency-Key": str(uuid.uuid4())},
json={
"field": "calls",
"hints": {
"chat_id": "chat_88",
"workspace_id": "ws_12",
},
"object": "whatsapp_call_event",
"relayed_at": "2026-11-08T09:14:22.000Z",
"value": {
"calls": [
{
"direction": "USER_INITIATED",
"event": "connect",
"from": "972501234567",
"id": "wacid.example-call-0001",
"session": {
"sdp": "v=0\r\n…",
"sdp_type": "offer",
},
"timestamp": "1762593262",
"to": "97235550100",
},
],
"contacts": [
{
"profile": {
"name": "Dana",
},
"wa_id": "972501234567",
},
],
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "97235550100",
"phone_number_id": "106540352242922",
},
},
"waba_id": "102290129340398",
},
)
response.raise_for_status()
print(response.json())

Server to server: the WhatsApp calls webhook, relayed by the messaging platform that receives it, or (direct use) the webhook itself. No API key: the request is signed. A relay carries mv-relay-signature: t=<unix>,n=<32 hex>,v2=<hex>, where v2 is the HMAC-SHA256 of <direction>.<t>.<n>.<raw body> (the inbound direction label agreed with the relay) with the relay secret (valid 300 s, each nonce once; a retry gets a new nonce and keeps its mv-relay-id). A direct delivery carries WhatsApp’s x-hub-signature-256: sha256=<hex> over the raw body with the app secret. Any refused signature answers 401 signature_invalid, the same whatever the reason.

Each call event (calls[]: <wacid>:<event>; statuses[]: <wacid>:status:<STATUS>) is taken once: a repeat answers duplicate and changes nothing. The answer (202; 200 for a direct delivery) comes before the events are handled. A relay for a number no organization takes calls on answers 404 resource_missing; a direct delivery lists such events as ignored. hints are display labels echoed on the call’s events, never a routing input.

Try it in the API playground with a test-mode key.

Idempotency-Key
string
>= 1 characters <= 255 characters

Accepted and not needed: this endpoint takes each event once by the event’s own key, so a retry never acts twice.

Example
5f0c1e8a-7b2d-4c3e-9f1a-2b6d8e4c0a17
Media typeapplication/json

A relayed calls change (field + value + hints), or, for direct use, the WhatsApp webhook delivery itself (object + entry). Other fields are ignored.

object
entry

Direct: the webhook’s entry array, verbatim (each changes[] item with field calls is taken).

Array<object>
<= 100 items
object
key
additional properties
field

Relay: the webhook field relayed; only calls is taken.

string
<= 64 characters
hints

Relay: display labels (workspace, chat, contact) echoed back on the call’s events as metadata. Never used to route a call.

object
key
additional properties
string
<= 500 characters
object

Relay: whatsapp_call_event (optional). Direct: whatsapp_business_account.

string
<= 64 characters
relayed_at

Relay: when the relay sent it (informational).

string
<= 64 characters
value

Relay: the calls change’s value, verbatim (metadata.phone_number_id names the number; calls[] and statuses[] are the events).

object
key
additional properties
waba_id
Any of:
string
<= 64 characters
Example
{
"field": "calls",
"hints": {
"chat_id": "chat_88",
"workspace_id": "ws_12"
},
"object": "whatsapp_call_event",
"relayed_at": "2026-11-08T09:14:22.000Z",
"value": {
"calls": [
{
"direction": "USER_INITIATED",
"event": "connect",
"from": "972501234567",
"id": "wacid.example-call-0001",
"session": {
"sdp": "v=0\r\n…",
"sdp_type": "offer"
},
"timestamp": "1762593262",
"to": "97235550100"
}
],
"contacts": [
{
"profile": {
"name": "Dana"
},
"wa_id": "972501234567"
}
],
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "97235550100",
"phone_number_id": "106540352242922"
}
},
"waba_id": "102290129340398"
}

Accepted: the call events found and what happened to each.

Media typeapplication/json

What the intake did with each call event.

object
events
required

The call events found, in order.

Array<object>
object
event
required

connect, terminate, …, or status:RINGING / status:ACCEPTED / status:REJECTED …

string
key
required

<wacid>:<event>: the event’s idempotency key (<wacid>:status:<STATUS> for a call status).

string
status
required

accepted: taken, handled right after this answer. duplicate: this key was taken before (a retry): nothing happens again. ignored: no organization takes calls on this number.

string
Allowed values: accepted duplicate ignored
wacid
required

WhatsApp’s call ID.

string
whatsapp_number_id
required
Any of:

The number the call is on, or null when no organization takes it.

string
/^wan_[0-9A-Za-z]+$/
livemode
required

true in live mode, false in test mode.

boolean
object
required
string
Allowed value: whatsapp_event_receipt
received
required

An ISO-8601 timestamp in UTC.

string format: date-time
source
required

relay: signed with the relay signature. direct: the WhatsApp webhook’s own signature.

string
Allowed values: relay direct
Example
{
"events": [
{
"event": "connect",
"key": "wacid.example-call-0001:connect",
"status": "accepted",
"wacid": "wacid.example-call-0001",
"whatsapp_number_id": "wan_4Gk2LmN9pQ4rS6tV8wX0yZ"
}
],
"livemode": true,
"object": "whatsapp_event_receipt",
"received": "2026-11-08T09:14:22.031Z",
"source": "relay"
}

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_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"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

No valid API key was sent.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_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"
}
}
X-Request-Id
string

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.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_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"
}
}
X-Request-Id
string

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.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_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"
}
}
X-Request-Id
string

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.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_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"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

The request body’s Content-Type is not one the endpoint takes.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_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"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.

Something went wrong on MoreVoice’s side. Retry with the same Idempotency-Key.

Media typeapplication/json

Every /v1 error.

object
error
required
object
code
required

A stable, machine-readable code from the error-code catalogue.

string
details

Structured context, e.g. required_scope or the compliance verdict.

object
key
additional properties
doc_url
required

A link to the documentation of this code.

string
message
required

A human-readable explanation. Do not parse it.

string
param

The request parameter the error relates to, e.g. to or metadata[order_id].

string
request_id
required

The X-Request-Id of this request. Quote it when you contact support.

string
type
required

The category of the error.

string
Allowed values: invalid_request_error authentication_error permission_error not_found conflict rate_limit_error compliance_error idempotency_error api_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"
}
}
X-Request-Id
string

The request’s ID (req_…). Quote it when you contact support.