This is an older version of the Campaign Monitor API. We strongly encourage you to quit livin' in the past and use the shiny new RESTful version with lots of new functionality. You won't regret it.
Subscriber.Unsubscribe
Changes the status of an Active Subscriber to an Unsubscribed Subscriber who will no longer receive campaigns sent to that Subscriber List.
If the list is set to add unsubscribing subscribers to the suppression list, then the subscriber’s email address will also be added to the suppression list.
Parameters and required information
Here’s a list of all the parameters you’ll need to pass to the Subscriber.Unsubscribe method. All of the parameters are required unless otherwise noted.
ApiKey
Your API application key. See here for more details.
ListID
The list you want to remove the subscriber from. See here for more details.
Email
The email address of the subscriber.
Return Codes
Success
0: Success
The unsubscription was successful.
Error
1: Invalid email address
The email value passed in was invalid.
100: Invalid API Key
The API key pass was not valid or has expired.
101: Invalid ListID
The ListID value passed in was not valid.
202: Already removed/Not in list
Subscriber not in list or has already been removed.
SOAP 1.1
The following is a sample SOAP request and response. The placeholders shown need to be replaced with actual values.
POST /api/api.asmx HTTP/1.1
Host: api.createsend.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://api.createsend.com/api/Subscriber.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>
<Subscriber.Unsubscribe xmlns="http://api.createsend.com/api/">
<ApiKey>string</ApiKey>
<ListID>string</ListID>
<Email>string</Email>
</Subscriber.Unsubscribe>
</soap:Body>
</soap:Envelope>
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>
<Subscriber.UnsubscribeResponse xmlns="http://api.createsend.com/api/">
<Subscriber.UnsubscribeResult>
<Code>int</Code>
<Message>string</Message>
</Subscriber.UnsubscribeResult>
</Subscriber.UnsubscribeResponse>
</soap:Body>
</soap:Envelope>
HTTP Get
The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.
GET /api/api.asmx/Subscriber.Unsubscribe?ApiKey=string&ListID=string&Email=string HTTP/1.1
Host: api.createsend.com
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<Result xmlns="http://api.createsend.com/api/">
<Code>int</Code>
<Message>string</Message>
</Result>
HTTP Post
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /api/api.asmx/Subscriber.Unsubscribe HTTP/1.1
Host: api.createsend.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
ApiKey=string&ListID=string&Email=string
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<Result xmlns="http://api.createsend.com/api/">
<Code>int;</Code>
<Message>string</Message>
</Result>