Getting a list of user domains

This request is used for getting the list of a user's domains.

The response is paginated, and its parameters can be set in the request.

  1. Request syntax
  2. Request example
  3. Response structure

Request syntax

The request should be sent over the HTTPS protocol using the GET method.

GET /api2/admin/domain/domains?
[page=<page number in the response>]
[on_page=<number of domains per response page>]

Host: pddimp.yandex.ru
PddToken: <PDD token>

Headers:

NameDescription
PddToken

PDD token.

Parameters:

ParameterTypeValue
Optional
pageInteger

Page number in the response. The default value is 1.

on_pageInteger

Number of domains on each response page. Acceptable values are from 1 to 20. The default value is 10.

Request example

GET /api2/admin/domain/domains?page=2&on_page=5 HTTP/1.1
Host: pddimp.yandex.ru
PddToken: 123456789ABCDEF0000000000000000000000000000000000000
cURL
curl -H 'PddToken: 123456789ABCDEF0000000000000000000000000000000000000' 'https://pddimp.yandex.ru/api2/admin/domain/domains'

Response structure

{
  "page": "{page number in the response}",
  "on_page": "{number of domains per response page}",
  "total": "{total number of user domains}",
  "found": "{number of domains on the current response page}",
  "domains":
  [
    {
      "name":"{domain name}",
      "status": "{domain status}",
      "stage":"{service key}",
      "aliases":
        [
          "{alias name}",
          ...
        ],
      "logo_enabled": "{whether there is a logotype}",
      "logo_url": "{logotype URL}",
      "nsdelegated": "{domain delegation status}",
      "master_admin": "{user status}",
      "emails-max-count": "maximum possible number of mailboxes}",
      "emails-count": "{number of mailboxes}",
      "nodkim": "{DKIM is not enabled}"
    },
    ...
  ],
  "success": "{status of request execution}"
        }
NameType of valueDescription
pageInteger

Page number in the response. Value of the page parameter set in the request. If the parameter value is omitted, the default value is used.

on_pageInteger

Number of domains on each response page. Value of the on_page parameter set in the request.

totalInteger

Total number of the user's domains.

foundInteger

The number of domains on the current response page (may be less than the on_page value for the last page).

domainsArray

Properties of domains. Each object in the array corresponds to a single domain.

Included in the response if the user has at least one domain that has been verified or is pending verification.

successString

Status of request execution.

Possible values:
  • ok — Request executed successfully.
  • error — Request executed with error.
errorString

Error code.

Included in the response if the request resulted in an error.

Possible values:
  • unknown — A temporary failure or API error occurred (repeat the request again later).
  • no_token (no_domain, no_ip ) — A mandatory parameter was omitted.
  • bad_domain — The domain name was not specified or does not conform to the RFC.
  • prohibited — A forbidden domain name.
  • bad_token (bad_login, bad_passwd) — An invalid PDD token (or username/password) was passed.
  • no_auth — The PddToken header was omitted.
  • not_allowed — This operation is not allowed for this user (the user is not the domain administrator).
  • blocked — Blocked domain (for example, due to spam and so on).
  • occupied — The domain name is in use by another user.
  • domain_limit_reached — Exceeded the acceptable number of connected domains (50).
  • no_reply — Yandex.Mail for Domain cannot connect to the server source for the import.
Keys for objects in the domains array
nameString

Name of the domain.

statusString

Domain status.

Possible values:
  • domain-activate — The domain has been added to Mail for Domain, but has not been verified.
  • mx-activate — The domain has been verified, but the MX record is not set up (email does not work).
  • added — The domain has been verified and the MX record is set up.
stageString

The key duplicates status for internal use.

Possible values:
  • owner-check — The domain has been added to Mail for Domain, but has not been verified.
  • mx-check — The domain has been verified, but the MX record has not been set up.
  • added — The domain has been verified and the MX record is set up.
aliasesArray

List of .

logo_enabledBoolean

Whether the domain has a logo.

Possible values:
logo_urlString

URL of the domain's logo.

nsdelegatedString

Status of domain delegation to the Yandex servers (dns1.yandex.net and dns2.yandex.net).

Possible values:
  • yes — Delegated domain.
  • no — Non-delegated domain.
master_adminBoolean

The user's status.

Possible values:
  • true — The user is the domain administrator.
  • false — The user is not the domain administrator.
dkim-readyBoolean

Whether DKIM is enabled.

Possible values:
  • true — Outgoing messages are signed with a DKIM digital signature.
  • false — Outgoing messages are not signed with a DKIM signature (see the Enable DKIM request).
emails-max-countInteger

The maximum number of mailboxes that can be created for the domain.

emails-countInteger

The number of existing mailboxes.

nodkimBoolean

Indicates that is not enabled for the domain.

The key is included in the response for a verified domain.

Possible value: true.