Get Contact List
curl --request GET \
--url https://api.politicalcomms.com/v1/contact-lists/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.politicalcomms.com/v1/contact-lists/{id}"
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/contact-lists/{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://api.politicalcomms.com/v1/contact-lists/{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 => [
"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/contact-lists/{id}"
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/contact-lists/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.politicalcomms.com/v1/contact-lists/{id}")
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": {
"list_id": "3f7a9c1e-8b24-4d6f-a2e5-9c7b3f1a8d42",
"name": "Spring Outreach List",
"brand_id": "7c1de5f0-9a42-4b6d-8e33-2f5a9c7b1e64",
"organization_id": "0d9f6a2e-1b34-4c8e-9f21-3e7a8b5c4d10",
"imported_via_api": true,
"created_at": "2025-03-15T10:00:00.000Z",
"import": {
"status": "ready",
"progress": 100,
"total_rows": 12500,
"total_contacts": 12500,
"clean_contacts": 11800,
"duplicate_count": 400,
"bad_number_count": 250,
"opted_out_count": 50,
"processing_started_at": "2025-03-15T10:00:05.000Z",
"processing_completed_at": "2025-03-15T10:04:40.000Z"
},
"analysis": {
"status": "complete",
"analyzed_numbers": 11800,
"breakdown": {
"mobile": 11200,
"landline": 300,
"voip": 250,
"invalid": 50
}
}
}
}Contact Lists
Get Contact List
Fetch a single contact list including import progress and phone-type analysis results.
GET
/
contact-lists
/
{id}
Get Contact List
curl --request GET \
--url https://api.politicalcomms.com/v1/contact-lists/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.politicalcomms.com/v1/contact-lists/{id}"
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/contact-lists/{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://api.politicalcomms.com/v1/contact-lists/{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 => [
"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/contact-lists/{id}"
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/contact-lists/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.politicalcomms.com/v1/contact-lists/{id}")
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": {
"list_id": "3f7a9c1e-8b24-4d6f-a2e5-9c7b3f1a8d42",
"name": "Spring Outreach List",
"brand_id": "7c1de5f0-9a42-4b6d-8e33-2f5a9c7b1e64",
"organization_id": "0d9f6a2e-1b34-4c8e-9f21-3e7a8b5c4d10",
"imported_via_api": true,
"created_at": "2025-03-15T10:00:00.000Z",
"import": {
"status": "ready",
"progress": 100,
"total_rows": 12500,
"total_contacts": 12500,
"clean_contacts": 11800,
"duplicate_count": 400,
"bad_number_count": 250,
"opted_out_count": 50,
"processing_started_at": "2025-03-15T10:00:05.000Z",
"processing_completed_at": "2025-03-15T10:04:40.000Z"
},
"analysis": {
"status": "complete",
"analyzed_numbers": 11800,
"breakdown": {
"mobile": 11200,
"landline": 300,
"voip": 250,
"invalid": 50
}
}
}
}Authorizations
Authenticate every request by passing your API key in the X-API-Key header. Keys are scoped to your organization hierarchy.
Path Parameters
Resource ID
⌘I
