‘unsubscribeEmail’ API will unsubscribe the email address from a particular campaign. You can unsubscribe all the subscribers from the campaign by passing ‘ALL’ as the email address. Email address is referenced by ‘EMAIL’ in the API, and the campaign is referenced by ‘CAMPAIGNID’.

Request: XML

    <EMAIL>Email address to unsubscribe</EMAIL>

Request: GET

&api_key=API key
&campaignid=campaign ID
&email=email address to unsubscribe

Request Parameters:

Mandatory: action, api_key, campaignId, email
Optional: N/A

Response Parameters:

status, campaignId, email, errorCode, errorInfo

Request Example: XML


Request Example: GET


Response Example: Success


Response Example: Failure


Postback Notification:

Upon unsubscribing an email the system will generate a notification. For more details please visit the Email Unsubscribe section of the Email Opt-in Status Postback documentation.

General Error Codes:

Code Description
E100 Invalid request. Make a valid request via GET/POST/XML with all the required variables.
E104 User Authentication Failed.
E105 This account has no API rights.
E106 You can call API every X seconds.
E107 This account has no rights to use this action.
E108 XML Parse error: $error.
E109 API not activated.
E112 IP was not whitelisted. API call rejected.
E113 Set throughput exceeded for this API action. API call rejected.
E114 Phone number is blacklisted. API call rejected.
E120 Account has reached the API request limit.
E503 Internal error.

Code Description
E911 The ‘email’ is required.
E912 Invalid ‘campaignid’.
E914 Could not unsubscribe this ‘email’.

Key Term Definitions:

Term Description
ACTION This is the name of the function you want to execute with the API.
API_KEY Random key that is assigned to an account that can be used for authorization instead of USER/PASS. You can find and regenerate this key on the ‘API Settings’ page.
CAMPAIGNID The ID(integer) of the campaign to which the user will be subscribed.
EMAIL A valid email address.