TokenAccount or TokenInstance • Rate-limit: Global (100/min) • Idempotent: no
The /api/call/* module covers placing voice calls from the instance. There are currently two operations: the fake call, which makes the phone ring for a few seconds and hangs up on its own (no audio), and the audio call, which rings and plays a file once the recipient answers. Every route validates instance ownership and accepts TokenAccount or TokenInstance.
Available endpoints
| Method | Path | Type |
|---|---|---|
| POST | /api/call/fake/:instance | Fake Call |
| POST | /api/call/audio/:instance | Audio Call |
Common structure
Recipient (number)
Both endpoints take the destination in the number field, which accepts:
- Plain number:
"5511999999999"(preferred). - Private JID:
"5511999999999@s.whatsapp.net".
Standard response (200)
Both routes return an envelope with thecallId assigned by WhatsApp:
duration field (seconds it rang).
The
callId identifies the call on WhatsApp. The fake call is ended automatically by the server after duration seconds; the audio call only plays the file if the recipient answers.Common errors
| HTTP | Message |
|---|---|
| 400 | Instance name is required |
| 400 | Invalid request body: <detail> |
| 400 | Number is required |
| 400 | Duration must be between 1 and 60 seconds (fake) |
| 400 | Provide exactly one of mediaUrl or mediaBase64 (audio) |
| 404 | instance not found |
| 500 | <failure reason> |
Next steps
Fake Call
Makes the phone ring for a few seconds and hangs up on its own.
Audio Call
Rings and plays an audio (URL or base64) when answered.