Skip to main content
POST
Place a WhatsApp call

Authorizations

Authorization
string
header
required

Use Authorization: Bearer pyai_live_... (or pyai_test_...).

Headers

Idempotency-Key
string
required

Safe retry key. Reusing it with the same input replays the original call; different input returns 409 idempotency_conflict.

Maximum string length: 255

Body

application/json
number_id
string
required
to
string
required

The user's WhatsApp number (E.164).

Example:

"+919876543210"

agent_id
string | null

Defaults to the number's agent.

Response

Call placed (ringing)

object
string
Example:

"whatsapp.call"

id
string
Example:

"wac_..."

number_id
string
wa_call_id
string | null

Meta's call id (wacid...).

direction
enum<string>
Available options:
inbound,
outbound
user
string
Example:

"+919876543210"

agent_id
string | null
status
enum<string>
Available options:
ringing,
accepted,
connected,
completed,
failed,
rejected,
no_answer,
terminated
failure_reason
string | null
started_at
integer | null

Unix ms.

connected_at
integer | null

Unix ms.

ended_at
integer | null

Unix ms.

duration_seconds
integer | null
created_at
integer
updated_at
integer