List of spam complaints

Get the number and list of user email addresses that marked messages from the mailing as spam. The list is formed for the specified mail domain or address, ID, or mailing date.

Request syntax

https://postoffice.yandex.ru/api/1.0/stat-bad
 ? oauth_token=<access token>
 & (domain=<domain> | email=<address>)
 & [id=<mailing ID>]
 & [listid=<List-ID>]
 & [year=<year>]
 & [month=<month>]
 & [day=<day>]
 & [get=<number of recipients>]
oauth_token *

OAuth access token. For more information about getting a token, see the section Application authorization using an OAuth token.

domain *

The mail domain that is the source for mailings.

email *

The email address that is the source for mailings.

id

ID number of the mailing. The value of the id field in the response for the stat-list method is used as the ID.

If the id parameter is specified, only the mailing with the specified ID is used in the selection.

listid

Mailing ID; the value of the List-ID header.

year

Year of the mailing. The value is a four-digit number.

If the year parameter is specified, only mailings from the specified year are used in the selection.

month

Month of the mailing. Acceptable values: 1-12.

If the month parameter is specified, only mailings from the specified month are used in the selection.

day

Day of the mailing. Acceptable values: 1-31.

If the day parameter is specified, only mailings from the specified day are used in the selection.

get

The number of recipients. Acceptable value: count.

If the get parameter is specified, output shows the number of user email addresses that marked messages from the mailing as spam.

oauth_token *

OAuth access token. For more information about getting a token, see the section Application authorization using an OAuth token.

domain *

The mail domain that is the source for mailings.

email *

The email address that is the source for mailings.

id

ID number of the mailing. The value of the id field in the response for the stat-list method is used as the ID.

If the id parameter is specified, only the mailing with the specified ID is used in the selection.

listid

Mailing ID; the value of the List-ID header.

year

Year of the mailing. The value is a four-digit number.

If the year parameter is specified, only mailings from the specified year are used in the selection.

month

Month of the mailing. Acceptable values: 1-12.

If the month parameter is specified, only mailings from the specified month are used in the selection.

day

Day of the mailing. Acceptable values: 1-31.

If the day parameter is specified, only mailings from the specified day are used in the selection.

get

The number of recipients. Acceptable value: count.

If the get parameter is specified, output shows the number of user email addresses that marked messages from the mailing as spam.

*  Required

Attention. In a single request, grouping can be formed by only the mailing ID (parameters: id and listid) or only by date (parameters: year, month, and day).

Response format

Can return two types of responses:

  • If the get parameter is omitted in the query, it returns the list of user email addresses that marked messages from the mailing as spam.

    {
      "session": "WbB5JTsn", 
      "rcpts": 
      [
        "possstmaster@yandex.ru", 
        "possstmaster@ya.ru"
      ]
    }
  • If the get parameter is specified in the query, it returns the number of user email addresses that marked messages from the mailing as spam.

    {
      "session": "WbB5JTsn", 
      "count": 2 
    }
session

ID of the session in which the API request was processed. Include this ID when contacting the Yandex support service about bugs or errors you encounter with the Post Office API.

rcpts

A list of email addresses of users who marked messages from the mailing as spam.

count

The number of email addresses of users who marked messages from the mailing as spam.