API Reference – Reporting API – messagesProcessed()

Reporting API Method Documentation

©2009-2014 SocketLabs, Inc., Version 1.9, Last Edit: October 24, 2014

messagesProcessed

Synopsis:

Retrieve a list of outbound email messages that have been successfully sent by the system.

Recommended Usage:

The messagesProcessed method is deprecated in favor of the Notification API whenever possible. If the Notification API cannot be used, the messagesProcessed method is useful for tracking which messages are successfully sent and when.Please note that a message is considered “successfully sent” when it is accepted by the recipient’s mail server. This does not always mean that the message was delivered to the recipient’s inbox. The SMTP protocol does not provide a mechanism to determine what happens to a message after it has been accepted by the recipient’s mail server. Also, note that “successfully sent” outbound messages may bounce later, and if that happens, they will show in the results of the messagesFailed method.

Request Information

URL:

https://api.socketlabs.com/v1/messagesProcessed

Response Format Types:

JSON, JSONP, XML or CSV

HTTP Method:

GET

Request Parameters:

serverId
Specifies the server ID to query. For more information see this overview on using the Server ID.
type
Specifies format of the response. May be set to JSON, JSONP, XML or CSV.
count
(Optional) Specifies the number of records to return in the result set. If this parameter is not specified it will default to 500. 500 is the maximum number of records that you may retrieve in one call. You can use this parameter in combination with the index parameter to pull down multiple “pages” of data making it possible to retrieve more than 500 records with multiple calls.
endDate
(Optional) Refers to the date and time that the message was processed. Specifies the ending date and time of the records to return. The value should be formatted as yyyy-mm-dd hh:mm:ss. If the time is omitted it will default to 00:00:00.
index
(Optional) Specifies the zero based index of the first record to return from the result set.
mailingId
(Optional) Only records matching the specified mailingId will be returned. For more information see this overview on using Mailing ID and Message ID.
messageId
(Optional) Only records matching the specified messageId will be returned. For more information see this overview on using Mailing ID and Message ID.
startDate
(Optional) Refers to the date and time that the message was processed. Specifies the starting date and time of the records to return. The value should be formatted as yyyy-mm-dd hh:mm:ss. If the time is omitted it will default to 00:00:00.
timeZone
(Optional) Specifies the timeZone offset that will be used by the API. For more information see this overview on using timezone data.

Example Request:

https://api.socketlabs.com/v1/messagesProcessed?serverId=0001&type=xml

Response Data Structures

Response Data Structure (JSON):

{
    "timestamp": "Datetime",
    "totalCount": "Integer",
    "totalPages": "Integer",
    "page": "Integer",
    "count": "Integer",
    "collection": [
        {
            "ServerId": "Integer",
            "MessageId": "String",
            "DateTime": "Datetime",
            "Disposition": "Integer",
            "FromAddress": "String",
            "LocalIp": "String",
            "MailingId": "String",
            "MessageSize": "Integer",
            "Response": "String",
            "ToAddress": "String"
        },
    ]
}

Response Data Structure (XML):

<response>
    <timestamp>Datetime</timestamp>
    <totalCount>Integer</totalCount>
    <totalPages>Integer</totalPages>
    <page>Integer</page>
    <count>Integer</count>
    <collection>
        <item>
            <ServerId>Integer</ServerId>
            <MessageId>String</MessageId>
            <DateTime>Datetime</DateTime>
            <Disposition>Integer</Disposition>
            <FromAddress>String</FromAddress>
            <LocalIp>String</LocalIp>
            <MailingId>String</MailingId>
            <MessageSize>Integer</MessageSize>
            <Response>String</Response>
            <ToAddress>String</ToAddress>
        </item>
    </collection>
</response>

Response Data Structure (CSV):

Data columns in the CSV format are in the following order:

ServerId,MessageId,DateTime,Disposition,FromAddress,LocalIp,MailingId,MessageSize,Response,ToAddress

Response Parameters

count
The number of entries in this page of data.
page
The current page of data returned by the query.
timestamp
The date and time of the API request.
totalCount
This field is deprecated, and should return as 0.
totalPages
This field is deprecated, and should return as 0.
collection.item.DateTime
The date and time that the message processing occurred.
collection.item.Disposition
Deprecated value.
collection.item.FromAddress
The sender of the message in question.
collection.item.LocalIp
Deprecated value.
collection.item.MailingId
The X-xsMailingId header value of the message in question.
collection.item.MessageId
The X-xsMessageId header value of the message in question.
collection.item.MessageSize
The size of the message in bytes.
collection.item.Response
The response from the recipient’s mail server when the message was accepted.
collection.item.ServerId
The ID of the server being queried.
collection.item.ToAddress
The recipient of the message in question.

Response Examples

Example Response (JSON):

{
    "timestamp": "1368647837268",
    "totalCount": 0,
    "totalPages": 0,
    "page": 1,
    "count": 2,
    "collection": [
        {
            "ServerId": 0001,
            "MessageId": "",
            "DateTime": "1361369464000",
            "Disposition": 1,
            "FromAddress": "[email protected]",
            "LocalIp": "10.10.10.10",
            "MailingId": "",
            "MessageSize": 24120,
            "Response": "250 2.0.0 Ok: queued as C4/26-05369-692D4235{CRLF}",
            "ToAddress": "[email protected]"
        },
        {
            "ServerId": 0001,
            "MessageId": "",
            "DateTime": "1361369585000",
            "Disposition": 1,
            "FromAddress": "[email protected]",
            "LocalIp": "10.10.10.10",
            "MailingId": "",
            "MessageSize": 24076,
            "Response": "250 2.0.0 Ok: queued as 8B/C8-05289-FD9D4245{CRLF}",
            "ToAddress": "[email protected]"
        },
    ]
}

Example Response (XML):

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<response>
    <timestamp>2013-05-15T19:57:40.5607784Z</timestamp>
    <totalCount>0</totalCount>
    <totalPages>0</totalPages>
    <page>1</page>
    <count>2</count>
    <collection>
        <item>
            <ServerId>0001</ServerId>
            <MessageId></MessageId>
            <DateTime>2013-02-20T14:11:04Z</DateTime>
            <Disposition>1</Disposition>
            <FromAddress>[email protected]</FromAddress>
            <LocalIp>10.10.10.10</LocalIp>
            <MailingId></MailingId>
            <MessageSize>24120</MessageSize>
            <Response>250 2.0.0 Ok: queued as C4/26-05369-692D4235{CRLF}</Response>
            <ToAddress>[email protected]</ToAddress>
        </item>
        <item>
            <ServerId>0001</ServerId>
            <MessageId></MessageId>
            <DateTime>2013-02-20T14:13:05Z</DateTime>
            <Disposition>1</Disposition>
            <FromAddress>[email protected]</FromAddress>
            <LocalIp>10.10.10.10</LocalIp>
            <MailingId></MailingId>
            <MessageSize>24076</MessageSize>
            <Response>250 2.0.0 Ok: queued as 8B/C8-05289-FD9D4245{CRLF}</Response>
            <ToAddress>[email protected]</ToAddress>
        </item>
    </collection>
</response>

Example Response (CSV):

ServerId,MessageId,DateTime,Disposition,FromAddress,LocalIp,MailingId,MessageSize,Response,ToAddress
0001,,"""2/20/2013 2:11:04 PM +00:00""",1,[email protected],10.10.10.10,,24120,"250 2.0.0 Ok: queued as C4/26-05369-692D4235{CRLF}",[email protected]
0001,,"""2/20/2013 2:13:05 PM +00:00""",1,[email protected],10.10.10.10,,24076,"250 2.0.0 Ok: queued as 8B/C8-05289-FD9D4245{CRLF}",[email protected]

Customers Who Trust in SocketLabs

You’re in good company when working with SocketLabs. Here are some companies who have also trusted SocketLabs.

Why SocketLabs?

What Our Customers Are Saying!