GET Get domains
GET /messaging/v1/domainverification
Operation ID: getDomains.
Retrieves a list of email addresses and domains that can be used to send email from a Marketing Cloud Engagement account. This operation returns both verified and unverified addresses and domains. You can sort and filter the list.
Required permission scope: Email | Read
Parameters
Authorization(header, string, required) A unique, time-limited token that allows you to issue requests to the API. ReplaceYOUR_ACCESS_TOKENwith your API authentication token.Example
Bearer YOUR_ACCESS_TOKEN$page(query, string) The page of results to retrieve. Each page includes the number of records specified by the$pagesizeparameter. You can retrieve additional pages by incrementing this number in subsequent calls.$pageSize(query, number) The number of records to return on each page of results. The default value is 25.$orderBy(query, string) The field and sort method to use to sort the results. You can sort on these fields:domain,status,issendable,domaintype, andmodifieddate. You can sort these fields in ascending (ASC) or descending (DESC) order. The default value is 'domainType ASC'.$filter(query, string) A filter to apply to the results. You can filter on the values of thestatus,issendable, anddomaintypefields. Filters use the formatFIELD_NAME in (VALUE1, VALUE2).
Responses
- 200
Indicates that the API accepted the request to list the domains for the current account.
Media type:
application/json. Schema:domainGetResponseBody.Example
{ "page": 1, "pageSize": 50, "count": 2, "items": [ { "enterpriseId": 314159, "domain": "noreply.salesforce.com", "status": "Verified", "domainType": "SAP", "isSendable": true, "memberId": 314159, "emailSendTime": "2023-08-05T11:39:29.61" }, { "enterpriseId": 314159, "domain": "test@example.org", "status": "Pending", "domainType": "UserDomain", "isSendable": true, "memberId": 314159, "emailSendTime": "2023-10-09T17:58:54.183" } ] } - 400
Indicates that the request contained information that the API couldn't process. When you receive a 400 response, verify that the request uses the correct syntax.
Media type:
application/json. Schema:mceErrorResponseBody.Example
{ "message": "JSON Deserialization Exception: Location Unknown", "errorcode": 10004, "documentation": "" } - 401
Indicates that the API wasn't able to authorize your request. When you receive a 401 response, verify that you obtained an authorization token and that the token is still valid.
Media type:
application/json. Schema:httpErrorResponseBody.Example
{ "documentation": "https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm", "errorcode": 0, "message": "Not Authorized" } - 403
This response indicates that the API accepted your request but couldn't authorize it. When you receive a 403 response, make sure you have the necessary permission scope for the operation. You can modify permission scopes on the Installed Apps page in Marketing Cloud Engagement Setup.
Media type:
application/json. Schema:mceErrorResponseBody.Example
{ "documentation": "", "errorcode": 20002, "message": "Insufficient privileges to complete this action." } - 500
Indicates that the API encountered an error when processing the request. When you receive a 500 response, verify that the request uses the correct syntax.
Media type:
application/json. Schema:httpErrorResponseBody.Example
{ "documentation": "https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm", "errorcode": 0, "message": "Internal Server Error" }