List Sending Domains
curl --request GET \
--url https://api.politicalcomms.com/v1/email/domains \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.politicalcomms.com/v1/email/domains"
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/email/domains', 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/email/domains",
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/email/domains"
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/email/domains")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.politicalcomms.com/v1/email/domains")
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": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "mail.example.org",
"status": "pending",
"dns_records": [
{
"type": "CNAME",
"name": "<string>",
"value": "<string>",
"purpose": "<string>"
}
],
"verification": {
"dkim": "<string>",
"mail_from": "<string>",
"dmarc": "<string>"
},
"error_message": "<string>",
"last_checked_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"next_cursor": "<string>"
}
}Sending Domains
List Sending Domains
List the organization’s email sending domains, newest first.
Early access. This endpoint returns 403 EMAIL_EARLY_ACCESS until the email product reaches general availability. The contract below is stable and safe to build against.
GET
/
email
/
domains
List Sending Domains
curl --request GET \
--url https://api.politicalcomms.com/v1/email/domains \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.politicalcomms.com/v1/email/domains"
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/email/domains', 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/email/domains",
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/email/domains"
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/email/domains")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.politicalcomms.com/v1/email/domains")
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": {
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "mail.example.org",
"status": "pending",
"dns_records": [
{
"type": "CNAME",
"name": "<string>",
"value": "<string>",
"purpose": "<string>"
}
],
"verification": {
"dkim": "<string>",
"mail_from": "<string>",
"dmarc": "<string>"
},
"error_message": "<string>",
"last_checked_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"next_cursor": "<string>"
}
}Authorizations
Authenticate every request by passing your API key in the X-API-Key header. Keys are scoped to your organization hierarchy.
Query Parameters
Rows per page, 1-200.
Required range:
1 <= x <= 200Opaque cursor from the previous page's next_cursor.
Maximum string length:
4096Case-insensitive substring match.
Maximum string length:
255