PATCH/api/v1/projects/{project_id}/domains/{domain_id}
Needs scope: writeMCP tool: update_sending_domain
operationId update_sending_domain
Change a sending domain
Changes a domain’s ip_pool, tracking_host or dns_provider. A
changed ip_pool or tracking_host moves the domain back to pending
and the answer carries the new required_records; a changed
dns_provider does not. Needs scope write.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_idrequired |
path | string · uuid | The project’s id |
domain_idrequired |
path | string · uuid | The domain’s id |
Request body
application/json · required
- UpdateSendingDomainRequest object
-
Who applies the records:
porkbunormanual.- porkbun
- manual
-
ip_poolstringThe IP pool to send from (
GET /api/v1/serverlists them). Changing it moves the domain topending.example
default -
tracking_hoststring | nullA host for tracking and unsubscribe links;
nullclears it. Changing it moves the domain topending.example
links.example.com
Responses
200
The domain after the change
- UpdatedSendingDomain object · extends SendingDomain · all fields required
-
bounce_subdomainstringexample
bounce.news.example.com -
checksarray of DomainCheckOne entry per check that ran, in the canonical order; empty until the domain is first verified.
3 fields
- DomainCheck object · all fields required
-
detailstring | nullWhat was found instead of what was expected;
nullwhenok. -
namestringspf_bounce,mx_bounce,dkim,dmarc,tracking_cname,tracking_tlsorptr.example
dkim -
statusCheckStatusHow one verification check came out.
- ok
- missing
- mismatch
- warning
-
created_atstring · date-time -
dkim_public_keystringThe DKIM public key: base64 of its DER
SubjectPublicKeyInfo, thep=of the DKIM record (RSA 2048). -
dkim_selectorstringexample
pw1 -
dns_providerDnsProviderWho applies a domain’s DNS records.
- porkbun
- manual
-
domainstringIn punycode for an international name.
example
news.example.com -
idstring · uuidexample
01900000-0000-7000-8000-000000000001 -
ip_poolstringexample
default -
last_checked_atstring · date-time | nullWhen the records were last checked (RFC 3339);
nulluntil then. -
project_idstring · uuid -
required_recordsarray of RequiredRecord | nullThe records to create after an
ip_poolortracking_hostchange;nullwhen the change left the domain verified or failed.6 fields
- RequiredRecord object · all fields required
-
contentstringThe whole value; a TXT value over 255 characters is split into strings by the DNS provider, not here.
example
v=spf1 ip4:203.0.113.10 -all -
create_only_if_absentbooleanCreate it only if the name has no record of this type, and never change one that is there (the DMARC record).
-
namestringThe owner name, without a trailing dot.
example
bounce.news.example.com -
priorityinteger · int32 | nullThe MX priority;
nullfor other types.≥ 0 · example
10 -
purposeRecordPurposeWhat a required record is for.
- spf_bounce
- mx_bounce
- dkim
- dmarc
- tracking_cname
-
typeRecordTypeThe type of a DNS record.
- txt
- mx
- cname
-
statusDomainStatusWhere a sending domain stands.
- pending
- verified
- failed
-
tracking_hoststring | nullnull: none. -
updated_atstring · date-time
404
No such project or domain in it, or another project’s (not_found)
422
Invalid fields (validation_failed): an ip_pool the node does not declare is unknown_ip_pool, clearing ip_pool or dns_provider is invalid; or a new tracking_host needs web.public_url or the change’s records cannot be built (precondition_failed)
429
The key is over its rate limit, api.rate_limit_per_minute requests a minute on this node (rate_limited)
| Header | Type | Description |
|---|---|---|
Retry-After | integer | Seconds until the key’s next request passes; rounded up. |
504
Postwind’s storage did not answer within its time limit (storage_timeout). A change the request makes may still take effect: check before repeating it. A repeat with the same Idempotency-Key never runs it twice: it is 409 idempotency_key_in_progress until the key’s 24 h end