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.Add
Adds a subscriber (email address, name) to an existing subscriber list. If the subscriber (email address) already exists, the name value is updated with whatever is passed in.
New subscribers only will be sent the follow-up email as configured in the list settings. If the list has been set as double opt-in, they will be sent the verification email, otherwise they will be sent the confirmation email you have set up for the list being subscribed to.
Please note: If the subscriber is in an inactive state or has previously been unsubscribed, they will not be re-added to the active list. Therefore, this method should be used with caution and only where suitable.
Parameters and required information
Here’s a list of all the parameters you’ll need to pass to the Subscriber.Add 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 add the subscriber to. See here for more details.
Email
The email address of the new subscriber.
Name
The name of the new subscriber. If the name is unknown, an empty string can be passed in.
Return Codes
Success
0: Success
The subscription 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.
204: In Suppression List
Address exists in suppression list. Subscriber is not added.
205: Is Deleted
Email Address exists in deleted list. Subscriber is not added.
206: Is Unsubscribed
Email Address exists in unsubscribed list. Subscriber is not added.
207: Is Bounced
Email Address exists in bounced list. Subscriber is not added.
208: Is Unconfirmed
Email Address exists in unconfirmed list. Subscriber is not added.
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.Add"
<?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.Add xmlns="http://api.createsend.com/api/">
<ApiKey>string</ApiKey>
<ListID>string</ListID>
<Email>string</Email>
<Name>string</Name>
</Subscriber.Add>
</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.AddResponse xmlns="http://api.createsend.com/api/">
<Subscriber.AddResult>
<Code>int</Code>
<Message>string</Message>
</Subscriber.AddResult>
</Subscriber.AddResponse>
</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.Add?ApiKey=string&ListID=string&Email=string&Name=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.Add HTTP/1.1
Host: api.createsend.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
ApiKey=string&ListID=string&Email=string&Name=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>