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 guide covers the creation of a SmartFlow that you can execute from an external business system. For more details, check out the Trigger a Flow page.
Prerequisites
- An IntelePeer account.
- cURL or Postman to test the API Endpoint (Optional).
Creating Your SmartFlow
- Log in to your account through the 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 select New Flow.
- Add an Inbound API trigger to your flow.
- Add additional actions and logic to create your automation.
- Save and Deploy your flow.
- Note the Flow ID. This value is needed later.
Executing Your SmartFlow
Configure your external system to execute the SmartFlows API.
URL: https://api.intelepeer.com/_rest/v4/sfgen/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 SmartFlow identifier found in the Details section of the Configurations Panel. |
ANI | STRING | Required | An e164 format number used as the destination number in outbound communications in your flow (for example, +17205551212). |
DNIS | STRING | Required | An e164 format number used as the source number (for example, caller ID) in outbound communications in your flow (for example, +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 are 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://api.intelepeer.com/_rest/v4/sfgen/apitriggers