This API will subscribe 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 you may re-subscribe someone who has unsubscribed through this API.
<REQUEST> <ACTION>subscribe</ACTION> <API_KEY>apiKey</API_KEY> <CAMPAIGNREF>Campaign Reference ID</CAMPAIGNREF> <SUBSCRIBERREF>Subscriber Reference ID</SUBSCRIBERREF> <MOBILE>Number to subscribe</MOBILE> <DATA> <FIRST_NAME>First Name</FIRST_NAME> <LAST_NAME>Last Name</LAST_NAME> <GENDER>Gender</GENDER> ... </DATA> <SPID>Carrier ID</SPID> <TIMEZONE>Timezone abbreviation: EST, CST, MST, PST, etc.</TIMEZONE> </REQUEST>
API_URL?action=subscribe &api_key=API key &campaignref=campaign reference ID &subscriberref=subscriber reference ID &mobile=number to subscribe &data_first_name=first name &data_last_name=last name &data_gender=gender ... &spid=carrier ID &timezone=timezone abbreviation: EST, CST, MST, PST, etc.
Click here for more timezone options. Note that the difference between standard and daylight time does not matter here. The system will use the current time offset for the geographic region.
Mandatory: action, api_key, campaignRef, mobile Optional: subscriberRef, data, spid, timezone
status, campaignRef, subscriberRef, mobile, errorcode, errorinfo
<REQUEST> <ACTION>subscribe</ACTION> <API_KEY>qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ</API_KEY> <CAMPAIGNREF>1116</CAMPAIGNREF> <SUBSCRIBERREF>ACCT-123232</SUBSCRIBERREF> <MOBILE>16502426055</MOBILE> <DATA> <FIRST_NAME>John</FIRST_NAME> <LAST_NAME>Smith</LAST_NAME> <AGE>29</AGE> <PET>Dog</PET> </DATA> </REQUEST>
https://secure.skycore.com/API/wxml/1.3/index.php?action=subscribe &api_key=qTFkykO9JTfahCOqJ0V2Wf5Cg1t8iWlZ &campaignref=1116 &subscriberref=ACCT-123232 &mobile=16502426055 &data_first_name=John &data_last_name=Smith &data_age=29 &data_pet=Dog
<RESPONSE> <STATUS>Success</STATUS> <CAMPAIGNREF>1116</CAMPAIGNREF> <SUBSCRIBERREF>ACCT-123232</SUBSCRIBERREF> <MOBILE>16502426055</MOBILE> </RESPONSE>
<RESPONSE> <STATUS>Failure</STATUS> <ERRORCODE>E721</ERRORCODE> <MOBILE>16502426055</MOBILE> <CAMPAIGNREF>1116</CAMPAIGNREF> <ERRORINFO>Invalid campaignref</ERRORINFO> </RESPONSE>
Upon subscribing a number the system will generate a notification. For more details please visit the Mobile Subscribe section of the Opt-in Status Postback documentation.