Sending Domains API (2026): Add, Verify, List, and Remove Domains over HTTP
How to manage Rovela sending domains programmatically: POST /domains and the DNS records in the response, POST /domains/:id/verify, GET list and detail, PATCH settings including tracking, and DELETE. A full_access key is required; sending_access is refused with 403.
A sending domains API is how you manage proof, not how you write DNS by hand
A sending domain is the domain that appears in from after you have proved you control it. Rovela will not accept mail from a domain you have not verified; an unverified or foreign from is refused with a 400 that names the domain (Quick Start). The dashboard can walk that setup. This article is the other path: the documented Domains API, used from a program with a full_access key.
That is a different job from the explainers already on the blog. What is domain email and how to set up a domain email address describe the idea of mail on your domain. Verified-domain email API is the product query “send from my domain via API,” and it is dashboard-first. Sending subdomain setup, DKIM setup, and email DNS configuration are about the records themselves. This guide stays on the HTTP surface: POST /domains, the DNS records in the add-domain response, POST /domains/:id/verify, GET /domains and GET /domains/:id, PATCH /domains/:id, and DELETE /domains/:id.
There is no official SDK. The base URL is https://api.rovela.dev. Domain management accepts a dashboard session or an API key created with full_access. A sending_access key is refused with a 403 that says so — it may send, and nothing else (Authentication). That 403 is not a 401. A 401 means the credential is missing, invalid, or the wrong kind; a 403 means the credential is valid but not permitted to manage domains.
If you came here looking for how to send, start at the Email API and POST /emails. Sending is what a sending_access key is for. This page is the provisioning API you call before that from address will be accepted.
What “verified” means on this API
The Domains API treats verification as two separate things: that the domain is yours, and that the DNS records which make your mail deliverable are published. A domain has to be verified before you can send from it. That is the same rule that makes domain email trustworthy: you prove control before you speak as the domain.
The domain verification guide and the domains manual are the place to read each record in depth, including the usual DNS pitfalls (relative names, quoted TXT values, records that have not propagated yet). This article will not redo those essays. It will show what the API returns, which endpoints change state, and which key you need.
Create the key in the dashboard. The full secret is shown once. Keep it on the server; never put a full_access key in a browser bundle, a mobile app, or a public repository. A leaked full-access key can manage domains, templates, and webhooks, not only send mail. If you send on behalf of several customers from one organization, a key can also be restricted to a single domain so a leak cannot send as somebody else (Email API for multi-tenant SaaS).
Add a domain and read the records from the response
POST /domains accepts an API key or a session. Adding a domain returns it along with the DNS records it needs. Those records are generated server-side — DKIM keys are created per domain — so read them from this response rather than copying values from another domain, from a blog post, or from a teammate’s dashboard.
The official Domains API page documents that response, not a sample request body. This article will not invent a JSON field name for the domain you add. In the dashboard you enter the domain you want to send from, for example yourdomain.com or a subdomain such as mail.yourdomain.com (domains manual). On the API, add the domain you control, then treat the records in the response as the source of truth.
Each record in the response has the same documented shape: record (a human name), name, type, value, a status, and — for some — purpose and required_for_verification. Publish exactly those name, type, and value values at your DNS provider. The shapes the docs illustrate are:
- SPF — a TXT record on the domain itself, authorising Rovela’s servers to send on your behalf. A domain may only have one SPF record. If you already publish one because you send through another provider too, merge the
include:into it rather than adding a second TXT record. Two SPF records is a permanent fail, not a preference for one of them. - DKIM — a TXT record at a selector-scoped name, holding the public half of the key that signs your mail. This is what lets a recipient prove a message was not altered, and it is what makes DMARC alignment possible. Rotating the key adds a second DKIM record marked
"record": "DKIM (add alongside the one above)"withrequired_for_verification: false. Publish it alongside the existing one, not instead of it — the old key keeps signing until the new record is confirmed, so replacing it early breaks signing for every message in flight. - DMARC — a TXT record at
_dmarc.yourdomain.com. The suggested starting value isv=DMARC1; p=none;.p=noneasks for reports without instructing anyone to quarantine your mail while you have no sending history. Move toquarantineand thenrejectonce the reports are clean. If you already publish a stricter policy, this record is not suggested at all — offeringp=noneto a domain already atp=rejectwould weaken the setup. - Return-path (MX and SPF) — only present when a custom return path is configured. These are on a subdomain, not the domain, so bounces come back to Rovela rather than to your inbox. SPF does not inherit from a parent domain, so the subdomain needs its own TXT record in addition to the MX. The MX is the one
verify_return_pathchecks, and it is markedrequired_for_verification: truefor that reason.
A common operational choice is to send from a subdomain such as mail.example.com, so transactional reputation stays separate from the root. That decision is covered in sending subdomain setup and the domains manual. You can add as many domains as your plan allows; each is verified independently, and the from address determines which domain’s DKIM key signs the message (Pricing lists current limits).
Verify, then keep verifying
POST /domains/:id/verify checks the published records and moves the domain to verified if they hold. It accepts an API key or a session — in practice, the same full_access key you used to add the domain, because a sending key cannot manage domains.
curl -X POST https://api.rovela.dev/domains/:id/verify \
-H "Authorization: Bearer re_your_full_access_key"
DNS propagation is not instant. A failure immediately after publishing usually means the records have not propagated yet rather than that they are wrong — re-check before changing anything. The domain verification guide shows how to ask DNS directly with dig, including querying a public resolver so you are not looking at a stale local cache. If you change records that were already correct, you turn a short wait into a long debugging session (first-email guide).
Verification is not a one-time gate. DKIM and DMARC records verified today can be removed or broken tomorrow, and mail will start landing in spam without anything on your side changing. The dashboard shows a warning when a verified domain drifts. The domain verification guide also notes that domain.updated fires when settings change, so a webhook subscriber can find out rather than noticing a drop in engagement weeks later. Verify webhook signatures with HMAC-SHA256 (webhook security); treat delivery data fields as additive.
Until the domain is verified, POST /emails will not accept it as from. After it is verified, send with the documented form "Acme <hello@yourdomain.com>" (From name). HTTP 200 on send still means accepted and queued, not delivered.
List, read, patch, and delete
These endpoints accept a dashboard session or a full_access key. A sending_access key is refused with 403.
# Every domain in the organization, with status.
curl https://api.rovela.dev/domains \
-H "Authorization: Bearer re_your_full_access_key"
# One domain, including its DNS records.
curl https://api.rovela.dev/domains/:id \
-H "Authorization: Bearer re_your_full_access_key"
GET /domains is how tooling lists status across the organization. GET /domains/:id is how you retrieve the current records after a rotate, a DNS migration, or a failed verify. Use these reads to drive your own dashboard or to confirm that the values you published still match what the API expects. Do not invent a /logs endpoint for this; domain state lives on these GETs and in the dashboard.
PATCH /domains/:id updates settings, including whether tracking is enabled for mail sent from this domain. The official API page documents that capability; it does not sample a PATCH request body, and this article will not invent the field name. Open and click tracking — what changes in the message when tracking is on — is covered in the existing email open and click tracking guide. Use PATCH when you want to change that setting from a program rather than from the dashboard.
# Remove the domain. Mail sent from it is refused afterwards.
# The DNS records are yours and are left alone.
curl -X DELETE https://api.rovela.dev/domains/:id \
-H "Authorization: Bearer re_your_full_access_key"
DELETE /domains/:id is the cleanup call. After it succeeds, a send from that domain is refused. The DNS records are not deleted for you — they belong to the domain owner, which matters when the domain is a customer’s. If you are deprovisioning a tenant, delete the sending domain in Rovela and let the customer remove or keep their DNS as they choose.
How this API sits next to sending
The two APIs are meant to be used with two different keys. Provision domains, templates, and webhooks with full_access (or a dashboard session). Send with sending_access. If a worker that only calls POST /emails is given a full-access key, a leak can do more than send mail. If a provisioning job is given a sending key, POST /domains and POST /domains/:id/verify will fail with 403.
Once a domain is verified, everyday transactional sends follow the rest of the Emails API: at least one of html, text, or template; both html and text where you can (HTML email API); an Idempotency-Key of up to 256 characters, remembered for 24 hours, on anything a retry might repeat; a 50-recipient cap across to, cc, and bcc; HTTP 200 meaning queued, not delivered. Confirm later with GET /emails/:id or GET /emails/:id/events (those reads also need full_access) or with a webhook. Mailbox SMTP (mx.rovela.dev:465, send-as-self, 30 messages a minute) is still not an app relay; programmatic volume belongs on the HTTP API (Email API vs SMTP).
Errors on the sending side use the documented {statusCode, name, message} envelope (Email API error handling). The case you will hit if you skip this API — or call verify too early — is a 400 that names an unverified or foreign from domain. On the Domains API itself, expect 403 when the key cannot manage domains, and 401 when the credential is missing or invalid. Surface the message as-is.
What not to do with the Domains API
Do not copy DKIM values from another domain or from a screenshot in a setup essay. The private key is generated per domain; the public half in DNS has to match it.
Do not add a second SPF TXT record “just for Rovela.” Merge the include:.
Do not replace an existing DKIM record the moment a rotation record appears. Publish the new one alongside the old one until the new record is confirmed.
Do not invent request-body field names, response fields, or a contacts-style CRUD around domains. Call the documented endpoints. The official page does not publish a sample POST or PATCH body; code that needs those exact fields should follow the live API and the dashboard, not a guessed schema in a blog post.
Do not use a sending_access key for this work, and do not confuse a 403 with a 401. Do not put the full-access key in a frontend or a git repository.
Do not treat a successful verify as permanent. Re-read GET /domains/:id or watch domain.updated when DNS is migrated. If a record is removed, the domain can drift back to pending and mail will be refused until the records are restored and re-verified (domains manual).
A compact sending-domains checklist
- Create a
full_accesskey (or use a dashboard session). Keepsending_accessforPOST /emailsonly. - Add the domain with
POST /domains. Read the DNS records from that response; do not copy them from elsewhere. - Publish SPF, DKIM, DMARC, and — when present — the return-path MX and TXT. Merge SPF if a record already exists.
- Call
POST /domains/:id/verify. If it fails immediately, wait for DNS and re-check before editing records. - Confirm status with
GET /domainsorGET /domains/:id. - Change tracking with
PATCH /domains/:idonly as the documented settings endpoint; see the tracking guide for behaviour. - When a domain should no longer send,
DELETE /domains/:id. Mail from it is then refused; DNS is left alone. - Subscribe to domain-related webhook events if you need to know about drift, and verify the HMAC-SHA256 signature.
Used this way, the Domains API is the provisioning counterpart to the transactional email API: one authenticated HTTP call to prove the domain, then ordinary POST /emails from the application you already run. For the first send after a domain is verified, the curl sending guide and send your first email are the shortest path.