API DOCUMENTATION Last Update: Apr 2022

SMS Templates - Add Service Provider Credentials

Allows you to add a the SMS Service Provider credentials to an existing loyalty account.

 

The data to be submitted to the API is composed of the following fields:

 

Fields common to all campaign types:

  field   Example   Note
API 1.5 Required
user_id john1970 Required
user_api_key 1959caadac9b13dcb3 Required
type manage_sms_templates Required
action new Required
account_id greatwidgets Required
sms_service_id 1 Required
twilio_account_sid AC8dd572402b9795200ddd2185ea3ec368 Required
auth_token 09f36e9a8e69e3488d761a6a4d2d9664 Required
phone_numbre +18646574216 Required
Output Format:
output JSON or XML Optional. If not provided, defaults to XML
callback someFunctionName Optional: JSONP format
condensed yes Optional (No white space)
Applies only to JSON(P) output

 

Notes:

  • Parameters to add in this API call may vary from each Service Provider. In this example the parameter "twilio_account_sid" is unique to Twilio.

Example PHP Request:

If you are using PHP, the $data array would look like this:

  1. $data['API'] = '1.5';
  2. $data['user_id'] = 'john1970';
  3. $data['user_api_key'] = '1959caadac9b13dcb3';
  4. $data['account_id'] = 'greatwidgets';
  5. $data['type'] = 'manage_sms_templates';
  6. $data['action'] = 'new';
  7. $data['sms_service_id'] = '1';
  8. $data['twilio_account_sid'] = 'AC8dd572402b9795200ddd2185ea3ec368';
  9. $data['auth_token'] = '09f36e9a8e69e3488d761a6a4d2d9664';
  10. $data['phone_number'] = '+18646574216';

 

Success XML Response:

  1. <response status="success">
  2. </response>

 

Error XML Response:

  1. <response status="error">
  2. <error>Error message</error>
  3. </response>