Create suppression list
Allows creating new suppression list for email addresses, domains or phone numbers.
Request data format
Data part of request for creating a new suppression list.
Data element children:
| Element/attribute | Type | Notes |
|---|---|---|
| Name | string | List name. Max 256 characters. Required. |
| Type | string | Type of suppression list. See below for description of different types. Optional. Default set to “Email”. |
| ImportRule | string | Import rule can be specified for suppression list of type “Email”. See below for description of different import rules. Optional. Default set to “Email”. |
Type:
| Name | Behaviour |
|---|---|
| Entries on the list can be email addresses or domains. | |
| SmsMms | Entries on the list can be phone numbers. |
ImportRule:
| Name | Behaviour |
|---|---|
| Allows importing only email addresses. | |
| EmailAndDomain | Allows importing email addresses and whole domains. |
Response
Method returns ID of created subscriber list.
Response Data element:
| Element/attribute | Type | Notes |
|---|---|---|
| (Data element content) | int | ID of created list. |
Examples
Request:
POST https://api.esv2.com/v2/Api/CreateSuppressionList HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
User-Agent: Jakarta Commons-HttpClient/3.1
Host: api.esv2.com
Content-Length: 278
<ApiRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<ApiKey>{{ApiKey}}</ApiKey>
<Data>
<Name>New sup list</Name>
<ImportRule>EmailAndDomain</ImportRule>
</Data>
</ApiRequest>Response:
<ApiResponse xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Data>62</Data>
</ApiResponse>