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.
<CAMPAIGNREF>Campaign Reference ID</CAMPAIGNREF>
<MOBILE>Number to unsubscribe</MOBILE>
<NOTIFY>'yes/no' on whether to notify user on opt-out</NOTIFY>
&campaignref=campaign reference ID
&mobile=number to unsubscribe
¬ify='yes/no' on whether to notify user on opt-out
Mandatory: action, api_key, campaignRef, mobile
status, campaignRef, mobile, errorCode, errorInfo
Request Example: XML
Request Example: GET
Response Example: Success
Response Example: Failure
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:
||Invalid request. Make a valid request via GET/POST/XML with all the required variables.
||User Authentication Failed.
||This account has no API rights.
||You can call API every X seconds.
||This account has no rights to use this action.
||XML Parse error: $error.
||API not activated.
||IP was not whitelisted. API call rejected.
||Set throughput exceeded for this API action. API call rejected.
||Phone number is blacklisted. API call rejected.
||Account has reached the API request limit.
||The ‘campaignref’ is required
||The ‘mobile’ is required.
||The ‘campaignid’ is required.
||Could not unsubscribe this number.
Key Term Definitions:
||This is the name of the function you want to execute with the API.
||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.
||The ID(integer) of the campaign to which the user will be subscribed.
||Depending on your API settings, you may be required to subscribe users into a campaign first before sending them messages. If you are required to subscribe a user first, then a valid Campaign Reference is required. This would be the campaign reference ID (string) to which the user is subscribed.
||A Phone Number used inside the ‘subscribe’/’unsubscribe’ function.
||A mobile owner will be notified about being subscribed/unsubscribed via a confirmation SMS (yes/no).