API reference
Add a sending domain
Registers a new sending domain for the active tenant. Nudgel provisions a DMARC policy and returns the list of email providers the domain can be attached to. Required role: admin or owner.
POST/v1/admin/sending-domains
Authenticate with a session token and X-Tenant-Slug. Required role: admin or owner.
Request
curl
curl -X POST https://api-raven-cloud.autotribes.app/v1/admin/sending-domains \
-H "Authorization: Bearer $TOKEN" \
-H "X-Tenant-Slug: acme-co" \
-H "Content-Type: application/json" \
-d '{"domain":"mail.acme.co.ke","attachAll":false}'Body parameters
| Field | Type | Notes |
|---|---|---|
domain | string · required | The domain or subdomain to register. Must be a valid hostname, e.g. mail.acme.co.ke. Subdomains are strongly recommended. |
attachAll | boolean · optional | When true, Nudgel immediately attaches the new domain to every email-channel provider config on the tenant. Equivalent to calling POST .../attach with all provider IDs right after creation. Defaults to false. |
Response
201 Created
json
{
"id": "uuid",
"domain": "mail.example.co.ke",
"status": "active",
"dmarcRecord": "v=DMARC1; p=quarantine; rua=mailto:dmarc@nudgel.ai; pct=100; adkim=s; aspf=s",
"dmarcManaged": true,
"verifications": [],
"attachableProviders": [
{ "id": "provider-uuid", "provider": "postmark", "label": "Postmark prod" }
],
"createdAt": "2026-05-01T12:00:00Z"
}NEXT STEP — ATTACH TO PROVIDERS
Creating a domain does not automatically register it with any email provider. Call POST .../attach with one or more
providerConfigIds to get per-provider DNS records (DKIM, bounce CNAME) and start the verification flow. If you passed attachAll: true, that step is done for you.Errors
| Status | When |
|---|---|
400 | Domain field missing or not a valid hostname |
401 | Invalid or expired session token |
403 | Caller does not have admin or owner role |
409 | Domain already registered for this tenant |