Explore Features  Free Trial

The SendLabs API

Unsubscribe()

Converts an active subscribe to an unsubscribed subscriber who will no longer receive emails sent to the associated list
Welcome To SendLabs!
/

Become an Email Marketing Pro

 
 
Subscribe
Hints tips, best practices, recent blog posts and happenings dropped into your inbox.


Subscribe to the semi-regular email newsletter from the crew at SendLabs.
 
     


/
API Methods
 
  Subscribers
AddSubscriber()
AddSubscriberWithCustomFields()
Unsubscribe()
ReturnActive()
ReturnUnsubscribed()
ReturnBounced()

Campaigns
CampaignSummary()
CampaignBounces()
CampaignClicks()
CampaignOpens()
 
     


/
API Examples
 
  .NET C# Sample
Flash Sample - Coming Soon
PHP Sample
Perl Sample
Ruby Sample
ASP Sample - Coming Soon
Python Sample



 
     
Welcome To SendLabs!
Parameters

ApiKey (Required)
    Your application authentication key. Click here to find out more
ListID (Required)
    The list you would like to unsubscribe the subscriber from. Click here to find out more
Email (Required)
    The email address of the subscriber you would like to unsubscribe

SOAP Sample Request

POST /api/api.php HTTP/1.1
Host: sl5.sendlabs.com
Content-Type: text/xml; charset=utf-8
Content-Length: length

SOAPAction: "http://sl5.sendlabs.com/api/Unsubscribe"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Body>
   <Unsubscribe xmlns="http://sl5.sendlabs.com/api/">
     <ApiKey>string</ApiKey>
     <ListID>int</ListID>
     <Email>string</Email>
   </Unsubscribe>
 </soap:Body>
</soap:Envelope>
    

SOAP Sample Response

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Body>
<UnsubscribeResponse xmlns="http://sl5.sendlabs.com/api/">
     <Code>int</Code>
     <Response>string</Response>
 </UnsubscribeResponse>
 </soap:Body>
</soap:Envelope>
   

Fault Codes

1- Invalid Email Address
    The supplied email address is invalid or does not exist
20 - Invalid ListID
    The Associated List is not valid
100 - Invalid API Key
    The API key is not valid or expired