# Domains API

Add a sending domain and poll its DNS verification.

**All-access key.** These endpoints act on your account rather than inside one project, so a project-scoped key can't reach them. See [Authentication](https://emailbump.com/docs/api-keys).

## Endpoints

- `POST /v1/projects/{project_id}/domains`
- `GET /v1/projects/{project_id}/domains/{domain_id}`

Add the domain a project sends from and publish the DNS records that come back. Until one is verified, sends use the shared testing domain — see [Sending domains](https://emailbump.com/docs/domains) for why that matters.

## Add a domain

**Body parameters**

- `domain` — *string*, required — The domain to send from, e.g. `mail.acme.com`.

```bash
curl -X POST https://emailbump.com/api/v1/projects/7a10…/domains \
  -H "Authorization: Bearer ebk_all_access_key" \
  -H "Content-Type: application/json" \
  -d '{ "domain": "mail.acme.com" }'
```

The response carries the DKIM and mail-from records to publish at your DNS provider, exactly as they should be entered.

## Check verification

Poll the domain until it reports verified. DNS usually propagates in minutes, though some providers take up to 48 hours.

```bash
curl https://emailbump.com/api/v1/projects/7a10…/domains/DOMAIN_ID \
  -H "Authorization: Bearer ebk_all_access_key"
```
