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"
}
Choose the agent calling order
Your application can respond to a start_call webhook with a list of agents to call. Brightcall uses the response to arrange the calling order for that call.
To call Anna first, then Ben, then Chris, return HTTP 200 with this JSON:
{
"success": true,
"response": {
"overrideCallGroup": [
{ "id": 101, "phone": "46701111111", "name": "Anna" },
{ "id": 102, "phone": "46702222222", "name": "Ben" },
{ "id": 103, "phone": "46703333333", "name": "Chris" }
],
"overrideCallOrder": "ordered"
}
}
Put the agents in the order you want them called. Each agent needs a numeric id and a phone number; name is optional.
You can use the same response with a different overrideCallOrder:
Value | Calling order |
| Call agents one after another, in the listed order. |
| Call all listed agents at the same time. |
| Call the first agent, then call the remaining agents together. |
Your application can return a different agent list for each call using information in the start_call payload, such as widget_key or lead.custom_params. Respond within 60 seconds; if Brightcall does not receive a successful response, the call proceeds without your override. This controls the dialing plan for one call; it does not create a waiting queue for leads.
👇 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]

