--- type: API title: Sending domains API (partner integrations) description: Create, verify and manage sending domains for apps that send as their customers' domains — one account, many domains, one key with the send_any_domain scope. resource: https://euromailing.com/api/v1/sending_domains tags: [sending-domains, partner, dkim, spf, dmarc, api] timestamp: 2026-08-08T00:00:00Z --- # Sending domains API For **partner integrations** — one Euromailing account that sends on behalf of many customer domains (e.g. a SaaS mailing as each customer's own domain). One account, many `SendingDomain`s, **one API key** with the `transactional:send_any_domain` scope (validates the From against every verified domain on the account) plus `sending_domains:read|write`. **Euromailing is the source of truth for verification.** Show the DNS records to your customer, then poll status or trigger a check — never verify the customer's DNS yourself. ## Create a domain ``` POST /api/v1/sending_domains { "domain": "coachklant.nl" } ``` `201` with ready-made DNS records the customer adds at their registrar: ```json { "id": "…", "domain": "coachklant.nl", "status": "pending", "verified": false, "dns_records": [ { "purpose": "dkim", "type": "CNAME", "host": "euromailing._domainkey.coachklant.nl", "value": "coachklant-nl._dkim.euromailing.com" }, { "purpose": "spf", "type": "TXT", "host": "coachklant.nl", "value": "v=spf1 include:spf.euromailing.com ~all", "include_token": "include:spf.euromailing.com", "note": "Add only the include mechanism to an existing v=spf1 record; never create a second SPF record." }, { "purpose": "dmarc", "type": "TXT", "host": "_dmarc.coachklant.nl", "value": "v=DMARC1; p=none; rua=mailto:dmarc@euromailing.com", "note": "Only add if no _dmarc record exists; do not overwrite an existing DMARC record." } ] } ``` Notes: - **DKIM is a single CNAME.** Euromailing publishes its side automatically, so the customer adds exactly one record. - **SPF: use `include_token`, not `value`.** Read the customer's live `v=spf1` record and merge the token in — there must be exactly one SPF record. - **DMARC: don't overwrite.** Only add when none exists. ## Check / verify status ``` GET /api/v1/sending_domains/coachklant.nl # poll POST /api/v1/sending_domains/coachklant.nl/verify # fresh DNS check ``` ```json { "domain": "coachklant.nl", "verified": false, "dkim_published_at": "…", "dns_verified_at": null, "records": [ { "purpose": "dkim", "ok": true }, { "purpose": "spf", "ok": false }, { "purpose": "dmarc", "ok": false } ] } ``` Minimum you need is `verified`; the per-record `ok` is for a nicer UI. ## List / delete ``` GET /api/v1/sending_domains # all domains on the account DELETE /api/v1/sending_domains/coachklant.nl # 204, when a customer leaves ``` ## Sending once verified With a partner key, `POST /api/v1/transactional_emails` accepts a `from` on **any verified domain** on the account — no per-domain key needed. See [the transactional API](transactional-emails.md) (partner mode). A From domain that isn't on the account returns `from_domain_not_on_account`; one that exists but isn't verified returns `sending_domain_unverified`. ## Rails The `euromailing-rails` gem (≥ 0.2.0) wraps all of this: `client.create_sending_domain`, `sending_domain`, `verify_sending_domain`, `delete_sending_domain`, `sending_domains`. See [the Rails guide](../guides/rails-gem.md).