API Reference: Subscriber.Unsubscribe
Unsubscribes an email address from the list. Unsubscribed email address will not receive any campaigns sent to that subscriber list.
Input Parameters
Following parameters are required by this command:
- APIKey
Your user account API key. You can learn your API key in your Sendloop area > Manage Account section - Command
For subscribing an email address, you should set this parameter to 'Subscriber.Unsubscribe' - ListID ID number of the target subscriber list. List ID can be gathered from Lists > List Overview > List Settings section
- Email Address
The email address which should be subscribed to the target subscriber list - Unsubscription IP Address
IP address of the subscriber must be provided in order to track opt-in status
Output
Sendloop will return some information about the request status. Sendloop always return in XML-RPC format. Below, you can see the list of all available codes and messages which can be returned by this command:
Error Codes and Messages:
One of the following error messages will be returned if any error occurs:
- #1
Connection type is not compatible - #2
Invalid API key or user account is not available - #3
Subscriber list does not exist or not available - #4
Email address is missing - #5
Email address format is illegal - #7
Email address is invalid - #8
Email address does not exist in the subscriber list
Success Message
Success message will include the following three parameters:
- Status
'Unsubscribed' will be returned - RedirectURL
Redirection URL set in Subscriber List Integration Settings section
Examples
We provided examples in all three accepted messaging formats. Bold texts means data that needs to be replaced by you.
HTTP-POST Example
Input:
POST /api/index.php HTTP/1.1 Host: yoursubdomain.sendloop.com Content-Type: application/x-www-form-urlencoded FormValue_APIKey=YourAPIKeyHere&FormValue_Command=Subscriber.Unsubscribe&
FormValue_ListID=10&FormValue_EmailAddress=test@dummy.com&
FormValue_UnsubscriptionIP=88.88.88.88
HTTP-GET Example
GET /api/index.php?APIKey=YourAPIKeyHere&Command=Subscriber.Unsubscribe&ListID=10&
EmailAddress=test@dummy.com&UnsubscriptionIP=88.88.88.88 HTTP/1.1 Host: yoursubdomain.sendloop.com
XML-RPC Example
To connect Sendloop API through XML-RPC messaging format, you will need to pass XML-RPC code via HTTP-POST or HTTP-GET method:
XML-RPC connection via HTTP-POST:
POST /api/index.php HTTP/1.1 Host: yoursubdomain.sendloop.com Content-Type: application/x-www-form-urlencoded FormValue_Message=<<<The following XML structure must be inserted here with URL
encoded structure>>> <Entry> <Message> <APIKey>YourAPIKeyHere</APIKey> <Command>Subscriber.Add</Command> <ListID>10</ListID> <UnsubscriptionIP>88.88.88.88</UnsubscriptionIP> <EmailAddress>test@dummy.com</EmailAddress> </Message> </Entry>
XML-RPC connection via HTTP-GET:
GET /api/index.php?FormValue_Message=<<<The following XML structure must be
inserted here with URL encoded structure>>> HTTP/1.1 Host: yoursubdomain.sendloop.com <Entry> <Message> <APIKey>YourAPIKeyHere</APIKey> <Command>Subscriber.Add</Command> <ListID>10</ListID> <UnsubscriptionIP>88.88.88.88</UnsubscriptionIP> <EmailAddress>test@dummy.com</EmailAddress> </Message> </Entry>
Error Output Example
<value> <struct> <member> <name>APIError</name> <value><string>Subscriber list does not exist or not available</string></value> </member> <member> <name>APIErrorCode</name> <value><string>3</string></value> </member> </struct> </value>
Success Output Example
<value> <struct> <member> <name>Status</name> <value><string>Unsubscribed</string></value> </member> <member> <name>RedirectURL</name> <value><string>http://your.target.url/</string></value> </member> </struct> </value>
Campaign Functions
Subscriber List Functions
Subscriber Custom Field Functions
Subscriber List Segment Functions
Subscriber List Integration Functions
Subscriber Functions
- Subscriber.Add
- Subscriber.Get
- Subscribers.Get
- Subscriber.Update
- Subscriber.Delete
- Subscriber.Unsubscribe
Report Functions
- Report.Campaign.Advisory
- Report.Campaign.EmailPath
- Report.Campaign.OpensOverall
- Report.Campaign.OpensDetail
- Report.Campaign.ClicksOverall
- Report.Campaign.ClicksDetail
- Report.Campaign.UnsubscriptionsOverall
- Report.Campaign.UnsubscriptionsDetail
- Report.Campaign.BrowserViewsOverall
- Report.Campaign.BrowserViewsDetail
- Report.Campaign.ForwardsOverall
- Report.Campaign.ForwardsDetail
- Report.Campaign.BounceOverall
- Report.Campaign.BounceDetail
- Report.Campaign.SpamComplains
- Report.List.Advisory
- Report.List.Performance
- Report.List.BounceOverall
- Report.List.BounceDetails
- Report.List.Opens
- Report.List.Clicks
- Report.List.Forwards
- Report.List.BrowserViews
- Report.List.Activities
- Report.List.EmailServices
Media Library Functions
Chart Functions