You can use the API module in the Voice 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 Module Settings:
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 canvas. (left hand side)
POST Content Overview
Key | Description |
username | |
password | service type: SMS |
key/value | key/value set in request Bindings of the API module |
Sample Upwire to "your Service" JSON POST
{ "username": "", "password": "", "id": "z123" }
Sample Response from your service
Key | Description |
response | REQUIRED: string: "true|false" |
key/value | key/value set in "response" Bindings of the API module |
{ "response":"true", "responseData:"123878" }