POST /v1/calls
Creates and queues an outbound WhatsApp call from an instance. Supports four call types: FIXED_TTS, FIXED_AUDIO, DYNAMIC_STREAM, and DYNAMIC_AGENT.
If the instance already has an active call (QUEUED, RINGING, or IN_PROGRESS), the existing call is returned (200) instead of creating a duplicate.
Request
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
instanceId | string | Yes | The instance to place the call from |
type | string | Yes | Call type: FIXED_TTS, FIXED_AUDIO, DYNAMIC_STREAM, or DYNAMIC_AGENT |
target.phoneNumber | string | Yes | Destination phone number in E.164 format (e.g., +14155550123) |
tts.text | string | FIXED_TTS only | The message to speak |
tts.voiceId | string | FIXED_TTS only | Voice identifier (e.g., en-US-001) |
audio.audioBase64 | string | FIXED_AUDIO only | Base64-encoded audio file |
agent.instructions | string[] | DYNAMIC_AGENT only | Natural-language instructions for the AI agent |
Examples
- FIXED_TTS
- FIXED_AUDIO
- DYNAMIC_STREAM
- DYNAMIC_AGENT
Response
201 — Call created
| Field | Type | Description |
|---|---|---|
id | string | Unique call ID (call_ prefix) |
instance_id | string | Instance that placed the call |
type | string | Call type |
status | string | Always QUEUED on creation |
target_phone | string | Destination phone number |
created_at | string | ISO 8601 timestamp |
200 — Existing active call returned
When the instance already has an active call, the existing call object is returned with status 200.
Errors
| Code | Description |
|---|---|
400 | instanceId, type, or target.phoneNumber is missing; invalid type value |
401 | Missing or invalid token |
403 | Demo token used with wrong instance |
404 | Instance not found or does not belong to the user |