v53

latestOpenAPI 3.1.1raw.githubusercontent.com2026-07-264065213.4 KB

The call.ended event is delivered whenever a call is completed between a Surge number you own and another phone number.

postWebhookcallEnded

Payload

account_idstring required

The ID of the account in which this event occurred

timestampstring date-time required

The timestamp when this event occurred, in ISO8601 format

type'call.ended' required

The type of the event. Always call.ended for this event.

Example payload

{
  "account_id": "acct_01japd271aeatb7txrzr2xj8sg",
  "data": {
    "contact": {
      "email": "dom@toretto.family",
      "first_name": "Dominic",
      "id": "ctc_01ja88cboqffhswjx8zbak3ykk",
      "last_name": "Toretto",
      "metadata": {
        "car": "1970 Dodge Charger R/T"
      },
      "phone_number": "+18015551234"
    },
    "duration": 184,
    "from": "+18015551234",
    "id": "call_01jjnn7s0zfx5tdcsxjfy93et2",
    "initiated_at": "2025-03-31T21:01:37Z",
    "phone_number_id": "pn_01jsjwe4d9fx3tpymgtg958d9w",
    "status": "completed",
    "to": "+18015556789"
  },
  "timestamp": "2024-10-21T23:29:41Z",
  "type": "call.ended"
}

Response

Return a 200 status to indicate that the data was received successfully