GET subscribers/{id}/emails/{messageId}

Overview

GET subscribers/{id}/emails/{messageId} returns the corresponding template ID and event history for a specified email message ID sent to the specified subscriber.

The "events" collection in the response payload consists of all send, open and click events associated with that message ID, with the corresponding timestamp.  A "click" event also shows the URI that was clicked in the email.

Resource URI

GET https://api.yesmail.com/v2/subscribers/{id}/emails/{messageId}

Call Description

The GET subscribers/{id}/subscriptions/{name} call returns the template ID and event history for a specified email message ID sent to the specified subscriber.

HTTP Return Codes

Code

Description

200 OK

The request has succeeded.

401 Unauthorized

The request requires user authentication.  Invalid Api-User and/or Api-Key header value.

404 Not Found

The server has not found anything matching the request resource.   For instance, the “id” or email "messageId" does not exist, or "messageId" was not sent to that subscriber "id".

Response Payload: 
{
    "messageId":156932463504,
    "templateId": "653965203",
    "events": [
        {
            "action": "sent",
            "time": "2013-01-01T09:09:09Z"
        },
        {  
            "action": "open",
            "time": "2013-01-01T09:10:11Z"
        },
        {
            "action": "click",
            "time": "2013-01-01T09:10:50Z",
            "uri": "http://some.link.com/path/to/product"
        },
         {  
            "action": "unsubscribe",
            "time": "2013-01-01T09:11:11Z"
        }
    ]
}