This walk-through takes you from a new account to a delivered email. Allow 15 to 30 minutes, most of it waiting for DNS.
Step 1: add your domain
- Sign in at https://app.mailcandor.com/app/login.
- Open Domains and choose New domain.
- Type the domain your emails will come from, for example
acme.comormail.acme.com. Leave the region on US East (N. Virginia). - Save. You land on the domain page with a DNS records table.
Step 2: publish the DNS records
The table lists five records. Copy each Name and Value into your DNS provider exactly as shown:
| Purpose | Type | Name | Required |
|---|---|---|---|
| DKIM (3 records) | CNAME | xxxx._domainkey.acme.com |
Yes |
| SPF | TXT | send.acme.com |
Yes |
| Return path | MX, priority 10 | send.acme.com |
Yes |
| DMARC | TXT | _dmarc.acme.com |
Recommended |
Provider guides: Cloudflare, GoDaddy, Route 53, Namecheap.
Step 3: verify the domain
Back on the domain page, press Check DNS now. When every required record is found you see Verified. You can send from this domain. If you see “2 of 5 required records found”, wait a few minutes and press it again.
Step 4: create an API key
- Open API keys and choose Create API key.
- Name it, for example
Local testing, and pick Sending only. - Choose Create key, then copy the key. It starts with
mc_live_and is shown once.
Store it in an environment variable:
export MAILCANDOR_KEY="mc_live_your_key_here"
Step 5: send
curl https://api.mailcandor.com/v1/emails \
-H "Authorization: Bearer $MAILCANDOR_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <hello@acme.com>",
"to": "you@example.com",
"subject": "Hello from Mailcandor",
"html": "<p>It works.</p>"
}'
The answer is 202 Accepted:
{ "id": "3f1c0e2a-6a7b-4c51-9d0e-8f1a2b3c4d5e", "status": "queued" }
Step 6: check what happened
Open Emails in the dashboard and select the email. What happened lists each event, such as sent and delivered, with a sentence explaining it. With a full-access key you can also call:
curl https://api.mailcandor.com/v1/emails/3f1c0e2a-6a7b-4c51-9d0e-8f1a2b3c4d5e \
-H "Authorization: Bearer $MAILCANDOR_KEY"
If it does not work
| You see | Fix |
|---|---|
401 missing_api_key or invalid_api_key |
Check the header is Authorization: Bearer mc_live_... and the key was not revoked. |
403 domain_not_found |
The from domain is not added on your team. Add it under Domains. |
403 domain_not_verified |
Publish the records and press Check DNS now. See Domain not verifying. |
422 missing_required_field |
from, to and subject are required, plus html or text. field names the one missing. |
429 daily_quota_exceeded |
Starter sends 100 emails a day (UTC). Wait, or change plan under Billing. |
| Delivered but in spam | Add the DMARC record and see the Deliverability page. |
All error types are listed in Error codes reference. The full API reference is at docs.mailcandor.com.