Appearance
Retrieve a domain
Fetch one domain by its id — including its DNS records and their current status.
http
GET /v1/domains/{id}Requires a Full access API key.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The domain id. |
Example
bash
curl "https://api.sendgrail.com/v1/domains/$DOMAIN_ID" \
-H "Authorization: Bearer $SENDGRAIL_API_KEY"js
const res = await fetch(`https://api.sendgrail.com/v1/domains/${id}`, {
headers: { Authorization: `Bearer ${process.env.SENDGRAIL_API_KEY}` },
});
const domain = await res.json();Response
json
{
"object": "domain",
"id": "5f1c3a9e-0d42-4b7c-9a63-2e8b41d7c015",
"name": "example.com",
"status": "verified",
"created_at": "2026-07-14T19:44:32+00:00",
"region": "us-east-1",
"capabilities": {
"sending": "enabled",
"receiving": "disabled"
},
"open_tracking": true,
"click_tracking": true,
"tracking_subdomain": "links",
"tls": "opportunistic",
"records": [
{
"record": "DKIM",
"name": "sendgrail._domainkey",
"type": "TXT",
"value": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ...",
"ttl": "Auto",
"status": "verified"
},
{
"record": "SPF",
"name": "send",
"type": "MX",
"value": "feedback-smtp.us-east-1.amazonses.com",
"ttl": "Auto",
"status": "verified",
"priority": 10
},
{
"record": "SPF",
"name": "send",
"type": "TXT",
"value": "v=spf1 include:amazonses.com ~all",
"ttl": "Auto",
"status": "verified"
},
{
"record": "DMARC",
"name": "_dmarc",
"type": "TXT",
"value": "v=DMARC1; p=none;",
"ttl": "Auto",
"status": "verified"
},
{
"record": "Tracking",
"name": "links.example.com",
"type": "CNAME",
"value": "track.sendgrail.com",
"ttl": "Auto",
"status": "verified"
}
]
}| Field | Description |
|---|---|
object | Always domain. |
id | The domain id. |
name | The domain itself, e.g. example.com. |
status | pending, verified or failed. See below. |
created_at | ISO 8601 time the domain was added. |
region | Where the sending identity lives: us-east-1, eu-west-1, sa-east-1 or ap-northeast-1. |
capabilities | sending is always enabled; receiving is always disabled (inbound email is a later release). |
open_tracking | Whether opens are recorded. |
click_tracking | Whether clicks are recorded. |
tracking_subdomain | The bare tracking label, e.g. links, or null when none is set. |
tls | opportunistic or enforced. See Create a domain. |
records | The DNS entries to add at your registrar. See below. |
Status
status | Meaning |
|---|---|
pending | The domain is added but its DNS isn't verified yet. It cannot send. |
verified | DNS checks passed. The domain can send. |
failed | A check failed — usually a missing or wrong record. Fix the records and verify again. |
Verification is not automatic. Add the records, then call Verify a domain to run the check, and retrieve to see the result.
The records array
Each entry is one DNS record you add at your registrar:
| Field | Description |
|---|---|
record | What the record is for: DKIM, SPF, DMARC or Tracking. |
name | The host, relative to the zone apex — @ is the apex. Most providers append the apex for you. |
type | TXT, MX or CNAME. |
value | The record value, copied verbatim. |
ttl | Always Auto — any low TTL your provider offers is fine. |
status | Mirrors the domain status. A record isn't checked individually; a verified domain has verified records. |
priority | Present only on the MX record (10). Absent on the others. |
DKIM proves the mail is signed by you; the SPF MX and TXT records set up the custom Return-Path; DMARC states your alignment policy; the TrackingCNAME appears only when a tracking_subdomain is configured.
A domain that isn't yours answers 404
A domain belonging to another team answers 404, not 403 — an id that isn't yours is an id that doesn't exist, as far as your key is concerned.
json
{
"message": "No domain with the id 5f1c3a9e-0d42-4b7c-9a63-2e8b41d7c015.",
"code": "not_found",
"request_id": "8f2c1e64-1b17-4f8c-9f0e-3b6c1e0f5c31"
}A Sending access key is a different failure: a real key that isn't allowed here, so it answers 403. See Errors.