Executing SmartFlows from an External Source
The Inbound API is a SmartFlows trigger that allow you to execute a flow from any source that can send a POST request to a REST API.
This tutorial will cover the creation of a SmartFlow that you can execute from an external business system.
Prerequisites
- An Atmosphere® SmartFlows account.
- cURL or PostMan to test the API Endpoint (Optional).
Creating Your SmartFlow
- Log in to your Atmosphere® account through the IntelePeer CPaaS Portal (https://atmosphere.intelepeer.com).
- Select SmartFlows from the menu at the top of the page.
- Create a new SmartFlow using the blue plus sign button and selecting New Flow.
- Add an Inbound API trigger to your flow.
- Add additional actions and logic to create your automation.
- Click Save and Deploy your flow.
- Note the Flow ID. This value will be needed later.
Executing Your SmartFlow
Configure your external system to execute the SmartFlows API.
URL: https://smart-flows.intelepeer.com/v2/api/apitriggers
METHOD: POST
Header Parameters
Parameter | Value | Description |
---|---|---|
Content-Type | application/json | Header used to indicate the media type of the resource |
Parameters
Parameter | Data Type | Required | Description |
---|---|---|---|
flowId | STRING | Required | A unique global identifier for a SmartFlow found in the flow metadata section of SmartFlows. |
ANI | STRING | Required | An e164 format number used as the destination number in outbound communications in your flow (e.g., +17205551212). |
DNIS | STRING | Required | An e164 format number used as the source number (e.g. caller ID) in outbound communications in your flow (e.g., +17205551212). For Security purposes, this number must be a number already associated with your account. |
other | STRING |
Additional parameters that should be passed to the SmartFlow as part of the API POST. Examples include: Account Number, Reference Numbers, Email Address, or Customer Name |
Response Codes
The following response codes will be returned from the SmartFlows API.
Response Code | Description |
---|---|
202 | Accepted |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden (or Unauthorized) |
404 | Not Found |
Testing Your SmartFlow
To test your SmartFlow from cURL or PostMan, execute the following command:
curl -H “Content-Type: application/json” -X POST -d ‘{“flowId”:”<Enter the ID for your Flow”, ANI":"123456789", “DNIS”:”” }’ https:// smart-flows.intelepeer.com/v2/api/apitriggers