WhatsApp

Hang up a WhatsApp call

post/v1/whatsapp/calls/{id}/terminate

Request

  • Base URL: https://api.pyai.com
  • URL: https://api.pyai.com/v1/whatsapp/calls/{id}/terminate
  • Auth: one of:
    • HTTP bearer
    • API key in header x-api-key

Path parameters

idstring required

Response

Terminated (idempotent on already-ended calls)

objectstring
idstring
number_idstring
wa_call_idstring nullable

Meta's call id (wacid...).

direction'inbound' | 'outbound'
userstring
agent_idstring nullable
status'ringing' | 'accepted' | 'connected' | 'completed' | 'failed' | 'rejected' | 'no_answer' | 'terminated'
failure_reasonstring nullable
started_atinteger nullable

Unix ms.

connected_atinteger nullable

Unix ms.

ended_atinteger nullable

Unix ms.

duration_secondsinteger nullable
created_atinteger
updated_atinteger

Example response

{
  "object": "whatsapp.call",
  "id": "wac_...",
  "user": "+919876543210"
}

Changes

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