List sending domains
const url = 'https://api.getsitecontrol.com/v1/sites/1/email-domains';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.getsitecontrol.com/v1/sites/1/email-domains \ --header 'Authorization: Bearer <token>'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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”One page of a list; next_cursor is null on the last page.
object
object
Domain the site’s emails are sent from, e.g. mail.example.com
True: the DNS records were found and emails go out from this domain; false: not verified yet
Where verification stands
DNS records the domain needs, to be published at its DNS provider; empty until verification has been started
object
What the record proves
Record type to create
Record name relative to the sending domain, as most DNS providers ask for it; @ is the domain itself
Full host name of the record
Exact value to publish
Why the last check failed, as the e-mail provider reported it; null when it did not fail or the reason is unknown. Verifying restarts the check and clears it until the provider fails again
What the user does next; see next_action_hint
One sentence on the next step, ready to show the user
When the domain was added
When the DNS records were last checked; null when never
Always null: every domain comes in one page
True: at least one of the domains is verified
What the user does next for the site: add_domain when it has no domain, otherwise the next action of the verified domain, or of the first one when none is verified
One sentence on the next step, ready to show the user
{ "items": [ { "state": "verified", "required_dns": [ { "purpose": "spf", "type": "TXT" } ], "verification_error": "record_missing", "next_action": "nothing" } ], "next_action": "nothing"}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
Authentication scheme: Bearer
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
site_not_found: no such site, it is deleted, or it belongs to another account
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
Seconds until the bucket refills
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds