import requests
url = "https://api.sendpost.io/api/v1/subaccount/domain/<domain_id>"
headers = {
"accept": "application/json",
"X-SubAccount-ApiKey": "<subaccount_api_key>"
}
response = requests.get(url, headers=headers)
print(response.json())
curl --request GET \
--url https://api.sendpost.io/api/v1/subaccount/domain/{domain_id} \
--header 'X-SubAccount-ApiKey: <api-key>'const options = {method: 'GET', headers: {'X-SubAccount-ApiKey': '<api-key>'}};
fetch('https://api.sendpost.io/api/v1/subaccount/domain/{domain_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.sendpost.io/api/v1/subaccount/domain/{domain_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-SubAccount-ApiKey: <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.sendpost.io/api/v1/subaccount/domain/{domain_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-SubAccount-ApiKey", "<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.sendpost.io/api/v1/subaccount/domain/{domain_id}")
.header("X-SubAccount-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/subaccount/domain/{domain_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-SubAccount-ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 117,
"name": "piedpiper.com",
"dkim": {
"host": "sp-dkim._domainkey.piedpiper.com",
"type": "TXT",
"textValue": "v=DKIM1;k=rsa;p=MIGfMA0GCSqGSIb3D..."
},
"returnPath": {
"host": "sp-bounces.piedpiper.com",
"type": "CNAME",
"textValue": "sp.sendpost.email"
},
"track": {
"host": "track.piedpiper.com",
"type": "CNAME",
"textValue": "api.sendpost.io"
},
"dmarc": {
"host": "_dmarc.piedpiper.com",
"type": "TXT",
"textValue": "v=DMARC1; p=quarantine; rua=mailto:dmarc@piedpiper.com"
},
"dkimVerified": true,
"dmarcVerified": true,
"returnPathVerified": true,
"trackVerified": true,
"verified": true,
"domainRegisteredDate": "2014-04-12",
"created": 1704067200000000000
}Get Domain
Retrieve detailed information about a specific sending domain, including DNS record configuration and verification status.
Response includes:
- Domain name and ID
- DKIM, Return-Path, Track, and DMARC DNS records to configure
- Verification status for each record type
- Failure reasons if verification failed
- Domain registration date
Use Cases:
- Check verification status before sending emails
- Retrieve DNS records during domain setup
- Debug DNS configuration issues
- Audit domain settings for compliance
import requests
url = "https://api.sendpost.io/api/v1/subaccount/domain/<domain_id>"
headers = {
"accept": "application/json",
"X-SubAccount-ApiKey": "<subaccount_api_key>"
}
response = requests.get(url, headers=headers)
print(response.json())
curl --request GET \
--url https://api.sendpost.io/api/v1/subaccount/domain/{domain_id} \
--header 'X-SubAccount-ApiKey: <api-key>'const options = {method: 'GET', headers: {'X-SubAccount-ApiKey': '<api-key>'}};
fetch('https://api.sendpost.io/api/v1/subaccount/domain/{domain_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.sendpost.io/api/v1/subaccount/domain/{domain_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-SubAccount-ApiKey: <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.sendpost.io/api/v1/subaccount/domain/{domain_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-SubAccount-ApiKey", "<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.sendpost.io/api/v1/subaccount/domain/{domain_id}")
.header("X-SubAccount-ApiKey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendpost.io/api/v1/subaccount/domain/{domain_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-SubAccount-ApiKey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 117,
"name": "piedpiper.com",
"dkim": {
"host": "sp-dkim._domainkey.piedpiper.com",
"type": "TXT",
"textValue": "v=DKIM1;k=rsa;p=MIGfMA0GCSqGSIb3D..."
},
"returnPath": {
"host": "sp-bounces.piedpiper.com",
"type": "CNAME",
"textValue": "sp.sendpost.email"
},
"track": {
"host": "track.piedpiper.com",
"type": "CNAME",
"textValue": "api.sendpost.io"
},
"dmarc": {
"host": "_dmarc.piedpiper.com",
"type": "TXT",
"textValue": "v=DMARC1; p=quarantine; rua=mailto:dmarc@piedpiper.com"
},
"dkimVerified": true,
"dmarcVerified": true,
"returnPathVerified": true,
"trackVerified": true,
"verified": true,
"domainRegisteredDate": "2014-04-12",
"created": 1704067200000000000
}Authorizations
This api key can be used only for sub account level operations
Path Parameters
The unique ID of the domain to retrieve.
Response
Successful response
A sending domain configured for email delivery. Domains must be verified via DNS records before they can be used for sending. SendPost requires DKIM authentication and recommends configuring Return-Path, DMARC, and tracking records for optimal deliverability.
Unique identifier for the domain
117
The domain name (e.g., "example.com"). This is the domain portion of your sending email addresses.
"piedpiper.com"
Auto-detected DNS provider for this domain (e.g. "cloudflare", "other"), used to tailor DNS-setup instructions. Read-only.
"cloudflare"
DKIM (DomainKeys Identified Mail) DNS record configuration. DKIM cryptographically signs your emails to verify they haven't been tampered with. This is REQUIRED for sending emails.
Show child attributes
Show child attributes
Return-Path (bounce handling) DNS record configuration. Configuring this allows bounce notifications to be properly routed through SendPost. RECOMMENDED for better deliverability.
Show child attributes
Show child attributes
Tracking domain DNS record configuration. When configured, click tracking links use your domain instead of SendPost's domain. RECOMMENDED for brand consistency and improved click-through rates.
Show child attributes
Show child attributes
DMARC (Domain-based Message Authentication, Reporting & Conformance) DNS record. DMARC builds on DKIM and SPF to provide email authentication and reporting. RECOMMENDED for enterprise senders.
Show child attributes
Show child attributes
Whether the DKIM DNS record has been verified successfully
true
Whether the DMARC DNS record has been verified successfully
false
Whether the Return-Path DNS record has been verified successfully
true
Whether the tracking domain DNS record has been verified successfully
true
Overall verification status. True only if DKIM is verified (minimum requirement). For full verification, configure all DNS records.
true
Date when this domain was originally registered (from WHOIS). Newer domains may have lower sender reputation initially.
"1995-08-14"
UNIX epoch timestamp in nanoseconds when the domain was added to SendPost
1704067200000000000
Detailed reason if DKIM verification failed (empty if verified or not attempted)
"DNS record not found. Please add the TXT record to your DNS provider."
Detailed reason if DMARC verification failed
""
Detailed reason if tracking domain verification failed
""
Detailed reason if Return-Path verification failed
""
Was this page helpful?