AgenticUniverse - Previously Formi
  1. Connection Configuration
AgenticUniverse - Previously Formi
  • Our Technical Note
    • Why Open AI is not Enough
    • How business Outcomes would Change Radically with AgenticUniverse
    • Our Research
      • STT - Nuances and Insights
      • Solving for STT Constraints
  • Generate Token
    • Login/Generate Token
      POST
  • Agent Configuration
    • Model Configuration
      • Configuration Helpers
        • Supported Providers
        • Supported Models
        • Supported Parameters
      • Get Model Configuration
      • Set Model Configuration
    • State Machine
      • Edge
        • Legacy
          • Create Edge
          • Edge Details
          • Update Edge
          • Delete Edge
        • Update edge properties
        • Get edge details
        • Delete an edge
        • Create an edge (transition) between two states
      • State
        • Create State from Template
        • Get State Information
        • Update State
        • Delete State
      • Get State Machine Structure
    • Prompt Templates
      • Get All Templates
      • Render Template
    • Tools
      • Get Tools List
      • Add Tool
      • Update Tool
      • Delete Tool
    • Get All Agents
      GET
    • Single Agent Details
      GET
    • Create Agent
      POST
    • Update Agent Details
      PUT
    • Enable Dashboard For An Outlet
      POST
    • Disable Dashboard For An Outlet
      POST
    • Get Call queue Sheet ID
      GET
  • Interactions
    • Pre-Interaction Context
      • Schedule an Interaction
      • Update an Interaction Id
      • Delete an Interaction Id
      • Clear all interactions
      • Get Summarized Interaction Info
    • Interaction Modalities
      • Video
        • Generation
          • Generate Welcome Video
      • Text
        • Start Interaction
        • Create Response
        • End Interaction
      • Voice
        • Connection Configuration
          • Quickstart
          • Connecting Twilio
          • Connecting Exotel
          • Formi WebSocket Configuration Guide
          • Create a New Connection Vendor
            POST
          • Get All Connection Vendors
            GET
          • Update a Connection Vendor
            PUT
          • Delete a Connection Vendor
            DELETE
          • Get Agent's Connection Config
            GET
          • Add or Update Agent's Connection Config
            POST
    • Post Interaction Configuration
      • Email Destination Configuration
      • Variables CRUD
        • Get all required variables for the outlet with map
        • Modify variable definition for outlet
        • Add a new variable for the outlet
        • DELETE variable for outlet
        • Connect Variable to a destination
      • Destinations CRUD
        • Get all destinations for the outlet
        • Modify Destination for outlet
        • Add a new Destination for the outlet
        • DELETE Destinations for outlet
    • Get Interaction Summary
      GET
    • Resolve an Escalated Interaction
      POST
    • Get the Interaction list
      GET
    • Get Information regarding Single Interaction
      GET
  • Agent Utilisation
    • Get Credits Available
    • Interaction Utilisation
    • Model Utilisation
  • Webhooks
    • Get webhook URL
    • Update webhook URL
    • Get webhook metadata
    • Modify webhook metadata
    • Get reservation ingestion metadata
  • Untitled Endpoint
    POST
  1. Connection Configuration

Connecting Twilio

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#

Active Twilio account
Twilio Account SID and Auth Token
Active Twilio phone number (purchased or mapped)
Formi agent configuration for twilio is already setup for the Agent ID using Agent Connection Configuration Endpoint

Required Twilio Credentials#

Essential Information Needed#

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 Webhook Support
Twilio's webhook support interface - Configure your webhooks here

Setup 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

Step 2: Configure Phone Number#

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

Step 3: Configure Inbound Call Routing#

For inbound calls, you need to configure your Twilio phone number to route directly to Formi.
Twilio Phone Number Configuration
Phone number configuration for inbound call routing to Formi

API Endpoint#

Formi WebSocket Endpoint for Twilio#

GET https://api-2.formi.co.in/twilio-formi-live/{call_type}/{agent_id}/{outlet_id}

Parameters#

ParameterTypeDescription
call_typestringType of call (inbound/outbound)
agent_idstringUnique identifier for the Formi agent
outlet_idstringUnique identifier for the outlet

Parameter Details#

Agent ID
Obtained from Agent Creation APIs
Available through any downstream APIs linked to the Formi Agent
Used to identify which agent handles the call
Outlet ID
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}
HTTP Method: GET
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#

Twilio Help Center - Phone Number Configuration via webhook
Twilio REST API for triggering calls programmatically
Modified at 2025-07-12 11:52:35
Previous
Quickstart
Next
Connecting Exotel
Built with