> ## Documentation Index
> Fetch the complete documentation index at: https://docs.robase.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Domains

> Verify your sending domain so ISPs trust your mail.

Before you can send from `bookings@shuttlers.ng`, the domain must be verified — DKIM to prove authenticity, SPF to authorize our servers, and ideally DMARC + BIMI to max out deliverability.

## Add a domain

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.robase.dev/v1/domains \
    -H "Authorization: Bearer rb_live_xxx" \
    -H "Content-Type: application/json" \
    -d '{"name": "mail.shuttlers.ng", "region": "eu-central-1"}'
  ```

  ```typescript Node.js theme={null}
  const result = await pm.domains.create({ name: 'mail.shuttlers.ng' });
  ```
</CodeGroup>

Response includes the DNS records you need to publish:

```json theme={null}
{
  "id": "dom_01H8XK...",
  "name": "mail.shuttlers.ng",
  "status": "pending",
  "records": [
    { "record_type": "TXT",   "name": "mail.shuttlers.ng",      "value": "v=spf1 include:amazonses.com ~all" },
    { "record_type": "CNAME", "name": "s1._domainkey.mail...",  "value": "s1.dkim.amazonses.com" },
    { "record_type": "CNAME", "name": "s2._domainkey.mail...",  "value": "s2.dkim.amazonses.com" },
    { "record_type": "CNAME", "name": "s3._domainkey.mail...",  "value": "s3.dkim.amazonses.com" },
    { "record_type": "TXT",   "name": "_dmarc.mail.shuttlers.ng", "value": "v=DMARC1; p=quarantine; rua=mailto:dmarc@shuttlers.ng" }
  ]
}
```

## Publish DNS

Add each record at your DNS host. Propagation is usually under 15 minutes but can take up to an hour.

## Verify

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.robase.dev/v1/domains/dom_01H8XK.../verify \
    -H "Authorization: Bearer rb_live_xxx"
  ```

  ```typescript Node.js theme={null}
  await pm.domains.verify('dom_01H8XK...');
  ```
</CodeGroup>

The dashboard runs this automatically every 2 minutes for pending domains — you usually don't need to call it manually.

## Why bother with DMARC + BIMI

<AccordionGroup>
  <Accordion title="DMARC: deliverability + monitoring">
    Publish `_dmarc.<domain>` and set `p=quarantine` (or `p=reject` once you're confident). ISPs (Gmail, Outlook, ProtonMail) increasingly score undmarc'd mail lower. You'll also get DMARC aggregate reports showing who's spoofing your domain.
  </Accordion>

  <Accordion title="BIMI: your logo in the inbox">
    Add a BIMI TXT record pointing to an SVG logo and — if you have a VMC — your logo shows next to every email in Gmail / Yahoo / Apple Mail. Configurable via `PATCH /v1/domains/:id/bimi`.

    ```bash theme={null}
    curl -X PATCH https://api.robase.dev/v1/domains/dom_01H8.../bimi \
      -H "Authorization: Bearer rb_live_xxx" \
      -d '{
        "logo_url": "https://shuttlers.ng/brand/logo.svg",
        "authority_url": "https://shuttlers.ng/brand/vmc.pem"
      }'
    ```
  </Accordion>

  <Accordion title="Why a subdomain (mail.yourbrand.com) is better than the apex">
    Isolates sending reputation from your marketing domain. If a batch hits a bad list and tanks reputation, only `mail.` is affected — your main site and Google Workspace keep working.
  </Accordion>
</AccordionGroup>

## Common failures

| Status     | What it means                       | Fix                                                         |
| ---------- | ----------------------------------- | ----------------------------------------------------------- |
| `pending`  | DNS not yet visible to our resolver | Wait up to 1h, then re-verify                               |
| `failed`   | DNS records missing or wrong        | Re-check the records table in the dashboard, fix, re-verify |
| `verified` | You're good — sends allowed         | —                                                           |

## Troubleshooting

<Accordion title="I published the records but verification still fails">
  Run `dig TXT mail.shuttlers.ng` from a terminal and compare against the expected `value`. Common issues:

  * Extra spaces or missing quotes.
  * A provider (Cloudflare, Route53) auto-appended the apex domain to CNAME values, so the record becomes `s1._domainkey.mail.shuttlers.ng.mail.shuttlers.ng`.
  * TTL too high — doesn't affect verification, but delays propagation.
</Accordion>

<Accordion title="My mail lands in spam">
  Check:

  * **DKIM** signing (our verify endpoint will say if it's wrong).
  * **SPF** includes `amazonses.com`.
  * **DMARC** published and not `p=none`.
  * **Content**: spammy keywords, low text-to-HTML ratio, no plaintext version.
  * **List hygiene**: are you sending to addresses that have previously bounced? Clean those via [Suppressions](/email/suppressions).
</Accordion>
