This API will unsubscribe users to a particular campaign. Once a user is subscribed to a campaign they will receive all auto responders and scheduled messages for that campaign until they are unsubscribed through the API or through normal STOP or STOP ALL SMS request. You may not import someone who has unsubscribed themselves from a campaign however may re-subscribe someone who has unsubscribed through the Subscribe API.
Request: XML
<REQUEST>
<ACTION>unsubscribe</ACTION>
<API_KEY>apiKey</API_KEY>
<CAMPAIGNREF>Campaign Reference ID</CAMPAIGNREF>
<MOBILE>Number to unsubscribe</MOBILE>
<NOTIFY>'yes/no' on whether to notify user on opt-out</NOTIFY>
</REQUEST>
Request Parameters
Term
Mandatory/Optional
Description
ACTION
Mandatory
This is the name of the function you want to execute with the API.
API_KEY
Mandatory
The API key that is assigned to your account that is used for authentication. You can find this key on the API Settings page.
CAMPAIGNREF
Mandatory
This is the identifier of the Campaign you would like to unsubscribe the number to. You generated the campaignRef when you created the Campaign.
MOBILE
Mandatory
A Phone Number to unsubscribe to a campaign.
Notify
Optional
A mobile owner will be notified about being unsubscribed via a confirmation SMS (yes/no).
Response Parameters
Param Name
Presence
Description
STATUS
Always
“Success” or “Failure”.
CAMPAIGNREF
Success Response Only
This is the identifier of the Campaign you would like to unsubscribe the number to. You generated the campaignRef when you created the Campaign.
Upon unsubscribing a number the system will generate a notification. For more details please visit the Mobile Unsubscribe section of the 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.