How do I use the SMS API module?

You can use the API module in the SMS builder to make an API call to your service in real time.

Settings

GET: Sends values in a HTTP GET as parameters.

POST: Posts JSON structured object to your HTTP(s) service. Expected Json response HTTP 200 with the following Json:

  • response: string 'true | false'
  • optional key/value parameters: String values holding data to be used in your SMS response messages
  • key/values need to be set in "API Response Bindings" section of the API Module

API Endpoint

  • Endpoint URL: Your http(s) used to send data to.
  • Username/Password (optional): Sets the username/password as HTTP basic authentication.

API request bindings

  • Binds Variables | transaction data | static values to the HTTP request.
  • Sets key/value in "parameters" section of the request detail.

API response bindings

  • Your key/values.
  • New variables to hold response data can be set in "Assets" --> "Variables" section of the SMS builder (left hand side of the canvas).

POST Content Overview

Key
Description
event
event type": Received
service
service type: SMS
description
string: Holds further description information about the event.
timestamp
string: UTC datetime of the event
detail
JSON.
- Hold the inbound SMS detail information plus any "parameters" set in the SMS API Module

Keys:
messageText: Content of the inbound SMS message
destination: Your inbound SMS number attached to the SMS template
callerId: The originators Caller Identification ( Mobile number)
parameters: Holds the key/value bindings you set in your API Module

Sample Upwire to "your Service" JSON POST

{
 "event": "Received", 
 "service": "SMS", 
 "description": ""
 "timestamp": "2016-08-09 23:19:37.569670", 
 "detail": 
     {
         "username": "[your account username]", 
         "status": "Received", 
         "messageText": "Yes", 
         "masterTemplateId": "XXXXX-5bca-e5b2-acfb-XXXXXX", 
         "parameters": {
                        "name1": "Shane0", 
                        "id1": "120"
                        }, 
         "callerId": "61421000000", 
         "templateName": "SMS-outbound-Survey sms 1", 
         "statusDescription": "", 
         "destination": "61481000000", 
         "jobnumberItem": "XXXXXXX-2168-47e9-84ff-XXXXXXX", 
         "dateCreated": "2016-08-09 23:19:33.598470", 
         "smsType": "inbound", 
         "parts": "1", 
         "templateId": "XXXXXX-68ba-89eb-2c96-XXXXXX", 
         "customReference": "None", 
         "callControl": "{'keyWordMatch': u'Yes', 'debug': ''}", 
         "dateModified": "2016-08-09 23:19:36.274040", 
         "destinationCountryCode": "AU", 
         "jobnumber": "31462305560001"
     } 
 }
D
David is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.