Overview
The following operations allow you to work with subscribers. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with subscribers, see Sample configuration.
Operation | Description |
---|---|
Retrieves the subscriber information. | |
listSubscribers | Retrieves the list of subscribers for a specific list and segment. |
searchSubscriber | Searches subscriber lists for a specific e-mail address.. |
subscribe | Subscribes an e-mail address to one of the lists. |
unsubscribe | Unsubscribes an e-mail address from your lists. |
updateSubscriber | Updates subscriber information. |
Operation details
This section provides further details on the operations related to subscribers.
Retrieving the subscriber information
The
operation retrieves the subscriber information.getSubscriber
<sendloop.getSubscriber> <subscriberId>{$ctx:subscriberId}</subscriberId> <listId>{$ctx:listId}</listId> <emailAddress>{$ctx:emailAddress}</emailAddress> </sendloop.getSubscriber>
Properties
Optional- The ID number of the target subscriber.subscriberId:
Required - The ID of the target list to get subscribers.listId:
Optional - The e-mail address of the subscriber.emailAddress:
Sample request
Following is a sample REST/JSON request that can be handled by the getSubscriber
operation.
{ "apiUrl": "https://b1baa4a-ae4d45.sendloop.com", "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119", "format": "json", "subscriberId": 2, "listId": 8, "emailAddress": "mayuranbro@gmail.com" }
Related Sendloop documentation
https://sendloop.com/help/api-006/subscriber-management#subscriber_get
Retrieving the list of subscribers
The
operation retrieves the list of subscribers for a specific list and segment. listSubscribers
<sendloop.listSubscribers> <listId>{$ctx:listId}</listId> <segmentId>{$ctx:segmentId}</segmentId> <startIndex>{$ctx:startIndex}</startIndex> </sendloop.listSubscribers>
Properties
Required - The ID of the target list to get subscribers.listId:
Optional- The ID of the segment in the target list to get subscribers.segmentId:
Optional - Page index to get subscribers from. Each call returns 100 records. Default is 0.startIndex:
Sample request
Following is a sample REST/JSON request that can be handled by the listSubscribers
operation.
{ "apiUrl": "https://b1baa4a-ae4d45.sendloop.com", "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119", "format": "json", "listId": 8, "segmentId": 234, "startIndex": 0 }
Related Sendloop documentation
https://sendloop.com/help/api-006/subscriber-management#subscriber_browse
Retrieving the list of e-mail campaigns
The
operation retrieves the list of e-mail campaigns you have in your Sendloop account. listEmailCampaigns
<sendloop.listEmailCampaigns> <ignoreDrafts>{$ctx:ignoreDrafts}</ignoreDrafts> <ignoreSending>{$ctx:ignoreSending}</ignoreSending> <ignorePaused>{$ctx:ignorePaused}</ignorePaused> <ignoreSent>{$ctx:ignoreSent}</ignoreSent> <ignoreFailed>{$ctx:ignoreFailed}</ignoreFailed> <ignoreApproval>{$ctx:ignoreApproval}</ignoreApproval> </sendloop.listEmailCampaigns>
Properties
Set this field to 1 if you want to exclude drafts. Otherwise, set to zero (0).ignoreDrafts:
Set this field to 1 if you want to exclude currently sending campaigns. Otherwise, set to zero (0).ignoreSending:
Set this field to 1 if you want to exclude paused campaigns. Otherwise, set to zero (0).ignorePaused:
Set this field to 1 if you want to exclude sent campaigns. Otherwise, set to zero (0).ignoreSent:
Set this field to 1 if you want to exclude failed campaigns. Otherwise, set to zero (0).ignoreFailed:
Set this field to 1 if you want to exclude approval pending campaigns. Otherwise, set to zero (0).ignoreApproval:
Sample request
Following is a sample REST/JSON request that can be handled by the listEmailCampaigns
operation.
{ "apiUrl": "https://b1baa4a-ae4d45.sendloop.com", "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119", "format": "json", "ignoreDrafts": 0, "ignoreSending": 0, "ignorePaused": 0, "ignoreSent": 0, "ignoreFailed": 0, "ignoreApproval": 0 }
Related Sendloop documentation
https://sendloop.com/help/api-004/email-campaign-management#campaign_getlist
Searching subscriber lists for a specific e-mail address
The
operation searches subscriber lists for a specific e-mail address.searchSubscriber
<sendloop.searchSubscriber> <emailAddress>{$ctx:emailAddress}</emailAddress> </sendloop.searchSubscriber>
Properties
Required - Enter the exact or partial e-mail address you wish to make a search for.emailAddress:
Sample request
Following is a sample REST/JSON request that can be handled by the searchSubscriber
operation.
{ "apiUrl": "https://b1baa4a-ae4d45.sendloop.com", "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119", "format": "json", "emailAddress": "testing123@gmail.com" }
Related Sendloop documentation
https://sendloop.com/help/api-006/subscriber-management#subscriber_search
Subscribing an e-mail address to one of the lists
The
operation subscribes an e-mail address to one of the lists.subscribe
<sendloop.subscribe> <emailAddress>{$ctx:emailAddress}</emailAddress> <subscriberListId>{$ctx:subscriberListId}</subscriberListId> <subscriptionIp>{$ctx:subscriptionIp}</subscriptionIp> <fields>{$ctx:fields}</fields> </sendloop.subscribe>
Properties
Required - The e-mail address which is going to be subscribed.emailAddress:
Required - The ID of the target subscriber list.subscriberListId:
Required - The IP address of the subscriber.subscriptionIp:
If you are going to pass custom fields such as name or age, pass them in an array here.fields:
Sample request
Following is a sample REST/JSON request that can be handled by the subscribe
operation.
{ "apiUrl": "https://b1baa4a-ae4d45.sendloop.com", "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119", "format": "json", "emailAddress": "homeanda@gmail.com", "subscriberListId": 8, "subscriptionIp": "192.36.59.68", "fields": [{ "index":12, "value":"15f8e955fd54asfdf45s4f" },{ "index":11, "value":"Harry" },{ "index":10, "value":"Potter" } ] }
Related Sendloop documentation
https://sendloop.com/help/api-006/subscriber-management#subscriber_subscribe
Unsubscribes an e-mail address from your lists
The
operation unsubscribes an e-mail address from your lists.unsubscribe
<sendloop.unsubscribe> <emailAddress>{$ctx:emailAddress}</emailAddress> <listId>{$ctx:listId}</listId> <unsubscriptionIP>{$ctx:unsubscriptionIP}</unsubscriptionIP> </sendloop.unsubscribe>
Properties
Required - Unsubscribe an e-mail address from your lists.emailAddress:
The ID of the list from where to unsubscribe the e-mail address.listId:
The IP of the machine from which the e-mail was unsubscribed.unsubscriptionIP:
Sample request
Following is a sample REST/JSON request that can be handled by the unsubscribe
operation.
{ "apiUrl": "https://b1baa4a-ae4d45.sendloop.com", "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119", "format": "json", "emailAddress": "sampler02@gmail.com", "listId": "789", "unsubscriptionIP": "192.168.39.65" }
Related Sendloop documentation
https://sendloop.com/help/api-006/subscriber-management#subscriber_unsubscribe
Updates subscriber information
The
operation updates subscriber information.updateSubscriber
<sendloop.updateSubscriber> <subscriberId>{$ctx:subscriberId}</subscriberId> <listId>{$ctx:listId}</listId> <emailAddress>{$ctx:emailAddress}</emailAddress> <fields>{$ctx:fields}</fields> </sendloop.updateSubscriber>
Properties
Optional - The ID number of the target subscriber.subscriberId:
Required - The ID of the target list to get subscribers.listId:
The e-mail address of the subscriber.emailAddress:
Custom fields to be updated. This parameter should be set as an array.fields:
Sample request
Following is a sample REST/JSON request that can be handled by the updateSubscriber
operation.
{ "apiUrl": "https://b1baa4a-ae4d45.sendloop.com", "apiKey": "e470-fb56-ee1f-e561-ed5e-987d-0340-e119", "format": "json", "subscriberId": 2, "listId": 8, "emailAddress": "mayuranbro@gmail.com", "fields": [{ "index":12, "value":"1596357486245963258" },{ "index":11, "value":"Mayuran" },{ "index":10, "value":"Bro" } ] }
Related Sendloop documentation
https://sendloop.com/help/api-006/subscriber-management#subscriber_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 getSubscriber sample request.getSubscriber
<?xml version="1.0" encoding="UTF-8"?> <proxy name="sendloop_getSubscriber" 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="subscriberId" expression="json-eval($.subscriberId)"/> <property name="listId" expression="json-eval($.listId)"/> <property name="emailAddress" expression="json-eval($.emailAddress)"/> <sendloop.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> <format>{$ctx:format}</format> </sendloop.init> <sendloop.getSubscriber> <subscriberId>{$ctx:subscriberId}</subscriberId> <listId>{$ctx:listId}</listId> <emailAddress>{$ctx:emailAddress}</emailAddress> </sendloop.getSubscriber> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>