# Start automatic DNS setup

```http
POST https://trydimmi.com/api/v1/email-domains/{domain}/dns-setups
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `settings:write`.

## Path parameters

- `domain` (string, required): Id of the sending email domain, starting with edm_, such as edm_01jx2m8k4t. Find it with GET /email-domains.

## Response 201 (Created)

- `data` (object, required)
  - `apply_url` (string): The link to open at the DNS host to approve adding the records. Present only once someone asked for the setup.
  - `host_name` (string, required): The name of the DNS host that can add the records itself.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request POST \
  --url 'https://trydimmi.com/api/v1/email-domains/{domain}/dns-setups' \
  --header 'Authorization: Bearer <token>'
```

## Example response

```json
{
  "data": {
    "apply_url": "<string>",
    "host_name": "<string>",
    "object": "<string>"
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
