Skip to content

Get domains

Request

Get the list of domains. Can be filtered by state or authority. Sorting is optional. The list is paginated and limited to 1000 items per page.

Security
basicAuth
Query
limitinteger

Max count of items. Max: 1000. Default: 100

skipinteger

Get the list of items starting at the nth element. Default: 0

statestring

Get only domains with a specific state. Can be either active, unverified or disabled.

sortstring

Valid sort options are name which defaults to asc order, name:asc, or name:desc. If sorting is not specified domains are returned in reverse creation date order.

authoritystring

Get only domains with a specific authority. If state is specified then only state filtering will be proceed

searchstring

Search domains by the given partial or complete name. Does not support wildcards

include_subaccountsboolean

Search on every domain that belongs to any subaccounts under this account. Default to false.

curl -i -X GET \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v4/domains?limit=0&skip=0&state=string&sort=string&authority=string&search=string&include_subaccounts=true'

Responses

A 200 response

Bodyapplication/json
total_countinteger, (int32)required

Total number of domains

itemsArray of objects(github.com-mailgun-domains-client-golang-Domain)required

List of domains

Response
{ "total_count": 1, "items": [ {} ] }