API call example:
JSON
{
"function":"mailkit.report.raw.messages",
"id":"client_id",
"md5":"client_md5",
"parameters":{
"ID_message":"12345",
"ID_send": "123456",
"ID_undelivered_log": "123456789",
"limit":"1000"
}
}
XML
<?xml version="1.0"?>
<methodCall>
<methodName>mailkit.report.raw.messages</methodName>
<params>
<param>
<value>
<int>client_id</int>
</value>
</param>
<param>
<value>
<string>client_md5</string>
</value>
</param>
<param>
<value>
<int>ID_message</int>
</value>
</param>
<param>
<value>
<int>ID_send</int>
</value>
</param>
<param>
<value>
<int>ID_undelivered_log</int>
</value>
</param>
<param>
<value>
<int>limit</int>
</value>
</param>
</params>
</methodCall>
Values
client_id * = client ID can be found in your Mailkit account's menu Profile/Integration.
client_md5 * = MD5 code can be found in your Mailkit account's menu Profile/Integration.
ID_message = Campaign ID
ID_send = Campaign delivery ID
ID_undelivered_log = initial record ID to start from - used for iterration
limit = number of records to retrieve (defaults to 25000).
* required value
Succesfull call response:
JSON
[
{
"ID_MESSAGE": "12345",
"TEXT_STATUS": "smtp;550 5.1.1 sorry, no such mailbox here",
"STATUS": "5.1.1",
"BOUNCE_CAT": "bad-mailbox",
"ID_EMAIL": "1234567890",
"ID_SEND": "123456",
"EMAIL": "email@example.com",
"ID_SEND_MESSGE": "1234567890",
"ID_USER_LIST": "12345",
"REMOTE_MTA": "",
"ID_UNDELIVERED_LOG": "1",
"RECIPIENT_STATUS": "permanent"
},
{
"ID_MESSAGE": "12345",
"TEXT_STATUS": "X-Postfix; Mailbox is full",
"STATUS": "5.2.2",
"BOUNCE_CAT": "quota-issues",
"ID_EMAIL": "1234567891",
"ID_SEND": "123456",
"EMAIL": "email1@example.com",
"ID_SEND_MESSGE": "1234567891",
"ID_USER_LIST": "12345",
"REMOTE_MTA": "",
"ID_UNDELIVERED_LOG": "2",
"RECIPIENT_STATUS": "temporary"
}
]
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>ID_MESSAGE</name>
<value>
<i4>12345</i4>
</value>
</member>
<member>
<name>TEXT_STATUS</name>
<value>
<string>smtp; 552 4.2.2 User has full mailbox.</string>
</value>
</member>
<member>
<name>STATUS</name>
<value>
<string>4.2.2</string>
</value>
</member>
<member>
<name>BOUNCE_CAT</name>
<value>
<string>quota-issues</string>
</value>
</member>
<member>
<name>ID_EMAIL</name>
<value>
<i4>1234567890</i4>
</value>
</member>
<member>
<name>ID_SEND</name>
<value>
<i4>123456</i4>
</value>
</member>
<member>
<name>EMAIL</name>
<value>
<string>email@example.com</string>
</value>
</member>
<member>
<name>ID_SEND_MESSGE</name>
<value>
<i4>1234567890</i4>
</value>
</member>
<member>
<name>ID_USER_LIST</name>
<value>
<i4>12345</i4>
</value>
</member>
<member>
<name>REMOTE_MTA</name>
<value>
<string>dns; mx1.seznam.cz</string>
</value>
</member>
<member>
<name>ID_UNDELIVERED_LOG</name>
<value>
<i4>1</i4>
</value>
</member>
<member>
<name>RECIPIENT_STATUS</name>
<value>
<string>temporary</string>
</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>ID_MESSAGE</name>
<value>
<i4>12345</i4>
</value>
</member>
<member>
<name>TEXT_STATUS</name>
<value>
<string></string>
</value>
</member>
<member>
<name>STATUS</name>
<value>
<string>5.2.2</string>
</value>
</member>
<member>
<name>BOUNCE_CAT</name>
<value>
<string>bad-mailbox</string>
</value>
</member>
<member>
<name>ID_EMAIL</name>
<value>
<i4>1234567891</i4>
</value>
</member>
<member>
<name>ID_SEND</name>
<value>
<i4>123456</i4>
</value>
</member>
<member>
<name>EMAIL</name>
<value>
<string>email1@example.com</string>
</value>
</member>
<member>
<name>ID_SEND_MESSGE</name>
<value>
<i4>1234567891</i4>
</value>
</member>
<member>
<name>ID_USER_LIST</name>
<value>
<i4>12345</i4>
</value>
</member>
<member>
<name>REMOTE_MTA</name>
<value>
<string></string>
</value>
</member>
<member>
<name>ID_UNDELIVERED_LOG</name>
<value>
<i4>2</i4>
</value>
</member>
<member>
<name>RECIPIENT_STATUS</name>
<value>
<string>permanent</string>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
Values
ID_message - campaign ID
TEXT_STATUS - text status of delivery status notification
STATUS - SMTP code of DSN
ID_EMAIL - email address ID
ID_SEND - campaign delivery ID
EMAIL - recipient's email address
ID_SEND_MESSGE - sent message ID (unique)
ID_USER_LIST - mailing list ID
REMOTE_MTA - remote MTA identification
ID_UNDELIVERED_LOG - undelivered log ID
RECIPIENT_STATUS - current status of recipient
If there are no undelivered messages, the API returns an empty response:
JSON
{}
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<string></string>
</value>
</param>
</params>
</methodResponse>
Unsuccessful call response:
JSON
{
"error_status": 1,
"error": "Invalid ID_message"
}
XML
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value>
<string>Invalid ID_send</string>
</value>
</param>
</params>
</methodResponse>
Values
Invalid ID_message – invalid campaign ID
Invalid ID_send – invalid campaign delivery ID
In other cases, the API returns an empty response:
JSON
{}
XML
<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
<params>
<param>
<value>
<string></string>
</value>
</param>
</params>
</methodResponse>