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. You may not import via CSV someone who has unsubscribed themselves from a campaign however you may re-subscribe someone who has unsubscribed through this API.
Request: XML
<REQUEST>
<ACTION>subscribe</ACTION>
<API_KEY>YourApiKey</API_KEY>
<CAMPAIGNREF>CampaignReferenceID</CAMPAIGNREF>
<MOBILE>Phone Number to subscribe</MOBILE>
<DATA>
<FIRST_NAME>First Name</FIRST_NAME>
<LAST_NAME>Last Name</LAST_NAME>
<GENDER>Gender</GENDER>
...
</DATA>
<TIMEZONE>Timezone abbreviation: EST, CST, MST, PST, etc.</TIMEZONE>
</REQUEST>
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.
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 subscribe the number to. You generated the campaignRef when you created the Campaign.
MOBILE
Mandatory
A Phone Number to subscribe to a campaign.
DATA
Optional
Additional data about the subscriber which can be used within future messaging.
TIMEZONE
Optional
A time zone abbreviation associated with the phone number.
Response Parameters:
Param Name
Presence
Description
STATUS
Always
“Success” or “Failure”.
CAMPAIGNREF
Always
This is the identifier of the Campaign you would like to subscribe the number to. You generated the campaignRef when you created the Campaign.
Upon subscribing a number successfully through any channel, the system will generate a notification. For more details please visit the Mobile Subscribe 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.