# Get domains 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. Endpoint: GET /v4/domains Version: 3.0.0 Security: basicAuth ## Query parameters: - `limit` (integer) Max count of items. Max: 1000. Default: 100 - `skip` (integer) Get the list of items starting at the nth element. Default: 0 - `state` (string) Get only domains with a specific state. Can be either active, unverified or disabled. - `sort` (string) Valid sort options are which defaults to asc order, , or . If sorting is not specified domains are returned in reverse creation date order. - `authority` (string) Get only domains with a specific authority. If state is specified then only state filtering will be proceed - `search` (string) Search domains by the given partial or complete name. Does not support wildcards - `include_subaccounts` (boolean) Search on every domain that belongs to any subaccounts under this account. Default to false. ## Response 200 fields (application/json): - `total_count` (integer, required) Total number of domains - `items` (array, required) List of domains - `items.archive_to` (string) URL that a copy of each successfully delivered message is going to be posted to. - `items.created_at` (string, required) Timestamp indicating when the domain was created in RFC1123 format - `items.id` (string, required) Unique identifier of the domain - `items.is_disabled` (boolean, required) Indicates whether the domain is currently disabled - `items.name` (string, required) Fully qualified domain name registered with Mailgun - `items.require_tls` (boolean, required) If true Mailgun will only send messages over a TLS connection - `items.skip_verification` (boolean, required) If true Mailgun will not verify the certificate and hostname when setting up a TLS connection - `items.smtp_login` (string, required) SMTP login username for the domain - `items.smtp_password` (string) Optional SMTP password for the domain used for SMTP authentication - `items.spam_action` (string, required) Action to take when a message is flagged as spam. Options are disabled - `items.subaccount_id` (string) The subaccount ID the domain belongs to. This field is only present if the domain is associated with a subaccount - `items.state` (string, required) Current verification status of the domain - `items.type` (string, required) Classification of the domain. Possible values are custom or sandbox - `items.tracking_host` (string) Custom tracking host for the domain used for tracking opens and clicks if configured - `items.use_automatic_sender_security` (boolean, required) If true Mailgun manages DKIM key generation and DNS record configuration automatically - `items.web_prefix` (string, required) Subdomain prefix used for open and click tracking - `items.web_scheme` (string, required) Protocol scheme used for tracking - `items.wildcard` (boolean, required) Indicates if the domain is a wildcard domain and can receive emails for any subdomain - `items.disabled` (any) Optional field containing additional details about the domain's disabled status if applicable - `items.encrypt_incoming_message` (boolean, required) If true incoming messages to this domain will be encrypted - `items.message_ttl` (integer, required) Specifies the time-to-live (TTL) in seconds for retrieving both incoming and outgoing messages. The maximum TTL value is determined by your subscription plan ## Response 401 fields (application/json): - `message` (string, required) Response message