Przejdź do treści

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/attributeTypeNotes
NamestringList name. Max 256 characters. Required.
TypestringType of suppression list. See below for description of different types. Optional. Default set to „Email”.
ImportRulestringImport rule can be specified for suppression list of type „Email”. See below for description of different import rules. Optional. Default set to „Email”.

Type:

NameBehaviour
EmailEntries on the list can be email addresses or domains.
SmsMmsEntries on the list can be phone numbers.

ImportRule:

NameBehaviour
EmailAllows importing only email addresses.
EmailAndDomainAllows importing email addresses and whole domains.

Response

Method returns ID of created subscriber list.

Response Data element:

Element/attributeTypeNotes
(Data element content)intID 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>
Na tej stronie
Do góry