Skip to Content
Pouch
Domains

Enable, disable or reconfigure inbound

PATCH
/v1/domains/{id}/inbound

Auth: Bearer key scoped to the domain.

webhook_url is required the first time inbound is enabled on a domain. Enabling adds the provider's own inbound DNS record to dns_records, on a subdomain (inbound. by default, or subdomain) so the domain's own mailbox is untouched. On SES, enabling also creates the receipt rule that routes the subdomain's mail; the provider needs an inbound bucket first.

Authorization

bearer
headerAuthorizationBearer <token>

An API key in the Authorization header.

Path Parameters

id*string

An opaque, type-prefixed id.

Request Body

application/json
  1. body
enabled*boolean

Whether this domain accepts mail.

webhook_url?|

Where inbound.received is delivered. Required to enable inbound; a fresh URL rotates the signing secret. null removes the endpoint, and can't be combined with enabled: true.

retention_days?integer

Days inbound mail is held before it's purged. 7 by default, up to the install's ceiling: 30 unless an admin changed it.

Range1 <= value <= 365
subdomain?string

The label mail is addressed to, as in reply@.. "inbound" by default. Changing it replaces the inbound DNS records.

Match^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$

Response Body

The domain's inbound status. webhook_secret is present only when a webhook URL was just (re)registered.

application/json
  1. response
domain_id?string

The domain this status is for.

enabled?boolean

Whether this domain accepts mail.

retention_days?integer

7 default, up to the install's ceiling: 30 unless an admin changed it.

subdomain?string

The label mail is addressed to. inbound by default.

host?string

The host mail is addressed to, .: reply@.

webhook_url?|

Where inbound.received is delivered. Null until one is registered.

receiver_url?|

Where this domain's provider should be told to POST inbound mail — a manual step in the provider's console for an adapter without an inbound API. Null when Pouch routes the provider's mail itself.

dns_records?array<>

Includes the provider's inbound record once enabled, alongside the domain's send records.

webhook_secret?string

Present only the moment a webhook URL is (re)registered — shown once, like any endpoint secret.

Example Request
curl -X PATCH 'https://pouch.example.com/v1/domains/string/inbound' \  -H 'Content-Type: application/json' \  -d '{  "enabled": true}'
Example Response
{  "domain_id": "string",  "enabled": true,  "retention_days": 0,  "subdomain": "string",  "host": "string",  "webhook_url": "string",  "receiver_url": "string",  "dns_records": [    {      "type": "TXT",      "name": "string",      "value": "string",      "priority": 0,      "merge": "spf"    }  ],  "webhook_secret": "string"}