call

[BETA] start call

Places a voice or video call. Limited to 10 per minute and 100 per hour per instance; the slot is taken before the media URLs are fetched, so a bad audioUrl or videoUrl still spends one. With waitForAnswer (default true) the response tells whether the callee picked up within answerTimeout; on timeout the instance hangs up. Optional audioUrl/imageUrl/videoUrl play after the call was answered; hangupAfterSeconds ends the call and counts from the moment the call connects, not from this response, so a call can last up to the 10 second connection wait plus hangupAfterSeconds. Over the limit the answer is data.status: error with message: too many calls, an explanation and retryAfter in seconds. Note: This endpoint is currently in beta and may change without notice.

post/instances/{id}/client/action/start-call

Request

  • Base URL: https://waapi.app/api/v1
  • URL: https://waapi.app/api/v1/instances/{id}/client/action/start-call
  • Auth: HTTP bearer

Path parameters

idinteger required

Instance ID

Request body

chatIdstring required

The number to call, as number@c.us or number@lid

videoboolean

Place a video call instead of a voice call

waitForAnswerboolean

Wait for the callee to pick up before answering the request

answerTimeoutinteger

How long to wait for the callee to pick up, in milliseconds (waitForAnswer only). Capped at 45000: the request blocks for that whole time, and a longer wait would outlive the HTTP connection.

audioUrlstring uri

wav, mp3 or ogg played once after the call was answered, max 25 MB

imageUrlstring uri

Still image shown as the outgoing camera once the call connects; jpeg or png, max 25 MB

videoUrlstring uri

mp4 (H.264) looped as the outgoing camera after the call was answered, max 25 MB

hangupAfterSecondsinteger

Hang up this many seconds after the call connected

Example request

{
  "chatId": "41763070877@c.us"
}

Response

Request reached the instance. data.status reports whether the action was carried out; on error data carries message and explanation. Payload: the call plus whether it was answered.

status'success' | 'error'

Whether the request reached the instance. success here does not mean the action was carried out — that is reported by data.status, which is the authoritative one. A malformed input arrives as status: success with data.status: error.

Example response

{
  "status": "success",
  "data": {
    "status": "success",
    "data": {
      "call": {
        "id": "00E61C7AAD3559F3AFC223D4E3FC1914",
        "from": "41763070877@c.us",
        "timestamp": 1789138531,
        "state": 6
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.