Overview#
This guide explains how to configure Twilio with Formi WebSocket integration for voice calls. Twilio's built-in webhook support makes it straightforward to connect your Twilio phone numbers to Formi's real-time voice processing capabilities.Prerequisites#
Twilio Account SID and Auth Token
Active Twilio phone number (purchased or mapped)
Required Twilio Credentials#
1.
Account SID - Your unique Twilio account identifier
2.
Auth Token - Authentication token for API access
3.
Active Twilio Number - Either purchase a new number or map an existing one

Twilio's webhook support interface - Configure your webhooks hereSetup Process#
Step 1: Obtain Twilio Credentials#
1.
Log into your Twilio Console
2.
Navigate to Account Settings
3.
Copy your Account SID and Auth Token
4.
Keep these credentials secure as they provide full account access
You have two options for phone number setup:Option A: Purchase New Number#
Buy a number directly from Twilio's service
Configure it immediately for Formi integration
Option B: Map Existing Number#
Map an already existing phone number to the Formi endpoint
Ensure the number is active and properly configured
For inbound calls, you need to configure your Twilio phone number to route directly to Formi.
Phone number configuration for inbound call routing to FormiAPI Endpoint#
GET https://api-2.formi.co.in/twilio-formi-live/{call_type}/{agent_id}/{outlet_id}
Parameters#
Parameter | Type | Description |
---|
call_type | string | Type of call (inbound/outbound) |
agent_id | string | Unique identifier for the Formi agent |
outlet_id | string | Unique identifier for the outlet |
Parameter Details#
Obtained from Agent Creation APIs
Available through any downstream APIs linked to the Formi Agent
Used to identify which agent handles the call
Currently provided directly through Formi
Future Update: Will switch to using Formi auth token for authentication
Configuration Steps#
1. Webhook Configuration in Twilio#
1.
Access your Twilio Console
2.
Navigate to Phone Numbers
→ Manage
→ Active Numbers
3.
Select the number you want to configure
4.
In the Voice Configuration
section, set:Webhook URL: https://api-2.formi.co.in/twilio-formi-live/{call_type}/{agent_id}/{outlet_id}
Replace {call_type}
, {agent_id}
, and {outlet_id}
with actual values
2. Inbound Call Setup#
For inbound calls specifically:https://api-2.formi.co.in/twilio-formi-live/inbound/{your_agent_id}/{your_outlet_id}
3. Outbound Call Setup#
For outbound calls:
There is no direct need for setup of webhooks , Twilio API supports direct API Calls without any preloaded configuration for a phone number.You can use Twilio REST API for triggering Outbound Calls but this won't support Formi Webhooks. For Enabling Formi Events, use Schedule API to trigger calls References#
Modified at 2025-07-12 11:52:35