Use webhooks to be notified about events that happen in Call Tracker.
Call Tracker can send webhooks that notify your application anytime an event happens. This is especially useful for building custom reporting solutions that need to receive data on call or message activity.
Setting Up Webhooks
You can register new Webhooks in the company settings to send data to your endpoint. For each webhook, you can subscribe to All Events or select specific events to send to your endpoint. See a list of all events and example event data below.
To set up a webhook target endpoint, you need to define a route on your server for receiving the events, configure webhook settings so Call Tracker knows where to POST events to, verify your endpoint is valid, and acknowledge your endpoint is receiving events successfully.
Important Webhook target endpoints must accept JSON data and respond with a 200 response code. If we do not receive a 200 response, we will retry up to 5 times over a 24 hour period on an exponential back off schedule. If the webhook retry process is unsuccessful, your webhook endpoint will be deactivated.
Events
Below are all Events that can trigger webhooks to send data to your application. The structure of the event data follows our API for each object type, given in the "object" key. For example, a webhook for the "call.finished" event contains all the data available on the API for the call object at that point in time.
| Event | Triggers |
|---|---|
| call.received | Triggers immediately when a new call is received. The call is still in progress at this stage, so not all call data is available yet. |
| call.finished | Triggers when the call is finished. |
| call.recording.available | Triggers when a call recording is available for download. |
| message.received | Triggers when an SMS message is received. |
| message.sent | Triggers when an SMS message is sent. |
| tracker.created | Triggers when a new tracker is created. |
| tracker.updated | Triggers when a tracker is updated. |
| usage.created | Triggers when a new billing usage record has been created. |
| voicemail.received | Triggers when a new voicemail is received. |
call.received
Triggers immediately when a new call is received. The call is still in progress at this stage, so not all call data is available yet.
{
"type": "call.received",
"object": "call",
"data": {
"source_referrer": "https://www.google.com/",
"landing_page": "https://calltracker.io/",
"caller_zip": "",
"tracker_id": 1570,
"tracking_number": "+12702822733",
"caller_state": "",
"caller_country": "US",
"status": "ringing",
"company_name": "Example Company",
"caller_city": "",
"visitor_ip": "24.0.64.93",
"source_keyword": "(not provided)",
"company_id": 1000,
"caller_number": "+18558871739",
"source_channel": "organic",
"caller_name": "",
"timestamp": "2019-03-09T09:09:51.733192Z",
"tracker_name": "Number Pool",
"id": 59179,
"call_duration": 0,
"pages_visited": [
"https://calltracker.io/"
],
"recording": null,
"recording_duration": 0,
"gclid": "",
"is_first_time": true
},
"timestamp": "2019-03-09T09:09:52.010",
"webhook": {
"id": 21,
"target": "https://example.com/webhook/receiver/"
}
}
call.finished
Triggers when the call is finished.
{
"type": "call.finished",
"object": "call",
"data": {
"caller_number": "+18558871739",
"source_referrer": "https://www.google.com/",
"timestamp": "2019-03-09T04:09:51.733192-05:00",
"gclid": "",
"company_id": 1000,
"caller_state": "",
"landing_page": "https://calltracker.io/",
"recording_duration": 186,
"source_channel": "organic",
"caller_zip": "",
"call_duration": 219,
"company_name": "Example Company",
"pages_visited": [
"https://calltracker.io/"
],
"caller_city": "",
"status": "answered",
"tracker_id": 1570,
"tracking_number": "+12702822733",
"recording": null,
"caller_country": "US",
"caller_name": "",
"source_keyword": "(not provided)",
"id": 59179,
"tracker_name": "Number Pool",
"visitor_ip": "24.0.64.93",
"is_first_time": true
},
"timestamp": "2019-03-09T09:13:31.745",
"webhook": {
"target": "https://example.com/webhook/receiver/",
"id": 21
}
}
call.recording.available
Triggers when a call recording is available for download.
{
"type": "call.recording.available",
"object": "call",
"data": {
"caller_number": "+18558871739",
"source_referrer": "https://www.google.com/",
"timestamp": "2019-03-09T09:09:51.733192Z",
"gclid": "",
"company_id": 1000,
"caller_state": "",
"landing_page": "https://calltracker.io/",
"recording_duration": 186,
"source_channel": "organic",
"caller_zip": "",
"call_duration": 219,
"company_name": "Example Company",
"pages_visited": [
"https://calltracker.io/"
],
"caller_city": "",
"status": "answered",
"tracker_id": 1570,
"tracking_number": "+12702822733",
"recording": "https://d2k1yc19c4o170.cloudfront.net/call_recordings/CAa0d99df2ede69656e55cd40e2ca05.mp3",
"caller_country": "US",
"caller_name": "",
"source_keyword": "(not provided)",
"id": 59179,
"tracker_name": "Number Pool",
"visitor_ip": "24.0.64.93"
},
"timestamp": "2019-03-09T09:14:06.146",
"webhook": {
"target": "https://example.com/webhook/receiver/",
"id": 21
}
}
message.received
Triggers when an SMS message is received.
{
"type": "message.received",
"object": "message",
"data": {
"tracker_name": "Example Tracker",
"tracker_id": 1081,
"direction": "incoming",
"company_id": 1000,
"body": "Hello! This is an message example",
"to_number": "+18556000724",
"from_number": "+18558871739",
"id": 139,
"company_name": "Example Company",
"timestamp": "2019-03-09T07:30:00.942Z"
},
"timestamp": "2019-03-09T07:30:01.084",
"webhook": {
"id": 21,
"target": "https://example.com/webhook/receiver/"
}
}
message.sent
Triggers when an SMS message is sent.
{
"type": "message.sent",
"object": "message",
"data": {
"from_number": "+18556000724",
"direction": "outgoing",
"tracker_name": "Billing",
"id": 140,
"to_number": "+18558871739",
"timestamp": "2019-03-10T05:07:02.890Z",
"body": "Thanks for your message!",
"tracker_id": 1081,
"company_id": 1000,
"company_name": "Call Tracker"
},
"timestamp": "2019-03-10T05:07:02.918",
"webhook": {
"target": "https://example.com/webhook/receiver/",
"id": 21
}
}
tracker.created
Triggers when a new tracker is created.
{
"type": "tracker.created",
"object": "tracker",
"data": {
"campaign_search_from": "",
"company_id": 1000,
"recording_message": "This call may be recorded for quality assurance.",
"tracker_type": "offline",
"campaign_landing_page": "",
"number_type": "tollfree",
"phone_numbers": [
{
"number": "+18558871739",
"status": true
}
],
"campaign_campaign_parameters": "",
"campaign_referral": "",
"number_pool_size": null,
"name": "Startup Lister",
"id": 1013,
"swap_target": "",
"whisper_enabled": true,
"destination": "+12703152766",
"whisper_message": "Call from Startup Lister.",
"campaign_search_for": "",
"campaign_source": "",
"recording_enabled": true,
"status": true,
"company_name": "Call Tracker"
},
"timestamp": "2019-03-06T09:29:16.093",
"webhook": {
"id": 21,
"target": "https://example.com/webhook/receiver/"
}
}
tracker.updated
Triggers when a tracker is updated.
{
"type": "tracker.updated",
"object": "tracker",
"data": {
"campaign_search_from": "",
"company_id": 1000,
"recording_message": "This call may be recorded for quality assurance.",
"tracker_type": "offline",
"campaign_landing_page": "",
"number_type": "tollfree",
"phone_numbers": [
{
"number": "+18558871739",
"status": true
}
],
"campaign_campaign_parameters": "",
"campaign_referral": "",
"number_pool_size": null,
"name": "Startup Lister",
"id": 1013,
"swap_target": "",
"whisper_enabled": true,
"destination": "+12703152766",
"whisper_message": "Call from Startup Lister.",
"campaign_search_for": "",
"campaign_source": "",
"recording_enabled": true,
"status": true,
"company_name": "Call Tracker"
},
"timestamp": "2019-03-06T09:29:16.093",
"webhook": {
"id": 21,
"target": "https://example.com/webhook/receiver/"
}
}
usage.created
Triggers when a new billing usage record has been created.
{
"type": "usage.created",
"object": "usage",
"data": {
"tollfree_numbers": 3,
"local_numbers": 10,
"tollfree_minutes": 234,
"timestamp": "2019-03-10T05:13:57.573179Z",
"id": 32,
"company_id": 1000,
"local_minutes": 203,
"start_date": "2019-02-10",
"sms_messages": 18,
"company_name": "Example Company",
"end_date": "2019-03-10"
},
"timestamp": "2019-03-10T05:13:57.594",
"webhook": {
"target": "https://example.com/webhook/receiver/",
"id": 19
}
}
voicemail.received
Triggers when a new voicemail is received.
{
"data": {
"call_id": 1000,
"recording_duration": 14,
"tracker_id": 1000,
"tracking_number": "+18886787987",
"recording": "https://example.com/recording/example.wav",
"caller_number": "+18128787987",
"tracker_name": "Example Call Flow",
"id": 3,
"company_id": 1111,
"transcription": "Hi, this is an example voicemail transcription. Thanks."
},
"webhook": {
"target": "https://example.com/webhook/receiver/",
"id": 42
},
"timestamp": "2019-05-18T08:09:59.492",
"type": "voicemail.received",
"object": "voicemail"
}