http://api.msgme.com/v1/subscribers/unsubscribe_subscriber
Post
Unsubscribes a subscriber from a keyword or a set of keywords.
| Parameter | Description |
|---|---|
| token | The security token that was returned using authentication_api method. |
| msidn | The 10-digit subscriber number. |
| keyword | Must be wrapped by the <keywords></keywords> element. This element specifies the subscription keyword to be unsubscribed from. |
| shortcode | A short code must be included with each keyword element. If the keyword is not associated with this short code, then the unsubscribe event will not happen. Default is 67463 if this parameter is not specified. |
POST http://api.msgme.com/v1/subscribers/unsubscribe_subscriber <?xml version="1.0" encoding="UTF-8"?> <apiRequest token="[token]"> <unsubscribeSubscriber> <subscriber msidn="[10-digit number]" /> <keywords> <keyword keywordId="[Msgme keyword ID]"></keyword> <keyword keywordId="[Msgme keyword ID]" shortcode="67463"></keyword> ... </keywords> </unsubscribeSubscriber> </apiRequest>
The response will return the subscriber information that was passed by the request. It will also include the unsubscribedDate attribute for future reference.
<?xml version="1.0" encoding="UTF-8"?> <apiResponse status="[status text]" statusCode="[status code]"> <subscriber subscriberId="[subscriber ID]" msidn="[10-digit number]" unsubscribedDate="[YYYYMMDD]"> </subscriber> </apiResponse>
REQUEST:
POST http://api.msgme.com/v1/subscribers/unsubscribe_subscriber <?xml version="1.0" encoding="UTF-8"?> <apiRequest token="0e9ace1582fbb754dfe7f4e11f572bf5273f3c69"> <unsubscribeSubscriber stopService="false"> <subscriber msidn="5551231234" /> <keywords> <keyword keywordId="12312" shortcode="67463"></keyword> <keyword keywordId="121212"></keyword> </keywords> </unsubscribeSubscriber> </apiRequest>
RESPONSE:
<?xml version="1.0" encoding="UTF-8"?> <apiResponse status="OK" statusCode="200"> <subscriber subscriberId="10030" msidn="5551231234" unsubscribedDate="20080919 12:10:12 PST"> </subscriber> </apiResponse>