Get the list of mailboxes

This request is used for getting a list of the domain's mailboxes.

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/email/list?
domain=<domain name>
[&page=<page number in the response>]
[&on_page=<number of mailboxes per response page>]

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

Headers:

Name Description
PddToken

PDD token.

Parameters:

Parameter Type Value
Mandatory
domain String

Name of the domain.

Optional
page Integer

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

on_page Integer

Number of mailboxes on each response page. The default value is 30.

Request example

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

Response structure

{
  "domain": "{domain name",
  "page": "{page number in the response}",
  "pages": "{total number of pages in the response}",
  "on_page": "{number of mailboxes per page in the response}",
  "total": "{total number of mailboxes on the domain}",
  "found": "{number of mailboxes on the current response page}",
  "accounts":
  [
    {
      "login": "{email address of a mailbox}",
      "uid": "{mailbox ID}",
      "enabled": "{mailbox status}",
      "fio": "{user's full name}",
      "fname": "{user's last name}",
      "iname": "{user's first name}",
      "birth_date": "{user's date of birth}",
      "sex": "{user's gender}",
      "hintq": "{secret question}",
      "ready": "{whether the mailbox is ready}",
      "aliases":
        [
          "{alias name}",
          ...
        ],
      "maillist": "{mailing list flag}"
    },
    ...
  ],
  "success": "{status of request execution}"
}
Name Type of value Description
domain String

Name of the domain.

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.

pages Integer

Total number of pages in the response.

on_page Integer

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

total Integer

Total number of mailboxes on the domain.

found Integer

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

accounts Array

Properties of mailboxes. Each object in the array corresponds to a single mailbox.

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 accounts array
login String

Email address of the mailbox.

uid Integer

Mailbox ID.

enabled String

Whether the mailbox is enabled.

Possible values:
  • yes — Mailbox is enabled.
  • no — Mailbox is blocked (for example, due to spam distribution or suspected hacking).
fio String

User's full name.

aliases Array

List of email aliases.

fname String

User's last name.

iname String

User's first name.

birth_date String

User's date of birth in the format YYYY-MM-DD.

sex Integer

User's gender.

Possible values:
  • 0 — Not specified.
  • 1 — Male.
  • 2 — Female.
hintq String

Secret question.

ready String

Mailbox readiness.

Possible values:
  • yes — The user agreement has been accepted, and the mailbox is ready for use.
  • no — The user agreement has not been accepted, and the mailbox is not ready for use.
maillist String

Whether this is a mailing list.

Possible values:
  • yes — The mailbox is a mailing list.
  • no — The mailbox is not a mailing list.