Campaign Stats
curl --request GET \
--url https://api-prod.interactly.ai/campaigns/v1/stats/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-prod.interactly.ai/campaigns/v1/stats/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-prod.interactly.ai/campaigns/v1/stats/campaigns', 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://api-prod.interactly.ai/campaigns/v1/stats/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api-prod.interactly.ai/campaigns/v1/stats/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-prod.interactly.ai/campaigns/v1/stats/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/campaigns/v1/stats/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Stats fetched successfully.",
"data": [
{
"count": 123,
"status": "<string>",
"outcome": "<string>",
"tag": "<string>",
"source": "<string>",
"campaignType": "<string>"
}
]
}{
"message": "Resource not found."
}{
"message": "Resource not found."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"message": "Resource not found."
}Campaign Stats
Campaign Stats
Get aggregated campaign counts grouped by a chosen dimension.
- group_by: Grouping dimension —
status(default),source, orcampaignType. - statuses: Repeat to filter by multiple statuses:
?statuses=completed&statuses=processing. - tags: Filter tag-grouped results by substring match.
- start / end: ISO 8601 date range filter applied to campaign creation date.
GET
/
campaigns
/
v1
/
stats
/
campaigns
Campaign Stats
curl --request GET \
--url https://api-prod.interactly.ai/campaigns/v1/stats/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-prod.interactly.ai/campaigns/v1/stats/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-prod.interactly.ai/campaigns/v1/stats/campaigns', 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://api-prod.interactly.ai/campaigns/v1/stats/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://api-prod.interactly.ai/campaigns/v1/stats/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-prod.interactly.ai/campaigns/v1/stats/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.interactly.ai/campaigns/v1/stats/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Stats fetched successfully.",
"data": [
{
"count": 123,
"status": "<string>",
"outcome": "<string>",
"tag": "<string>",
"source": "<string>",
"campaignType": "<string>"
}
]
}{
"message": "Resource not found."
}{
"message": "Resource not found."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"message": "Resource not found."
}Authorizations
Retrieve your API Key from Dashboard API Keys Section.
Query Parameters
Grouping criteria: status, source, campaignType
Available options:
outcome, status, status_outcome, tag, source, campaignType Filter by one or more campaign statuses
Filter tag stats by tag strings (substring match)
Number of items per page
Required range:
x >= 1Page number
Required range:
x >= 1Search keywords
Filter by start time (ISO 8601 format)
Filter by end time (ISO 8601 format)
Response
Aggregated campaign counts grouped by the chosen dimension
Result description
Example:
"Stats fetched successfully."
Aggregated counts grouped by the requested dimension ('outcome', 'status', 'status_outcome', 'tag', 'source', 'campaignType'). Each entry contains a 'count' field and a group key field named after the dimension.
Show child attributes
Show child attributes