Calls
Audio Call
Calls the number and plays an audio file once the call is answered
POST
Audio Call
Auth:
Error envelope:
TokenAccount or TokenInstance • Rate-limit: Global (100/min) • Idempotent: no
Description
Starts a voice call and, when the recipient answers, plays an audio file. The audio is converted automatically (via ffmpeg) to the format required by WhatsApp voice calls. Provide the media in exactly one field:mediaUrl (accepts a public URL or base64/data URI) or mediaBase64 (base64 only). Sending both, or neither, is an error.
Examples
Audio from a URL
Audio as base64
UsemediaBase64 when you already have the file bytes (no public URL).
Success response
200 OK
The audio only plays if the recipient answers the call. Conversion to WhatsApp’s voice format is done automatically on the server.
Path parameters
Instance name (e.g.,
$Instance_Name).Headers
TokenAccount or TokenInstance.application/jsonRequest body
Destination: phone (
5511999999999) or JID (@s.whatsapp.net).Audio source: accepts a public URL (
http(s)://…) or the file contents as base64 — raw base64 or a data URI (data:audio/mpeg;base64,…). The server auto-detects which one you sent. Provide this or mediaBase64, never both.Audio file contents as base64. Provide this or
mediaUrl, never both.Notes
- Provide exactly one media source:
mediaUrlormediaBase64. Sending both (or neither) returns400. - The server uses ffmpeg to convert the audio to the codec required by WhatsApp voice calls; common formats (mp3, ogg, wav, m4a) are accepted.
Errors
| HTTP | Message |
|---|---|
| 400 | Instance name is required |
| 400 | Invalid request body: <detail> |
| 400 | Number is required |
| 400 | Provide exactly one of mediaUrl or mediaBase64 |
| 404 | instance not found |
| 500 | <failure reason> |