Auto-configure with Cloudflare
Let usend publish your domain's DNS records in Cloudflare.
If your domain's DNS is hosted on Cloudflare, usend can create the records for you. You provide a Cloudflare API token for a single request. usend uses it once and never stores it.
The dashboard detects Cloudflare from your domain's nameservers and offers Auto-configure on the domain's page.
1. Create a Cloudflare API token
- Open Cloudflare API tokens and choose Create Token.
- Use the Edit zone DNS template.
- Under Zone Resources, include only the zone of your domain.
- Create the token and copy it.
2. Run auto-configure
Paste the token in the Auto-configure dialog, or call the API:
curl -X POST https://api.usend.et/domains/d91cd9bd-1176-453e-8fc1-35364d380206/auto-configure \
-H "Authorization: Bearer us_123456789" \
-H "Content-Type: application/json" \
-d '{ "provider": "cloudflare", "api_token": "cf_token_value" }'usend finds the Cloudflare zone that contains your domain, publishes the records, then starts verification:
{
"object": "domain",
"id": "d91cd9bd-1176-453e-8fc1-35364d380206",
"provider": "cloudflare",
"zone": "acme.com",
"records": [
{ "name": "rs1._domainkey.acme.com", "type": "TXT", "value": "v=DKIM1; k=rsa; p=MIIB...", "action": "created" },
{ "name": "send-ses.acme.com", "type": "CNAME", "value": "rp-ses-us-east-1.usend.et", "action": "created" },
{ "name": "_dmarc.acme.com", "type": "TXT", "value": "v=DMARC1; p=none;", "action": "skipped", "message": "A DMARC policy already exists; it was kept." }
]
}Each record reports what happened:
action | Meaning |
|---|---|
created | The record was added. |
updated | A record of the same kind existed with a different value and was updated: a CNAME at the return-path name (or a proxied one), or a DKIM key at rs1._domainkey. |
unchanged | The record was already correct. |
skipped | Left alone on purpose, for example an existing DMARC policy. |
conflict | Other records use the same name, for example an existing MX for your domain. message explains what to change. usend does not touch them. |
What auto-configure never does
- It never deletes records.
- It never replaces your existing DMARC policy.
- It never replaces MX records that point elsewhere. If your domain already receives mail with another provider, you decide what to do.
- CNAMEs are created as DNS only, never proxied.
3. Delete the token
Once the records are in place, you can delete the token in Cloudflare. usend does not need it again.
Errors
| Status | Name | When |
|---|---|---|
| 422 | validation_error | The token is missing, Cloudflare refused it, or it cannot edit DNS for the domain's zone. |
| 422 | dns_provider_error | Cloudflare returned an unexpected error. Try again, or add the records by hand. |
Other DNS hosts are not supported for auto-configure. Add the records by hand, or import the Zone file from the domain's page.