Skip to main content
WEBHOOK
/
webhook
{
  "call_log_id": "8de63236-e013-42dd-9d99-1be5521701d4",
  "phone_number": "+919876543210",
  "agent_name": "agent_IsZ3Q6Sf_60Eh26XQMGbz-R_og",
  "call_status": "picked",
  "call_type": "outbound",
  "call_summary": "The customer confirmed their appointment for tomorrow at 10 AM and asked to receive a reminder SMS an hour before.",
  "data_capture": {
    "customer_name": "John Doe",
    "appointment_confirmed": true,
    "preferred_time": "10:00 AM"
  },
  "structured_output": {
    "intent": "appointment_confirmation",
    "appointment": {
      "date": "2026-06-12",
      "time": "10:00"
    }
  },
  "call_trigger_data": {
    "phone_number": "+919876543210",
    "person_name": "John Doe",
    "crm_id": "lead_42",
    "campaign": "june-renewals"
  }
}
After every analyzed call, OSVI can send the post-call analysis results to any HTTP endpoint you control. Webhooks are configured per agent in the dashboard under Agent → Post-Call Analysis → Integrations, and an agent can have multiple webhook integrations — each one fires independently after each analyzed call.
Post-call webhooks fire only for calls that were answered and produced a transcript (call_status: picked), and only when Post-Call Analysis is enabled on the agent.

Configuring a webhook

Each integration lets you configure:
SettingDescription
NameA label for the integration, shown in the dashboard and Integration Logs.
HTTP methodPOST (default), PUT, PATCH, GET, or DELETE. For GET and DELETE the request is sent without a body.
URLThe endpoint to call. Supports {{placeholder}} values resolved from the call trigger data — e.g. https://api.example.com/leads/{{crm_id}}/calls. Unresolved placeholders are left as-is.
Request bodyAuto (toggle data sections on/off) or Custom Template (write your own JSON body).
HeadersCustom request headers, e.g. an Authorization token for your endpoint. Content-Type: application/json is always set.
ActiveEnable or disable the integration without deleting it.

Request body modes

Auto mode

In Auto mode you choose which data sections to include. Each enabled section contributes its fields to a flat JSON body; sections with no data for a given call are omitted.
SectionFields
Call Infocall_log_id, phone_number, agent_name, call_status, call_type
AI Summarycall_summary — natural-language summary generated from the transcript
Data Extractiondata_capture — values for the fields defined in the agent’s Data Extraction tab
Structured Outputstructured_output — custom JSON from your Output Schema (simple or conditional)
Call Trigger Datacall_trigger_data — data from the source that triggered the call: the original API request body for API-triggered calls, or the row metadata for campaign (CSV) calls

Custom Template mode

In Custom Template mode you write the JSON body yourself, using {{expression}} placeholders that are resolved against the call’s data at delivery time:
{
  "customer_name": "{{data_capture.name}}",
  "intent": "{{structured_output.intent}}",
  "slot_date": "{{structured_output.appointment.date}}",
  "phone": "{{call_info.phone_number}}",
  "all_output": "{{structured_output}}",
  "summary": "{{call_summary}}",
  "source": "osvi"
}
Available expression sources:
SourceFieldsExample
call_infocall_log_id, phone_number, agent_name, call_status, call_type{{call_info.phone_number}}
call_summaryThe full AI-generated summary text{{call_summary}}
data_captureAny label defined in the Data Extraction tab{{data_capture.email}}
structured_outputAny key from your Output Schema; nested paths supported{{structured_output.appointment.date}}
call_trigger_dataAny key from the original trigger payload; nested paths supported{{call_trigger_data.meta.campaign_id}}
When a value is only an expression (e.g. "{{structured_output}}"), the raw type is preserved — objects stay objects, numbers stay numbers. When an expression is embedded in a longer string, it is interpolated as text. Expressions that don’t resolve become null.

Delivery, logging, and retries

  • Your endpoint should respond with any 2xx status within 15 seconds to acknowledge receipt.
  • Every delivery attempt — including the request payload, response status, and response body — is recorded in Integration Logs on the agent’s Post-Call Analysis tab.
  • Failed deliveries (non-2xx responses, timeouts, connection errors) are not retried automatically, but can be retried manually from the Integration Logs view, individually or in bulk.
  • Use the Test button on an integration to send a sample payload and verify your endpoint before going live.

Body

application/json
call_log_id
string<uuid>

Unique identifier for this call log entry. Part of the Call Info section.

Example:

"8de63236-e013-42dd-9d99-1be5521701d4"

phone_number
string

Phone number of the other party, in E.164 format. Part of the Call Info section.

Example:

"+919876543210"

agent_name
string

Identifier of the agent that handled the call. Part of the Call Info section.

Example:

"agent_IsZ3Q6Sf_60Eh26XQMGbz-R_og"

call_status
enum<string>

Outcome of the call. Part of the Call Info section. Post-call webhooks only fire for calls that were answered and produced a transcript, so this is always picked.

Available options:
picked
Example:

"picked"

call_type
enum<string>

Direction of the call. Part of the Call Info section; omitted when the direction is unknown.

Available options:
inbound,
outbound
Example:

"outbound"

call_summary
string

AI-generated natural-language summary of the call, produced from the transcript. Sent when the AI Summary section is enabled.

Example:

"The customer confirmed their appointment for tomorrow at 10 AM and asked to receive a reminder SMS an hour before."

data_capture
object

Key-value pairs extracted from the conversation, one entry per field defined in the agent's Data Extraction tab. Sent when the Data Extraction section is enabled and at least one field was captured.

Example:
{
"customer_name": "John Doe",
"appointment_confirmed": true,
"preferred_time": "10:00 AM"
}
structured_output
object

Custom JSON matching the agent's Output Schema. For conditional schemas, contains _matched_condition (the label of the condition that matched) alongside the matched schema's fields. Sent when the Structured Output section is enabled and the schema produced output.

Example:
{
"intent": "appointment_confirmation",
"appointment": { "date": "2026-06-12", "time": "10:00" }
}
call_trigger_data
object

Data from the source that triggered the call. For API-triggered calls this carries the custom fields from the original request body; for campaign (CSV) calls it carries the row's metadata columns. Always includes phone_number and person_name when available. Sent when the Call Trigger Data section is enabled.

Example:
{
"phone_number": "+919876543210",
"person_name": "John Doe",
"crm_id": "lead_42",
"campaign": "june-renewals"
}

Response

200

Webhook received successfully. Return any 2xx status to acknowledge receipt. Non-2xx responses are recorded as failed deliveries in the agent's Integration Logs and can be retried from the dashboard.