Campaign Stats
curl --request GET \
--url https://app.closerx.ai/api/v2/campaign-stats/ \
--header 'api_key: <api-key>'import requests
url = "https://app.closerx.ai/api/v2/campaign-stats/"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://app.closerx.ai/api/v2/campaign-stats/', 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-stats/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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-stats/"
req, _ := http.NewRequest("GET", url, nil)
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-stats/")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.closerx.ai/api/v2/campaign-stats/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"active_campaign_count": 1,
"active_quick_campaign_count": 7,
"total_credit_deducted": 285,
"total_call_duration": 72,
"credit": 67.5813
}{
"success": true,
"message": "<string>",
"data": {}
}Credits
Campaign Stats
Retrieves statistics related to active campaigns, quick campaigns, total credits used, and call durations.
GET
/
v2
/
campaign-stats
/
Campaign Stats
curl --request GET \
--url https://app.closerx.ai/api/v2/campaign-stats/ \
--header 'api_key: <api-key>'import requests
url = "https://app.closerx.ai/api/v2/campaign-stats/"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://app.closerx.ai/api/v2/campaign-stats/', 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-stats/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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-stats/"
req, _ := http.NewRequest("GET", url, nil)
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-stats/")
.header("api_key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.closerx.ai/api/v2/campaign-stats/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api_key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"active_campaign_count": 1,
"active_quick_campaign_count": 7,
"total_credit_deducted": 285,
"total_call_duration": 72,
"credit": 67.5813
}{
"success": true,
"message": "<string>",
"data": {}
}Authorizations
Response
Successfully retrieved campaign statistics
Number of currently active campaigns
Example:
1
Number of currently active quick campaigns
Example:
7
Total number of credits deducted across campaigns
Example:
285
Total call duration in seconds
Example:
72
Total available credit
Example:
67.5813
⌘I
