---
title: "List sending domains"
method: GET
path: "/v1/sites/{site_id}/email-domains"
tags: ["Email domains"]
---

# List sending domains

`GET /v1/sites/{site_id}/email-domains`

## Request

- Base URL: `https://api.getsitecontrol.com`
- URL: `https://api.getsitecontrol.com/v1/sites/{site_id}/email-domains`
- Auth: HTTP bearer

The sending domains of the site, the domains its emails go out from: for each,
whether it is verified, where verification stands, the exact DNS records it
needs, when they were last checked and what the user does next. Call it for
questions about the sender: before the first broadcast from the user's own
domain, when the "from" address looks wrong, when emails land in spam, or when
verification seems stuck. An empty list is itself the answer: the site has no
domain of its own and emails go out from the default Getsitecontrol sender.

`next_action` and `next_action_hint` of the list say what to do for the site as
a whole; each domain carries its own. Domains are added in the Getsitecontrol
admin; `verify_email_domain` checks one now. The list describes the setup
only, nothing about individual emails, bounces or statistics. Every domain
comes in one response.

## Path parameters

- `site_id` integer, required

## Response `200`

Successful Response

- EmailDomainList: One page of a list; `next_cursor` is null on the last page.
  - `items` EmailDomain[], required
    - `id` integer, required
    - `domain` string, required: Domain the site's emails are sent from, e.g. mail.example.com
    - `is_verified` boolean, required: true: the DNS records were found and emails go out from this domain; false: not verified yet
    - `state` 'verified' | 'not_started' | 'pending' | 'recheck_required', required: Where verification of the domain stands. `verified`: the records were found and emails go out from the domain. `not_started`: the domain has no records to publish yet, verification was never started. `pending`: the records are known but not found yet, either not published or not seen yet, and are checked again automatically. `recheck_required`: automatic checks gave up, two weeks after the domain was added.
    - `required_dns` DnsRecord[], required: DNS records the domain needs, to be published at its DNS provider; empty until verification has been started
      - `purpose` 'spf' | 'dkim' | 'dmarc' | 'verification' | 'tracking', required: What the record proves. `spf`: lets our servers send for the domain. `dkim`: lets them sign its mail. `dmarc`: sets the domain's policy for mail that fails both. `verification`: proves the domain is yours. `tracking`: serves the click and open links from it.
      - `type` 'TXT' | 'CNAME', required: DNS record type to create: `TXT` a text record, `CNAME` an alias.
      - `name` string, required: Record name relative to the sending domain, as most DNS providers ask for it; `@` is the domain itself
      - `host` string, required: Full host name of the record
      - `value` string, required: Exact value to publish
    - `verification_error` 'record_missing' | 'record_wrong' | 'temporary': Why the e-mail provider last failed the domain's check; with `record_missing` or `record_wrong` the provider has stopped checking. `record_missing`: a required record was not found at the domain's DNS; fix the records, then verify the domain. `record_wrong`: a record was found with a different value; fix the records, then verify the domain. `temporary`: the check could not be completed and is tried again.
    - `next_action` 'nothing' | 'add_domain' | 'start_verification' | 'publish_dns' | 'request_recheck', required: What the user does next. `nothing`: the domain is verified. `add_domain`: the site has no sending domain yet. `start_verification`: the domain has no records yet, verifying it gives them. `publish_dns`: add the records of `required_dns` at the domain's DNS provider; they are checked automatically after verification starts, verify again only to check now. `request_recheck`: checks stopped (two weeks passed, or the provider found a record missing or wrong); check the records and verify again.
    - `next_action_hint` string, required: One sentence on the next step, ready to show the user
    - `created_at` string, date-time, required: When the domain was added
    - `last_checked_at` string, date-time, nullable: When the DNS records were last checked; null when never
  - `next_cursor` string, nullable: Always null: every domain comes in one page
  - `is_verified` boolean, required: true: at least one of the domains is verified
  - `next_action` 'nothing' | 'add_domain' | 'start_verification' | 'publish_dns' | 'request_recheck', required: What the user does next. `nothing`: the domain is verified. `add_domain`: the site has no sending domain yet. `start_verification`: the domain has no records yet, verifying it gives them. `publish_dns`: add the records of `required_dns` at the domain's DNS provider; they are checked automatically after verification starts, verify again only to check now. `request_recheck`: checks stopped (two weeks passed, or the provider found a record missing or wrong); check the records and verify again.
  - `next_action_hint` string, required: One sentence on the next step, ready to show the user

## Other responses

- `400`: Unsupported GSC-Version
- `401`: Missing or invalid API key or access token
- `403`: Access denied
- `404`: `site_not_found`: no such site, it is deleted, or it belongs to another account
- `422`: Validation failed
- `429`: Rate limited
- `503`: Temporarily unavailable; retry later

---

[API](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api.md) - [All operations](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/revisions/084fcad80e75?raw)
