Overview
The following operations allow you to work with subscriber lists. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with subscriber lists, see Sample configuration.
Operation | Description |
---|---|
Creates a new subscriber list in your Sendloop account. | |
getSubscriberList | Retrieves details of a specific subscriber list. |
listSubscriberLists | Retrieves back your subscriber lists. |
updateSubscriberList | Updates information of a subscriber list. |
Operation details
This section provides further details on the operations related to subscriber lists.
Creating a new subscriber list
The
operation creates a new subscriber list in your Sendloop account.createSubscriberList
<sendloop.createSubscriberList> <listName>{$ctx:listName}</listName> <optInMode>{$ctx:optInMode}</optInMode> </sendloop.createSubscriberList>
Properties
Required - The name of the new subscriber list.listName:
Required - Set the subscription type. It can be opt-in (no e-mail confirmation will be sent) or double opt-in (confirmation e-mail will be sent - recommended). Pass 'Single' or 'Double'.optInMode:
Sample request
Following is a sample REST/JSON request that can be handled by the createSubscriberList
operation.
{ "apiUrl": "https://b1baa4a-ae4d45.sendloop.com", "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119", "format": "json", "listName": "List Name A001", "optInMode": "Single" }
Related Sendloop documentation
https://sendloop.com/help/api-005/subscriber-list-management#list_create
Retrieving details of a specific subscriber list
The
operation retrieves details of a specific subscriber list.getSubscriberList
<sendloop.getSubscriberList> <subscriberListId>{$ctx:subscriberListId}</subscriberListId> <getCustomFields>{$ctx:getCustomFields}</getCustomFields> </sendloop.getSubscriberList>
Properties
Required - The ID of the subscriber list whose details would be retrieved.subscriberListId:
Required - If it is set to 1, API call will return the list of created custom fields for the target list. To disable this feature, set it to 0 (zero).getCustomFields:
Sample request
Following is a sample REST/JSON request that can be handled by the getSubscriberList
operation.
{ "apiUrl": "https://b1baa4a-ae4d45.sendloop.com", "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119", "format": "json", "subscriberListId": 8, "getCustomFields": 1 }
Related Sendloop documentation
https://sendloop.com/help/api-005/subscriber-list-management#list_get
Retrieving back your subscriber lists
The
operation retrieves back your subscriber lists.listSubscriberLists
<sendloop.listSubscriberLists> </sendloop.listSubscriberLists>
Sample request
Following is a sample REST/JSON request that can be handled by the listSubscriberLists
operation.
{ "apiUrl": "https://b1baa4a-ae4d45.sendloop.com", "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119", "format": "json" }
Related Sendloop documentation
https://sendloop.com/help/api-005/subscriber-list-management#list_getlist
Updating information of a subscriber list
The
operation updates information of a subscriber list.updateSubscriberList
<sendloop.updateSubscriberList> <listName>{$ctx:listName}</listName> <optInMode>{$ctx:optInMode}</optInMode> <subscriberListId>{$ctx:subscriberListId}</subscriberListId> </sendloop.updateSubscriberList>
Properties
Required - The name of the new subscriber list.listName:
Set the subscription type. It can be opt-in (no e-mail confirmation will be sent) or double opt-in (confirmation e-mail will be sent - recommended). Pass 'Single' or 'Double'.optInMode:
- The ID of the subscriber list to update.subscriberListId:
Sample request
Following is a sample REST/JSON request that can be handled by the updateSubscriberList
operation.
{ "apiUrl": "https://b1baa4a-ae4d45.sendloop.com", "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119", "format": "json", "listName": "List Name A001 - Updated", "optInMode": "Double", "subscriberListId": 8 }
Related Sendloop documentation
https://sendloop.com/help/api-005/subscriber-list-management#list_settings_update
Sample configuration
Following is a sample proxy service that illustrates how to connect to Sendloop with the init
operation and use the
operation. The sample request for this proxy can be found in the createSubscriberList sample request.createSubscriberList
<?xml version="1.0" encoding="UTF-8"?> <proxy name="sendloop_createSubscriberList" startOnLoad="true" statistics="disable" trace="disable" transports="https,http" xmlns="http://ws.apache.org/ns/synapse"> <target> <inSequence onError="faultHandlerSeq"> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiKey" expression="json-eval($.apiKey)"/> <property name="format" expression="json-eval($.format)"/> <property name="listName" expression="json-eval($.listName)"/> <property name="optInMode" expression="json-eval($.optInMode)"/> <sendloop.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> <format>{$ctx:format}</format> </sendloop.init> <sendloop.createSubscriberList> <listName>{$ctx:listName}</listName> <optInMode>{$ctx:optInMode}</optInMode> </sendloop.createSubscriberList> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>