Skip to Content
Pouch
Domains

Add a domain

POST
/v1/domains

Auth: Bearer key with no domain scope.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Request Body

application/json
  1. body
name*string

The domain to send from, such as example.com.

Length3 <= length <= 253
provider_id?string

Provider this domain sends through. Defaults to the organization's assigned provider.

Length1 <= length

Response Body

The created domain, with the DNS records to publish.

application/json
  1. response
id?string

Opaque id, prefixed dom_.

name?string

The domain name.

status?string

Lifecycle status.

Value in"pending""verified""failed"
dns_records?array<>

The complete list to publish: DKIM for the domain, plus whatever else the provider needs and a recommended DMARC record at _dmarc. (required: false), carrying the domain's report address in rua once an admin has set up reports. A record marked merge joins one the name may already have.

missing_records?array<>

Records the provider still can't see. Filled by a verify call. Never lists the DMARC record; dmarc reports it.

setup?array<>

What the provider can't finish through its API. A step in the provider's console reads as waiting on an admin; a webhooks step on a provider that wires its own events clears with a verify call.

errors?array<string>

Provider reasons for a failed status. Empty once verification succeeds.

verified_at?|

ISO 8601 timestamp, or null.

last_checked_at?|

ISO 8601 timestamp of the last verify check, or null.

created_at?string

ISO 8601 timestamp.

provider_id?string

The provider this domain sends through now, prefixed pac_. A move changes it once the target verifies.

pending?|

A move to another provider in progress, started by PATCH. Null when there isn't one.

stall?|

Sending is held on this domain: sends are still accepted, queued ones wait until a person clears the hold. Null when sending normally.

bulk_allowed?boolean

Whether this domain may send bulk batches (POST /v1/batches). Off by default; set with PATCH.

layout?|

The frame a send with layout: true is wrapped in, and what a send's layout overrides fall back to. Null when there isn't one; set with PATCH.

standing?string

Reputation standing over the last 7 days. paused means sending from the domain is paused.

Value in"healthy""watch""at_risk""paused"
standing_reason?|

One sentence on why the domain isn't healthy. Null when it is.

Example Request
curl -X POST 'https://pouch.example.com/v1/domains' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response
{  "id": "string",  "name": "string",  "status": "pending",  "dns_records": [    {      "type": "TXT",      "name": "string",      "value": "string",      "priority": 0,      "merge": "spf"    }  ],  "missing_records": [    {      "type": "TXT",      "name": "string",      "value": "string",      "priority": 0,      "merge": "spf"    }  ],  "setup": [    {      "step": "domain",      "message": "string"    }  ],  "errors": [    "string"  ],  "verified_at": "string",  "last_checked_at": "string",  "created_at": "string",  "provider_id": "string",  "pending": {    "provider_id": "string",    "dns_records": [      {        "type": "TXT",        "name": "string",        "value": "string",        "priority": 0,        "merge": "spf"      }    ],    "missing_records": [      {        "type": "TXT",        "name": "string",        "value": "string",        "priority": 0,        "merge": "spf"      }    ],    "started_at": "string"  },  "stall": {    "reason": "string",    "message": "string",    "stalled_at": "string"  },  "bulk_allowed": true,  "layout": {    "name": "string",    "logo": "string",    "accent": "string",    "footer": "string"  },  "standing": "healthy",  "standing_reason": "string"}