Edge Functions Overview
All edge functions are deployed as Supabase Edge Functions (Deno/TypeScript). Unless noted otherwise, they require a Supabase JWT Bearer token and are scoped to the authenticated user's agency.
Agent Management
| Function | Method | Description |
|---|---|---|
agents-create | POST | Create a new agent in Ultravox with local mapping |
agents-list | GET | List all agents with Ultravox data merged with local mappings |
agents-get | GET | Get a single agent with stats and phone number assignments |
agents-update | PUT | Update agent configuration in Ultravox and local DB |
agents-delete | DELETE | Delete an agent from Ultravox and remove local mapping |
agents-assign | POST | Assign agents to clients and campaigns (batch support) |
agents-sync | POST | Sync agents between local DB and Ultravox |
Phone Number Management
| Function | Method | Description |
|---|---|---|
phone-numbers-search | GET | Search available phone numbers on Telnyx |
phone-numbers-purchase | POST | Purchase a phone number via Telnyx |
phone-numbers-list | GET | List agency phone numbers with filtering and stats |
phone-numbers-assign | POST/PATCH/DELETE | Assign or unassign phone numbers to agents |
phone-numbers-release | DELETE | Permanently release a phone number from Telnyx |
Telephony Integration
| Function | Method | Description |
|---|---|---|
provision-telephony | POST | Full provisioning: create Telnyx app, outbound profile, import to Ultravox |
import-telnyx-to-ultravox | POST | Retry failed Ultravox import after Telnyx provisioning |
verify-telephony-config | GET | Verify Telnyx configuration in Ultravox |
Tool Management
| Function | Method | Description |
|---|---|---|
tools-list | GET | List tools with filtering by type/category |
tools-get | GET | Get a single tool by ID with optional refresh |
tools-sync | POST | Sync all tools from Ultravox to local DB |
Voice Management
| Function | Method | Description |
|---|---|---|
voices-list | GET | List cached voices (no API key needed) |
voices-sync | POST | Sync voices from Ultravox to local cache |
API Key Validation & Storage
| Function | Method | Description |
|---|---|---|
validate-ultravox-key | POST | Validate an Ultravox API key |
validate-telnyx-key | POST | Validate a Telnyx API key |
save-ultravox-integration | POST | Store encrypted Ultravox API key |
store-telnyx-credentials | POST | Store encrypted Telnyx credentials |
Historical Data Sync
| Function | Method | Description |
|---|---|---|
start-historical-sync | POST | Initiate a historical call sync job |
process-historical-sync | POST | Process sync jobs in batches (cron) |
cancel-historical-sync | POST | Cancel pending/in-progress sync jobs |
Call Processing
| Function | Method | Description |
|---|---|---|
get-call-recording | GET | Get call recording URL from Ultravox |
process-enrichment-queue | POST | Fetch transcripts and run AI analysis (cron) |
process-webhook-queue | POST | Process queued webhook events (cron) |
Integration & Status
| Function | Method | Description |
|---|---|---|
get-integration-status | GET | Show integration status with next steps |
get-sync-status | GET | Get active/recent sync job status |
get-ultravox-agents | GET | Fetch all Ultravox agents for manual mapping |
Configuration & Aggregation
| Function | Method | Description |
|---|---|---|
save-agent-mapping | POST | Save agent-to-client/campaign mappings |
refresh-aggregations | POST | Refresh daily stats for last 7 days (cron) |
Webhook
| Function | Method | Description |
|---|---|---|
webhook-ingest | POST | Receive and queue Ultravox webhook events |