Skip to main content

Getting call data from API

Receive information about the Speed To Lead call into your CRM or any other software

Updated over 10 months ago

With Brightcall.ai you can send webhooks with detailed call data to your web application.

To configure webhooks, go to the Dashboard—> Speed To Lead™ —> “Widgets” (select the widget you wish to integrate) —> "Integrations" tab:

It’s important to notice that “Send a webhook in post json in new format (beta)” should always be on. If you turn it off, then start_call event won’t work.

Here are some examples of our webhook events payload:

As you already noticed there are 2 types of webhook events: those that are sent once the has started and another one when the call is completed.

👇 Example of Start-call Webhook payload

{
"type": "start_call",
"call_id": "35298eac05ef54b365e601f85d46afc1",
"user_id": 12345,
"widget_key": "38a7f82ff7f9934294af18b05ae2df38",
"widget_name": "string",
"timezone": "Europe/Stockholm",
"is_delayed_call": true,
"called_lead_phone": "string",
"lead": {
"lead_phone": "string",
"lead_id": "01FJMF4H421TYD6VAEW63BZM06",
"time_created_iso_string": "2020-01-01T12:00:00.000Z",
"source": "string",
"site_path": "string",
"referer": "string",
"ip": "string",
"country": "string",
"additional": "any",
"custom_params": {}
},
"debug": "any"
}

👇 Example of After-call Webhook payload

{
"type": "end_call",
"call_id": "35298eac05ef54b365e601f85d46afc1",
"user_id": 12345,
"widget_key": "38a7f82ff7f9934294af18b05ae2df38",
"widget_name": "string",
"call_status": "answered",
"timezone": "Europe/Stockholm",
"time_started_iso_string": "2020-01-01T12:00:00.000Z",
"time_agent_answered_iso_string": "2020-01-01T12:00:00.000Z",
"time_lead_answered_iso_string": "2020-01-01T12:00:00.000Z",
"time_ended_iso_string": "2020-01-01T12:00:00.000Z",
"is_delayed_call": true,
"answer_duration_sec": 45,
"lead_answer_duration_sec": 45,
"talk_duration_sec": 45,
"total_duration_sec": 45,
"disconnected_by": "agent",
"recording_link": "string",
"called_lead_phone": "string",
"agent": {
"id": 12345,
"phone": "string",
"name": "string",
"email": "string"
},
"lead": {
"lead_phone": "string",
"lead_id": "01FJMF4H421TYD6VAEW63BZM06",
"time_created_iso_string": "2020-01-01T12:00:00.000Z",
"source": "string",
"site_path": "string",
"referer": "string",
"ip": "string",
"country": "string",
"additional": "any",
"custom_params": {}
},
"debug": "any"
}

If you are having trouble setting up webhooks, please email us at [email protected]

Did this answer your question?