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:

Name Description
PddToken

PDD token.

Name Description
PddToken

PDD token.

Parameters:

Parameter Type Value
Optional
page Integer

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

on_page Integer

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

Parameter Type Value
Optional
page Integer

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

on_page Integer

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}"
        }
Name Type of value Description
page Integer

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_page Integer

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

total Integer

Total number of the user's domains.

found Integer

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

domains Array

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.

success String

Status of request execution.

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

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
name String

Name of the domain.

status String

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.
stage String

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.
aliases Array

List of domain aliases.

logo_enabled Boolean

Whether the domain has a logo.

Possible values:
logo_url String

URL of the domain's logo.

nsdelegated String

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_admin Boolean

The user's status.

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

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-count Integer

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

emails-count Integer

The number of existing mailboxes.

nodkim Boolean

Indicates that DKIM is not enabled for the domain.

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

Possible value: true.

Name Type of value Description
page Integer

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_page Integer

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

total Integer

Total number of the user's domains.

found Integer

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

domains Array

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.

success String

Status of request execution.

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

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
name String

Name of the domain.

status String

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.
stage String

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.
aliases Array

List of domain aliases.

logo_enabled Boolean

Whether the domain has a logo.

Possible values:
logo_url String

URL of the domain's logo.

nsdelegated String

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_admin Boolean

The user's status.

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

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-count Integer

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

emails-count Integer

The number of existing mailboxes.

nodkim Boolean

Indicates that DKIM is not enabled for the domain.

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

Possible value: true.