Get information about DKIM

DKIM (DomainKeys Identified Mail) is a way to sign email messages so that the sender's domain can be identified.

This request is used for getting:
  • information about why outgoing messages are not signed (for example, the DNS settings do not have a record with the public DKIM key).
  • a public DKIM key, in order to manually add it to DNS settings.
  • a private DKIM key, in order to configure the message signature on your own mail server.
  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/dkim/status?
domain=<domain name>
&secretkey=<get secret key>

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

Headers:

Name Description
PddToken

PDD token.

Name Description
PddToken

PDD token.

Parameters:

Parameter Type Value
Mandatory
domain String

Name of the domain.

Optional
secretkey String

This parameter is used for requesting a private DKIM key. Only the yes value is acceptable.

Parameter Type Value
Mandatory
domain String

Name of the domain.

Optional
secretkey String

This parameter is used for requesting a private DKIM key. Only the yes value is acceptable.

Request example

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

Response structure

{
  "domain": "{domain name}",
  "dkim": 
  {    
    "enabled": "{whether DKIM is enabled}", 
    "txtrecord": "{TXT record}",
    "nsready": "{whether there is a TXT record}",
    "mailready": "{Yandex.Mail for Domain readiness to sign messages}",
    "secretkey": "{private DKIM key}"
  },
  "success": "{status of request execution}"
}
Name Type of value Description
domain String

Name of the domain.

dkim Object

Information about enabling DKIM, and the public and private DKIM keys.

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 the dkim object
enabled String

Status of enabling DKIM for the domain.

Possible values:
  • yes — DKIM signature is enabled.
  • no — DKIM signature was disabled using the Disable DKIM request.
txtrecord String

A TXT record with a public DKIM key for independently making settings. The record consists of three parts:

  • The record name (mail_domainkey).
  • DKIM parameters:

    v=DKIM1;
    k=rsa;
    t=s;
    p=MIGfMA0GCSEBtaCOteH4EBqJlKperJ+5BPEGS7N3fFkdeKllShrM73nm4xPdZmt2jNnmgWMeQySGYW5VUJ8PCePanwIXcW8YnqS7zw+grL/PHhUtf3ofSLmtVM3rSWmJ9qHFhxWmPFplPe5OsvpO+fphiMOrTnzzV/004S/jQIDAQAB

    The p parameter contains the open DKIM key.

  • The domain designation (DKIM key mail for example.com).

Example of a TXT record:

mail._domainkey IN TXT "v=DKIM1; k=rsa; t=s; p=MIGfMA0GCSEBtaCOteH4EBqJlKperJ+5BPEGS7N3fFkdeKllShrM73nm4xPdZmt2jNnmgWMeQySGYW5VUJ8PCePanwIXcW8YnqS7zw+grL/PHhUtf3ofSLmtVM3rSWmJ9qHFhxWmPFplPe5OsvpO+fphiMOrTnzzV/004S/jQIDAQAB" ; DKIM key mail for example.com
nsready String

Whether there is a TXT record.

Possible values:
  • yes — TXT record is installed.
  • no — There is no TXT record.
mailready String

Whether Yandex.Mail for Domain is ready to sign email using DKIM.

Possible values:
  • yes — Yandex.Mail for Domain is ready.
  • no — Yandex.Mail for Domain is not ready.

Yandex.Mail for Domain checks DKIM data with some delay. So if a user added a TXT record, the mailready value might be no. Check the readiness later.

secretkey String

Private DKIM key.

Name Type of value Description
domain String

Name of the domain.

dkim Object

Information about enabling DKIM, and the public and private DKIM keys.

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 the dkim object
enabled String

Status of enabling DKIM for the domain.

Possible values:
  • yes — DKIM signature is enabled.
  • no — DKIM signature was disabled using the Disable DKIM request.
txtrecord String

A TXT record with a public DKIM key for independently making settings. The record consists of three parts:

  • The record name (mail_domainkey).
  • DKIM parameters:

    v=DKIM1;
    k=rsa;
    t=s;
    p=MIGfMA0GCSEBtaCOteH4EBqJlKperJ+5BPEGS7N3fFkdeKllShrM73nm4xPdZmt2jNnmgWMeQySGYW5VUJ8PCePanwIXcW8YnqS7zw+grL/PHhUtf3ofSLmtVM3rSWmJ9qHFhxWmPFplPe5OsvpO+fphiMOrTnzzV/004S/jQIDAQAB

    The p parameter contains the open DKIM key.

  • The domain designation (DKIM key mail for example.com).

Example of a TXT record:

mail._domainkey IN TXT "v=DKIM1; k=rsa; t=s; p=MIGfMA0GCSEBtaCOteH4EBqJlKperJ+5BPEGS7N3fFkdeKllShrM73nm4xPdZmt2jNnmgWMeQySGYW5VUJ8PCePanwIXcW8YnqS7zw+grL/PHhUtf3ofSLmtVM3rSWmJ9qHFhxWmPFplPe5OsvpO+fphiMOrTnzzV/004S/jQIDAQAB" ; DKIM key mail for example.com
nsready String

Whether there is a TXT record.

Possible values:
  • yes — TXT record is installed.
  • no — There is no TXT record.
mailready String

Whether Yandex.Mail for Domain is ready to sign email using DKIM.

Possible values:
  • yes — Yandex.Mail for Domain is ready.
  • no — Yandex.Mail for Domain is not ready.

Yandex.Mail for Domain checks DKIM data with some delay. So if a user added a TXT record, the mailready value might be no. Check the readiness later.

secretkey String

Private DKIM key.