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
  1. Log in to your Atmosphere account through the IntelePeer CPaaS Portal (https://atmosphere.intelepeer.com).
  2. Select SmartFlows from the menu at the top of the page.

3.  Create a new SmartFlow using the blue plus sign button and selecting New Flow.

4.  Add an INBOUND API trigger to your flow.

5.  Add additional actions and logic to create your automation.

6.  Click Save and Deploy your flow.

7.  Note the Flow ID. This value will be needed.

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
  • 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