Get domain settings

Use this request to get current domain properties: the status of connecting and delegating the domain to Yandex, the mailbox interface language and design, and the POP and IMAP modes.

  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/details?
domain=<domain name>

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

Headers:

NameDescription
PddToken

PDD token.

Parameters:

ParameterTypeValue
Mandatory
domainString

Name of the domain.

Request example

GET /api2/admin/domain/details?domain=domain.com HTTP/1.1
Host: pddimp.yandex.ru
PddToken: 123456789ABCDEF0000000000000000000000000000000000000
cURL
curl -H 'PddToken: 123456789ABCDEF0000000000000000000000000000000000000' 'https://pddimp.yandex.ru/api2/admin/domain/details?domain=domain.com'

Response structure

{
  "domain": "{domain name}",
  "status": "{domain status}",
  "stage": "{service key}",
  "delegated": "{status of delegating domain to Yandex}",
  "country": "{interface language}",
  "imap_enabled": "{status of IMAP operation}",
  "pop_enabled": "{status of POP operation}",
  "default_theme": "{design theme ID}",
  "success": "{status of request execution}"
        }
NameType of valueDescription
domainString

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.
  • none — The domain with the specified name does not exist.
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.
  • none — The domain with the specified name does not exist.
delegatedString

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

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

The default language of the mailbox interface for the domain.

Included in the response if the domain has been verified (the status value is set to mx-activate or added).

Possible values:
  • ru — Russian.
  • en — English.
  • ua — Ukrainian.
  • tr — Turkish.
  • by — Belarusian.
  • az — Azerbaijani.
  • ro — Romanian.
  • ge — Georgian.
  • kz — Kazakh.
pop_enabledInteger

Status of POP operation on the domain.

Included in the response if the domain has been verified (the status value is set to mx-activate or added).

Possible values:
  • 1 — POP is enabled.
  • 0 — POP is disabled.
Note. When the status changes, the new mode will only apply for newly created mailboxes.
imap_enabledInteger

Status of IMAP operation on the domain.

Included in the response if the domain has been verified (the status value is set to mx-activate or added).

Possible values:
  • 1 — IMAP is enabled.
  • 0 — IMAP is disabled.
Note. When the status changes, the new mode will only apply for newly created mailboxes.
default_themeString

ID of the default design theme for all the domain mailboxes (for example, starwars is the ID for the “Star Wars” theme).

Included in the response if the domain has been verified (the status value is set to mx-activate or added).

If the theme is not set, the value will be an empty string.

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.