List email domains
const url = 'https://api.connect.ms/v2/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.connect.ms/v2/email/domains \ --header 'Authorization: Bearer <token>'Your sending domains, newest first, without their DNS records. Paginated with cursor.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Page size, between 1 and 200. Defaults to 50.
The nextCursor value from the previous page.
Header Parameters
Section titled “Header Parameters”The API version to use, for example 2026-10-01. Defaults to the version set on your API key.
Responses
Section titled “Responses”A page of domains.
A page of results.
object
The items on this page.
A domain the workspace sends email from.
object
The unique id of the domain.
The domain name, e.g. mail.example.com.
The domain status: pending (waiting for its DNS records to verify), active (verified and usable as a sender) or failed (verification failed).
True for a domain set up on the previous email infrastructure. It stops sending on 30 November 2026 unless it is added again and verified.
When (UTC) the domain was verified, or null if it has not been.
The deadline (UTC) for verifying the domain, normally 14 days after it was added; it is removed if still unverified then. Null when there is no deadline.
When (UTC) the domain was added.
The DNS records to publish, with their verification state. Null in lists and for domains that need upgrading.
A DNS record to publish for a sending domain, with its verification state.
object
The record type: TXT, CNAME or MX.
The fully qualified host name to publish the record at.
The value to publish.
What a DNS record is for: return_path (bounce handling), dkim (message signing), dmarc (sender policy) or spf (authorised senders).
The verification state of a DNS record: pending (not yet verified), verified or failed.
True when the domain cannot be verified without this record.
Pass as cursor to fetch the next page. Null when there are no more results, except on the events feed, which always returns one.
Example
{ "data": [ { "status": "pending", "records": [ { "purpose": "return_path", "status": "pending" } ] } ]}The request is not valid. The detail field says why, and errors lists any problems by field name.
Why a request failed, in the RFC 9457 problem details format.
object
A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.
A short, fixed summary of the kind of problem.
The HTTP status code of the response.
What went wrong with this particular request, when there is more to say than the title.
For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).
object
The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": { "additionalProperty": [ "example" ] }, "requestId": "example"}The API key or bearer token is missing or not valid, or the request signature could not be verified.
Why a request failed, in the RFC 9457 problem details format.
object
A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.
A short, fixed summary of the kind of problem.
The HTTP status code of the response.
What went wrong with this particular request, when there is more to say than the title.
For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).
object
The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": { "additionalProperty": [ "example" ] }, "requestId": "example"}The caller is not allowed to do this.
Why a request failed, in the RFC 9457 problem details format.
object
A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.
A short, fixed summary of the kind of problem.
The HTTP status code of the response.
What went wrong with this particular request, when there is more to say than the title.
For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).
object
The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": { "additionalProperty": [ "example" ] }, "requestId": "example"}The service is temporarily unavailable. Retry after the Retry-After header.
Why a request failed, in the RFC 9457 problem details format.
object
A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.
A short, fixed summary of the kind of problem.
The HTTP status code of the response.
What went wrong with this particular request, when there is more to say than the title.
For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).
object
The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": { "additionalProperty": [ "example" ] }, "requestId": "example"}