Add a sending domain
POST/v1/domains
Registers a domain, generates its DKIM key, and returns the DNS records to publish — ready to paste, with the exact values and an explanation of what each one does.
Sending from the domain is refused until it verifies. That is not bureaucracy: mail from an unverified domain damages the sending reputation every customer on the platform shares.
Body
| Field | Type | Description |
|---|---|---|
| domainrequired | string | A domain, not an email address. |
Example
curl -X POST https://api.woyra.io/v1/domains \
-H "Authorization: Bearer $WOYRA_KEY" \
-H 'Content-Type: application/json' \
-d '{
"domain": "example.com"
}'Response
201 The domain and the DNS it needs.
| Field | Type | Description |
|---|---|---|
| object | "domain" | |
| id | string | |
| domain | string | |
| status | string | One of pending, verified, failed. |
| verified_at | timestamp | |
| receiving | boolean | True once the domain is verified and its MX record points at
Woyra: every address on it then receives, and each message is
stored under /v1/emails/inbound and sent as email.received. |
| receiving_verified_at | timestamp | |
| created_at | timestamp | |
| records | array of DNSRecord |
Errors
| Status | Codes |
|---|---|
| 400 | invalid_request, unsupported_version |
| 401 | authentication_required, invalid_api_key |
| 403 | insufficient_scope, domain_not_verified, recipient_suppressed, sending_paused, mfa_required |
Also in Domains
- GET /v1/domains — List sending domains
- POST /v1/domains/{id}/verify — Verify a domain's DNS
- DELETE /v1/domains/{id} — Remove a sending domain