Get Project Stats (all)
curl --request GET \
--url https://api.politicalcomms.com/v1/projects/stats \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.politicalcomms.com/v1/projects/stats"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.politicalcomms.com/v1/projects/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://api.politicalcomms.com/v1/projects/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 => [
"X-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://api.politicalcomms.com/v1/projects/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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://api.politicalcomms.com/v1/projects/stats")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.politicalcomms.com/v1/projects/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"totals": {
"projects": 14,
"sent": 1452300,
"delivered": 1438700,
"undeliverable": 13600,
"replies": 124400,
"opt_outs": 8650,
"clicks": 67200
},
"projects": [
{
"id": "proj_abc123",
"name": "GOTV Blast - Oct 15",
"status": "completed",
"sent": 125000,
"delivered": 123900,
"undeliverable": 1100,
"replies": 11200,
"opt_outs": 720,
"clicks": 5840
}
]
}
}{
"success": false,
"error": "Invalid request parameters",
"code": "BAD_REQUEST",
"statusCode": 400
}{
"success": false,
"error": "The provided API key is invalid or has been revoked",
"code": "INVALID_API_KEY",
"statusCode": 401
}{
"success": false,
"error": "API key lacks the permission scope this endpoint requires",
"code": "PERMISSION_DENIED",
"statusCode": 403
}{
"success": false,
"error": "Rate limit exceeded",
"message": "Maximum 100 requests per 60 seconds",
"code": "RATE_LIMIT_EXCEEDED",
"statusCode": 429,
"retryAfter": 12
}{
"success": true,
"error": "<string>",
"code": "<string>",
"statusCode": 123
}Projects
Get Project Stats (all)
Get project statistics for a date range across the hierarchy.
GET
/
projects
/
stats
Get Project Stats (all)
curl --request GET \
--url https://api.politicalcomms.com/v1/projects/stats \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.politicalcomms.com/v1/projects/stats"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.politicalcomms.com/v1/projects/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://api.politicalcomms.com/v1/projects/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 => [
"X-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://api.politicalcomms.com/v1/projects/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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://api.politicalcomms.com/v1/projects/stats")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.politicalcomms.com/v1/projects/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"totals": {
"projects": 14,
"sent": 1452300,
"delivered": 1438700,
"undeliverable": 13600,
"replies": 124400,
"opt_outs": 8650,
"clicks": 67200
},
"projects": [
{
"id": "proj_abc123",
"name": "GOTV Blast - Oct 15",
"status": "completed",
"sent": 125000,
"delivered": 123900,
"undeliverable": 1100,
"replies": 11200,
"opt_outs": 720,
"clicks": 5840
}
]
}
}{
"success": false,
"error": "Invalid request parameters",
"code": "BAD_REQUEST",
"statusCode": 400
}{
"success": false,
"error": "The provided API key is invalid or has been revoked",
"code": "INVALID_API_KEY",
"statusCode": 401
}{
"success": false,
"error": "API key lacks the permission scope this endpoint requires",
"code": "PERMISSION_DENIED",
"statusCode": 403
}{
"success": false,
"error": "Rate limit exceeded",
"message": "Maximum 100 requests per 60 seconds",
"code": "RATE_LIMIT_EXCEEDED",
"statusCode": 429,
"retryAfter": 12
}{
"success": true,
"error": "<string>",
"code": "<string>",
"statusCode": 123
}Authorizations
Authenticate every request by passing your API key in the X-API-Key header. Keys are scoped to your organization hierarchy.
Query Parameters
Start date in YYYY-MM-DD format
Example:
"2026-01-01"
End date in YYYY-MM-DD format
Example:
"2026-01-31"
Filter to a specific descendant organization
Filter to a specific brand
Filter to a specific campaign
Filter by status: draft, active, completed, archived, all
Available options:
draft, active, completed, archived, all ⌘I
