Get messages list
Messages collection contains a list of all sent messages. Multiple messages matching specified criteria can be retrieved. Specifying single message ID can be used to retrieve detailed information about a specific message.
Request data format
Get multiple messages
Request URL parameters:
| Element/attribute | Type | Notes |
|---|---|---|
| apiKey | string | Your API key, required for authentication. Required. |
| tag | string | Tag. Optional. If specified, only messages tagged with its value will be returned. |
| startDate | date | Start date. Optional. If specified, messages sent before this date will not be returned. May be used together with endDate to specify a period of time. YYYY-MM-DD format. |
| endDate | date | See startDate. |
| type | string | Only return specific message types. Optional. Valid values: Newsletter Autoresponder Trigger Transactional Confirmation Recurring Test FreeEmailPreview PaidEmailPreview WorkflowMessage |
Examples:
https://api.esv2.com/v2/Api/Messages?apiKey=YOUR_API_KEY_HERE
https://api.esv2.com/v2/Api/Messages?apiKey=YOUR_API_KEY_HERE&tag=sports
https://api.esv2.com/v2/Api/Messages?apiKey=YOUR_API_KEY_HERE&tag=sports&startDate=2010-05-20&endDate=2010-05-22
https://api.esv2.com/v2/Api/Messages?apiKey=YOUR_API_KEY_HERE&tag=sports&startDate=2010-05-20&endDate=2010-05-22&type=RecurringGet message by Message ID
Request URL parameters:
| Element/attribute | Type | Notes |
|---|---|---|
| apiKey | string | Your API key, required for authentication. Required. |
| ID | int | Message ID. Required as a part of address (not GET parameter). See example below. |
| fullDetails | boolean | If set to “true”, full message details will be returned. By default set to “false”. Optional. |
Examples:
https://api.esv2.com/v2/Api/Messages/123?apiKey=YOUR_API_KEY_HERE
https://api.esv2.com/v2/Api/Messages/123?apiKey=YOUR_API_KEY_HERE&fullDetails=trueResponse
Get multiple messages
Response Data element:
| Element/attribute | Type | Notes |
|---|---|---|
| Messages | array[complex] | Array of Message elements. |
Message element children:
| Element/attribute | Type | Notes |
|---|---|---|
| Id | int | Message identifier. |
| FromName | string | Name used in „From:” header. |
| FromEmail | string | Email used in „From:” header. |
| Subject | string | Message subject. |
| Type | string | Message type (Newsletter, Autoresponder, Trigger etc). |
| SentDate | datetime | Optional. Date when the message was sent. For messages that are sent many times (e.g. Autoresponders) it is the first date matching specified date range. |
| Tags | string | Optional. List of comma-separated message tags. |
Get message by Message ID
Response Data element:
| Element/attribute | Type | Notes |
|---|---|---|
| Id | int | Message identifier. |
| FromEmail | string | Email used in „From:” header. |
| FromName | string | Name used in „From:” header. |
| Subject | string | Message subject. |
| Type | string | Message type (Newsletter, Autoresponder, Trigger etc). |
| SentDate | datetime | Optional. Date when the message was sent. For messages that are sent many times (e.g. Autoresponders) it is the first date matching specified date range. |
| Tags | string | Optional. List of comma-separated message tags. |
| ThrottlingMethod | string | Optional. Throttling method. |
| Throttling | int | Optional. Throttling period (hrs.). Filled only if ThrottlingMethod is „Manual”. |
| GoogleAnalyticsTags | array[complex] | Optional. Array of GoogleAnalyticsTag elements (if message uses Google Analytics). |
| CustomUtms | array[complex] | Array of CustomUtm elements used to add custom information to URLs in the newsletter. Optional. |
| YandexListId | complex | Optional. Information about Yandex List ID (if message uses Yandex integration). |
| Channels | string | Optional. List of comma-separated channels (if message was sent using channels other than default). |
| Lists | array[complex] | Optional. Array of List elements (target subscriber lists). |
| Segments | array[complex] | Optional. Array of Segment elements (target subscriber segments). |
| ExcludedLists | array[complex] | Optional. Array of excluded List elements (target subscriber lists). |
| ExcludedSegments | array[complex] | Optional. Array of excluded Segment elements (target subscriber segments). |
| Status | string | Optional. Available only for newsletters. |
GoogleAnalyticsTag element children:
| Element/attribute | Type | Notes |
|---|---|---|
| Name | string | Tag name, e.g. „utm_source”. |
| Value | string | Tag value. |
CustomUtms element children:
| Element/attribute | Type | Notes |
|---|---|---|
| Name | string | The name of the custom UTM parameter. |
| Value | string | The value assigned to the UTM parameter. |
YandexListId element children:
| Element/attribute | Type | Notes |
|---|---|---|
| Identifier | string | Yandex identifier. |
| Comment | string | Comment. |
List element children:
| Element/attribute | Type | Notes |
|---|---|---|
| Id | int | List identifier. |
| Name | string | List name. |
ExcludedLists element children:
| Element/attribute | Type | Notes |
| Id | int | List identifier. |
| Name | string | List name. |
ExcludedSegments element children:
| Element/attribute | Type | Notes |
| Id | int | Segment identifier. |
| Name | string | Segment name. |
Segment element children:
| Element/attribute | Type | Notes |
|---|---|---|
| Id | int | Segment identifier. |
| Name | string | Segment name. |
List of all possible ThrottlingMethod values:
| ThrottlingMethod values | Notes |
|---|---|
| None | Message is not throttled |
| Auto | Automatic throtling speed is applied. |
| Manual | Throttling time was specified manually (see „Throttling” element) |
List of all possible Status values:
| Status value |
|---|
| Scheduled |
| InProgress |
| Sent |
| Paused |
| Draft |
| Deleted |
Response Data element with the fullDetails option enabled:
| Element/attribute | Type | Notes |
| Id | int | Message identifier. |
| Type | string | Message type (Newsletter, Autoresponder, Trigger etc). |
| SentDate | datetime | Optional. Date when the message was sent. For messages that are sent many times (e.g. Autoresponders) it is the first date matching specified date range. |
| ThrottlingMethod | string | Optional. Throttling method. |
| Lists | array[complex] | Optional. Array of List elements (target subscriber lists). |
| Segments | array[complex] | Optional. Array of Segment elements (target subscriber segments). |
| ExcludedLists | array[complex] | Optional. Array of excluded List elements (target subscriber lists). |
| ExcludedSegments | array[complex] | Optional. Array of excluded Segment elements (target subscriber segments). |
| Status | string | Optional. Available only for newsletters. |
| IsAbTest | boolean | Indicates whether the message is part of an A/B test. |
| Contents | array[complex] | Array of message details |
Contents element children:
| Element/attribute | Type | Notes |
| Subject | string | Message subject. |
| Id | int | Content message identifier. |
| AbTestVersionType | string | Indicates the version of the A/B test the message belongs to. Possible values are „Winner” or „TestGroup” |
| FromName | string | Name used in “From:” header. |
| Preheader | string | Message preheader. |
| FromEmail | string | Email used in “From:” header. |
| ReplyToName | string | String put into “Reply-To:” header. |
| ReplyToEmail | string | Email put into “Reply-To:” header. |
| UrlIntegrations | array[complex] | List of IDs of URL integrations that were created in Business unit settings. Optional. |
| GoogleAnalyticsTags | array[complex] | Optional. Array of GoogleAnalyticsTag elements (if message uses Google Analytics). |
| YandexListId | complex | Optional. Information about Yandex List ID (if message uses Yandex integration). |
| HtmlContent | string | HTML content of message. Optional. |
| PlainTextContent | string | Plain text content of message. Optional. |
| AmpContent | string | AMP HTML content of message. Optional. |
Examples
Get multiple messages
Request:
GET
https://api.esv2.com/v2/Api/Messages?startDate=2010-05-19&apiKey=test_api_key1 HTTP/1.1
Accept-Encoding: gzip,deflate
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.comOK response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=cu23cqm125fq1qih1kg4ux45; path=/; HttpOnly
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 24 May 2010 12:56:22 GMT
Content-Length: 415
<ApiResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Data>
<Messages>
<Message>
<Id>892</Id>
<FromName>John Smith</FromName>
<FromEmail>j.smith@domain.com</FromEmail>
<Subject>test newsletter</Subject>
<Type>Newsletter</Type>
<SentDate>2010-05-19T19:35:08</SentDate>
</Message>
<Message>
<Id>893</Id>
<FromName>Your Favorite Shop</FromName>
<FromEmail>contact@yfs.com</FromEmail>
<Subject>test newsletter 2</Subject>
<Type>Newsletter</Type>
<SentDate>2010-05-21T14:09:15</SentDate>
<Tags>test 1</Tags>
</Message>
</Messages>
</Data>
</ApiResponse>Get message by Message ID
Request:
GET
https://api.esv2.com/v2/Api/Messages/893?apiKey=test_api_key1 HTTP/1.1
Accept-Encoding: gzip,deflate
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.comOK response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=3e0htsjefgfcby55ra5b2045; path=/; HttpOnly
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 24 May 2010 12:59:37 GMT
Content-Length: 369
<ApiResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Data>
<Id>893</Id>
<FromName>Your Favorite Shop</FromName>
<FromEmail>contact@yfs.com</FromEmail>
<Subject>test newsletter 2</Subject>
<Type>Newsletter</Type>
<SentDate>2010-05-21T14:09:15</SentDate>
<Tags>test 1</Tags>
<Channels>192.168.10.2, 192.168.10.3</Channels>
<Status>Sent</Status>
<Lists>
<List>
<Id>2</Id>
<Name>test list</Name>
</List>
</Lists>
<ExcludedLists>
<List>
<Id>7484</Id>
<Name>test exclude - filtr</Name>
</List>
</ExcludedLists>
<ExcludedSegments>
<Segment>
<Id>3400</Id>
<Name>test exclude - filtr</Name>
</Segment>
</ExcludedSegments>
</Data>
</ApiResponse>Example response with Google Analytics tags and Yandex List ID:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=3e0htsjefgfcby55ra5b2045; path=/; HttpOnly
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 24 May 2010 12:59:37 GMT
Content-Length: 455
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Data>
<Id>123951</Id>
<FromName>myFromName</FromName>
<FromEmail>myfromEmail@domain.com</FromEmail>
<Subject>Google Analytics tags test</Subject>
<Type>Newsletter</Type>
<ThrottlingMethod>Auto</ThrottlingMethod>
<GoogleAnalyticsTags>
<GoogleAnalyticsTag>
<Name>utm_source</Name>
<Value>testsource</Value>
</GoogleAnalyticsTag>
<GoogleAnalyticsTag>
<Name>utm_medium</Name>
<Value>Email</Value>
</GoogleAnalyticsTag>
<GoogleAnalyticsTag>
<Name>utm_content</Name>
<Value>testcontent</Value>
</GoogleAnalyticsTag>
<GoogleAnalyticsTag>
<Name>utm_campaign</Name>
<Value>testcampaign</Value>
</GoogleAnalyticsTag>
</GoogleAnalyticsTags>
<YandexListId>
<Identifier>testid</Identifier>
<Comment>testcomment</Comment>
</YandexListId>
<Status>Draft</Status>
</Data>
</ApiResponse>Example response with fullDetails option enabled:
Request:
GET
https://api.esv2.com/v2/Api/Messages/893?apiKey=test_api_key1&fullDetails=true HTTP/1.1
Accept-Encoding: gzip,deflate
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.comOK response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
Set-Cookie: ASP.NET_SessionId=3e0htsjefgfcby55ra5b2045; path=/; HttpOnly
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 24 May 2010 12:59:37 GMT
Content-Length: 369
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Data>
<Id>893</Id>
<Type>Newsletter</Type>
<SentDate>2025-07-24T13:02:08.997Z</SentDate>
<ThrottlingMethod>Auto</ThrottlingMethod>
<Lists>
<List>
<Id>7514</Id>
<Name>test</Name>
</List>
</Lists>
<Status>Sent</Status>
<IsAbTest>false</IsAbTest>
<Contents>
<Content>
<Subject>test</Subject>
<Id>893</Id>
<FromName>foo</FromName>
<FromEmail>test@test.com</FromEmail>
<ReplyToName>test</ReplyToName>
<ReplyToEmail>test2@test.com</ReplyToEmail>
<CustomUtms>
<CustomUtm>
<Name>custom_utm</Name>
<Value>test</Value>
</CustomUtm>
<CustomUtm>
<Name>custom_utm2</Name>
<Value>test2</Value>
</CustomUtm>
</CustomUtms>
<UrlIntegrations>
<UrlIntegration>
<Id>36</Id>
</UrlIntegration>
</UrlIntegrations>
<HtmlContent>test</HtmlContent>
</Content>
</Contents>
</Data>
</ApiResponse>