Event: New Call

This event is fired whenever a new call is successfully processed by your Jodie AI agent. It provides the complete details of the call, including any data that was collected.

Payload Structure

The webhook payload is a JSON object with the following structure:

KeyTypeDescription
event_typestringEvent type identifier. Always "new_call".
call_idstringThe unique identifier for the call.
caller_phone_numberstring | nullThe phone number of the person who initiated the call, in E.164 format, or null if unavailable.
timestampstring | nullAn ISO 8601 formatted timestamp indicating when the webhook event was created.
start_timestring | nullAn ISO 8601 formatted timestamp indicating when the call started.
end_timestring | nullAn ISO 8601 formatted timestamp indicating when the call ended (calculated from start_time + duration_seconds).
duration_secondsintegerThe duration of the call in seconds. Defaults to 0 if unavailable.
data_collectionsarrayAn array of objects representing data collected from the caller during the call. Empty array [] if none.
transcriptsarrayAn array of transcript entries from the call conversation, ordered by order ascending. Empty array [] if no transcript.

The data_collections Object

Each object in the data_collections array has the following structure:

KeyTypeDescription
keystringThe name of the data point that was collected.
valuestring | nullThe value that was collected for the specified key.

The transcripts Object

Each object in the transcripts array has the following structure:

KeyTypeDescription
orderintegerSequential position in the conversation (1, 2, 3…).
rolestringThe speaker role. Either "agent" or "user".
messagestringThe message text.

Example Payload

Here is an example of the JSON payload you can expect to receive for a new_call event.

{
  "event_type": "new_call",
  "call_id": "call_abc123",
  "caller_phone_number": "+441234567890",
  "timestamp": "2026-03-13T10:00:00Z",
  "start_time": "2026-03-13T10:00:00Z",
  "end_time": "2026-03-13T10:02:30Z",
  "duration_seconds": 150,
  "data_collections": [
    {
      "key": "caller_name",
      "value": "John Doe"
    }
  ],
  "transcripts": [
    { "order": 1, "role": "agent", "message": "Hello, thanks for calling. How can I help?" },
    { "order": 2, "role": "user", "message": "I'd like to book an appointment." },
    { "order": 3, "role": "agent", "message": "Of course! What day works best?" }
  ]
}