POST /v1/mail/services/{mailServiceId}/deliverability
Publish this domain's mail records.
Authentication
Send an API key as a bearer token. The key must carry the mail.manage permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/mail/services/{mailServiceId}/deliverability \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
Write the correct SPF, DKIM and DMARC records into the domain's zone. ⛔ Refuses with `422` when the apex MX is somebody else's - that is not a state to confirm past from this screen, because the customer's mail is being delivered today and this button must never be how that stops. When records would be **replaced**, answers `409` until `confirm: true` is sent, so a destructive apply is always a deliberate second act (the confirm-gated shape #622 forced on DNS). Requires `mail.manage`.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
mailServiceId (path) | Uuid | Yes | Email service ID (UUIDv7). |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
confirm | boolean | No | Required when `needs_confirmation` is true. Defaults to false so a destructive apply is never a side effect of clicking "fix". |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
domain | string | Yes | — |
healthy | boolean | Yes | All three mechanisms present and ours - nothing to publish. |
spf_ok | boolean | Yes | — |
dkim_ok | boolean | Yes | — |
dmarc_ok | boolean | Yes | — |
fixable | boolean | Yes | Whether a one-click apply is offered. **False** over a foreign apex MX or an unreadable zone - the panel shows the reason instead of a button. |
needs_confirmation | boolean | Yes | True when applying would replace published records, so `confirm` is required. |
existing_apex_mx | string[] | Yes | — |
foreign_mx | string[] | Yes | Apex MX targets that are not ours - the reason a fix is refused. |
foreign_spf_includes | string[] | Yes | — |
would_delete | string[] | Yes | Records an apply would remove or replace, as `NAME TYPE VALUE`. Listed verbatim rather than counted: a customer must not be able to destroy mail records without seeing which one… |
zone_unreadable | boolean | Yes | — |
reason | string | Yes | Customer-grade English. Never a driver message. |
warnings | string[] | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 409 · 422 · 429