call

[BETA] accept call

Accepts the ringing incoming call. Media starts after the call connected; audioUrl plays once, imageUrl is shown, videoUrl loops as the camera. hangupAfterSeconds, if given, ends the call that many seconds after it connects. Every media URL is fetched before the call is accepted, so an unusable URL fails the request instead of answering a call that then plays nothing. Errors come back as data.status: error with message and explanation. Note: This endpoint is currently in beta and may change without notice.

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

Request

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

Path parameters

idinteger required

Instance ID

Request body

callIdstring

The call to act on. Omit to use the instance's only active call.

videoboolean

Accept as a video call and send a camera track

audioUrlstring uri

wav, mp3 or ogg played once into the call, max 25 MB

imageUrlstring uri

jpeg or png shown as the outgoing camera, max 25 MB

videoUrlstring uri

mp4 (H.264) looped as the outgoing camera, max 25 MB

hangupAfterSecondsinteger

Hang up at the latest this many seconds after the call connects; omitted means the call stays up until someone ends it

Example request

{
  "callId": "00E61C7AAD3559F3AFC223D4E3FC1914"
}

Response

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

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.