Get campaign analytics by date
curl --request GET \
--url https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/ \
--header 'Company-Name: <company-name>' \
--header 'api_key: <api-key>'import requests
url = "https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/"
headers = {
"Company-Name": "<company-name>",
"api_key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Company-Name': '<company-name>', api_key: '<api-key>'}
};
fetch('https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Company-Name: <company-name>",
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Company-Name", "<company-name>")
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/")
.header("Company-Name", "<company-name>")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Company-Name"] = '<company-name>'
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_count": 1,
"total_page": 1,
"current_page_no": 1,
"next_page_number": null,
"previous_page_number": null,
"page_size": 10,
"data": [
{
"id": 5157,
"calling_number": "+911149816890",
"sid": "call_4be2700848d9cf0cbcb525393d8",
"contact_id": null,
"contact_number": "+918570904784",
"email": null,
"first_name": null,
"last_name": null,
"company_name": null,
"industry": null,
"address": null,
"custom1": null,
"custom2": null,
"custom3": null,
"custom4": null,
"scheduling_charge": "0.0000",
"calender_id": null,
"appointment_booked": false,
"call_duration": 0,
"status": "dial_no_answer",
"improvement_tags": [],
"outcome": "Unknown",
"recording_url": null,
"recording_file": null,
"transcription": [],
"transcription_text": "",
"notes": "",
"credit_deduction": "0.0000",
"errors": "",
"response_sentiment": "NOT_DETECTED",
"triggered_by_crm": "GHL",
"dynamic_variables": null,
"extract_dynamic_variables": null,
"created_at": "2025-08-08T20:04:34.718079Z",
"updated_at": "2025-08-08T20:09:11.544410Z",
"quick_campaign": "quickcamp2062236c"
}
]
}{
"success": true,
"message": "<string>",
"data": {}
}Campaign
Campaign Analytics
Returns paginated campaign analytics for a specific campaign and date range.
GET
/
v2
/
campaign-analytics
/
{campaign_id}
/
Get campaign analytics by date
curl --request GET \
--url https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/ \
--header 'Company-Name: <company-name>' \
--header 'api_key: <api-key>'import requests
url = "https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/"
headers = {
"Company-Name": "<company-name>",
"api_key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Company-Name': '<company-name>', api_key: '<api-key>'}
};
fetch('https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Company-Name: <company-name>",
"api_key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Company-Name", "<company-name>")
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/")
.header("Company-Name", "<company-name>")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.closerx.ai/api/v2/campaign-analytics/{campaign_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Company-Name"] = '<company-name>'
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_count": 1,
"total_page": 1,
"current_page_no": 1,
"next_page_number": null,
"previous_page_number": null,
"page_size": 10,
"data": [
{
"id": 5157,
"calling_number": "+911149816890",
"sid": "call_4be2700848d9cf0cbcb525393d8",
"contact_id": null,
"contact_number": "+918570904784",
"email": null,
"first_name": null,
"last_name": null,
"company_name": null,
"industry": null,
"address": null,
"custom1": null,
"custom2": null,
"custom3": null,
"custom4": null,
"scheduling_charge": "0.0000",
"calender_id": null,
"appointment_booked": false,
"call_duration": 0,
"status": "dial_no_answer",
"improvement_tags": [],
"outcome": "Unknown",
"recording_url": null,
"recording_file": null,
"transcription": [],
"transcription_text": "",
"notes": "",
"credit_deduction": "0.0000",
"errors": "",
"response_sentiment": "NOT_DETECTED",
"triggered_by_crm": "GHL",
"dynamic_variables": null,
"extract_dynamic_variables": null,
"created_at": "2025-08-08T20:04:34.718079Z",
"updated_at": "2025-08-08T20:09:11.544410Z",
"quick_campaign": "quickcamp2062236c"
}
]
}{
"success": true,
"message": "<string>",
"data": {}
}Authorizations
Headers
The name of the schema to be used for the request
Path Parameters
Unique campaign ID (e.g., campc005bf8a)
Query Parameters
Page number for pagination
Sort the results by a specific field
Search term for filtering
Filter by outcome of the campaign
Specific date for which data is required
Start date for range filtering
End date for range filtering
Response
Campaign analytics data response
Total number of analytics records
Example:
1
Total number of pages
Example:
1
Current page number
Example:
1
Next page number if available
Example:
null
Previous page number if available
Example:
null
Number of records per page
Example:
10
List of campaign analytics data
Show child attributes
Show child attributes
⌘I
