Custom Functions & API Endpoints

Connect voice agents to external APIs. Define functions, URLs, and headers for real-time data and actions.

Extend your AI agents' capabilities by configuring custom REST functions. Define function names, request types (GET, POST, etc.), endpoints, and authentication headers. Allow agents to fetch data, trigger actions, and interact with your systems dynamically during conversations.

portal.voiceinfra.ai
Custom Functions & API Endpoints● Running
Connect voice agents to external APIs. Define functions, URLs, and headers for real-time data and actions.
fn: lookup_policy(policy_id=AX-991)
200 OK: {coverage: "full", premium: 148}
fn: send_quote(email=jane@acme.co)
202 Accepted: email queued
Custom codeAny external APIRuns mid-call
Key Highlights

What Makes This Feature Special

Discover the powerful capabilities that drive real business results

REST API Integration

Connect your voice agents to any external API endpoint. Define exactly how the LLM should understand and use each function for seamless data retrieval.

Flexible Request Types

Support for GET, POST, and asynchronous operations. Choose the method that fits your use case from simple data lookups to complex background processing.

Dynamic URL Parameters

Use path parameter placeholders (e.g., /users/{id}) to pass dynamic data. Agents can fetch specific records based on caller input or context.

Secure Header Management

Add custom headers to requests, including authentication tokens and API keys. Keep your endpoints secure while allowing agents to access protected data.

Pre-Call, During-Call & Post-Call Phases

Every function carries an execution phase. During-Call functions run as agent tools mid-conversation. Pre-Call functions run before the call starts and their response is injected straight into the agent's system context. Post-Call functions run once the call has ended, with the transcript and summary available to them.

Phase-Aware Placeholders

Pre-Call functions receive call placeholders such as {{from_number}}, {{to_number}}, {{call_type}} and {{call_id}}. Post-Call functions receive {{summary}}, {{transcript}} and {{call_duration}}. Your endpoint gets real call data without the agent having to pass it explicitly.

How It Works

Get started with this feature in a few simple steps

Everything you need to transform your voice operations from start to finish

Function Configurations Dashboard
Step 01

Manage All Your Functions & Integrations

The Function Configurations dashboard lists every custom API function you've built alongside your connected integrations, including Cal.com, Calendly, Google, and Microsoft 365. Select any function to view or edit its details, or create a new one with a single click.

  • All custom functions listed with method and description
  • Connected integrations (Cal.com, Calendly, Google, Microsoft 365)
  • Select any function to view or edit details
  • Create new functions from the same view
Function Template Picker
Step 02

Start From a Template or Build From Scratch

When creating a new function, pick from ready-made templates: Basic REST API, POST Request with Body, Twilio Send SMS, Mailjet Send Email, Geocode Location, and more, or start from scratch. Import from a cURL command for fastest setup.

  • Templates for REST API, SMS, email, weather, and more
  • Filter by General, Communication, Productivity, CRM
  • Import directly from a cURL command
  • Start from scratch for fully custom functions
Endless Possibilities
Scale your voice operations without limits
Benefits

Transform Your Business

Discover the measurable impact and advantages that drive real business growth

Enable real-time data retrieval during calls

Trigger actions in external systems automatically

Secure authentication via custom headers

Flexible request types (GET, POST, Async)

Dynamic URL parameters for specific queries

LLM-optimized descriptions for better intent matching

Manage multiple function configurations easily

Extend agent capabilities without code changes

Run logic before the call starts and after it ends

Pre-Call responses become agent context automatically

Post-Call functions receive the transcript and summary

Assign an execution phase to every function from one place

Solutions

Industry Solutions

Discover how this feature powers tailored solutions across industries

AI Tech Startup, Software & Cloud Automation 24/7 Support & Sales

Build a Voice AI agent for your tech company. Handle support tickets, sales inquiries, and customer onboarding around the clock.

Explore Solution

AI Phone System for SaaS Companies 24/7 Customer Support & Technical Assistance

Build a Voice AI agent for your SaaS business. Handle customer support, technical troubleshooting, and onboarding around the clock.

Explore Solution

AI Phone System for Engineering & IT Consulting 24/7 Project Support & Lead Qualification

Build a Voice AI agent for your engineering or IT consulting firm. Handle project inquiries, technical support, and lead qualification around the clock.

Explore Solution
Customer Success

See How Our Customers Use This

Real businesses getting real results with this feature. Read their stories.

How a UAE Business Advisory Firm Automated Lead Follow-Up with AI Voice Agents

A UAE-based company formation and business advisory firm deployed multiple VoiceInfra AI agents to call social media leads instantly, with Zoho CRM integration triggering calls and updating lead records automatically

Read Success Story

How an AI-Native Dubai Real Estate Brokerage Runs 5 Voice AI Agents on Yeastar and Zoho CRM

An AI-native real estate brokerage in Dubai built 5 autonomous AI voice agents for lead generation, follow-up, marketing lead qualification, property portal inquiry matching, and recruitment

Read Success Story
GOT QUESTIONS?

Still have questions about Custom Functions & API Endpoints? Just ask.

The people who built this feature answer every question in plain English. Want to see it running on your own setup instead? Tick the box and we'll include a live demo.

  • Answered by the people who built it
  • Live demo on your setup, if you want one
  • A reply within one business day
No spam. Your question, our answer. That's it.
Technical Excellence

Technical Specifications

Enterprise-grade infrastructure built for reliability and scale

REST API

Connect to any endpoint

Request Types

GET, POST, Async

Dynamic Params

Path parameter placeholders

Secure Headers

Auth tokens & API keys

FAQ

Frequently Asked Questions

Find answers to common questions about this feature

A custom function is a configuration that allows your AI agent to call an external API. You define the function name, URL, request type, and headers. The agent uses this to fetch data or trigger actions during conversations.

Use the Request Headers section to add authentication tokens, API keys, or other security credentials. These headers are sent with every request to verify the agent's identity.

You can configure GET, POST, and asynchronous requests. GET is used for data retrieval, POST for submitting data, and Async for long-running operations that don't need immediate responses.

Yes. Use path parameter placeholders like {id} or {order_number} in your URL. The AI will replace these with actual values from the conversation context.

You provide a description (10-500 characters) that explains what the function does and when it should be used. The LLM reads this description to decide when to call the function during a conversation.

Function names must be between 5 and 100 characters, using alphanumeric characters and underscores (e.g., new_rest_function). This name helps the LLM identify the function internally.

Yes. After configuring a function, you can test it using the platform's testing tools. Verify the URL, headers, and response format before assigning it to an agent.

There is no strict limit on the number of functions. You can create as many as needed for your use cases. Manage them easily from the Function Configurations dashboard.

The AI agent will receive the error response and can handle it gracefully. It may inform the caller of the issue, retry the request, or escalate to a human agent depending on your configuration.

Yes. Custom functions are provider-agnostic. They work with any LLM provider supported by the platform, including OpenAI, Anthropic, and others.

A phase tells the platform when a function should run. During-Call functions are exposed to the agent as tools it can call mid-conversation. Pre-Call functions run once before the call starts, and their response is injected into the agent's system context so the agent begins the call already informed. Post-Call functions run once after the call ends, with the transcript and summary available.

Anything that should already be known before the agent speaks: looking up the caller in your CRM, checking account status or outstanding balance, retrieving the last interaction, or deciding which script to load. Because the response lands in the system context, the agent can reference it naturally from the first sentence instead of spending call time fetching it.

Post-Call functions run after the call ends and can use placeholders such as {{summary}}, {{transcript}} and {{call_duration}}. That makes them the natural place for writing notes back to a CRM, triggering a follow-up task, sending a survey, or pushing the outcome into a data warehouse.

Pre-Call functions run before the agent is involved, so they use constant parameter values with call placeholders such as {{from_number}}, {{to_number}}, {{call_type}} and {{call_id}}.

Phases are assigned per function, so the same endpoint can be configured as two separate functions with different phases and different parameters. On workflow agents, Pre-Call and Post-Call functions are attached to the Call Settings node under a Call Lifecycle card, while During-Call functions are available from tool nodes.
Platform Features

Continue Exploring VoiceInfra

Discover more ways VoiceInfra can transform your voice AI experience

Multilingual 30+ Languages

Break language barriers with AI that understands 30+ languages instantly. VoiceInfra connects you to leading transcription engines (ElevenLabs, OpenAI, Cartesia, Deepgram, Groq, Speechmatics, Hamsa) so you get the best accuracy for every accent and dialect. Your agents respond naturally, no matter where your customers call from.

Explore Feature

Version Control & Rollback

Editing a live AI agent is nerve-wracking when the change goes straight to production. VoiceInfra separates draft from live: you edit freely, see exactly what will change, and choose when it becomes what callers actually hear. Every publish is kept as a version you can inspect, preview in read-only mode, and roll back to. Diffs include not just the agent's own settings but its attachments: the functions, MCP servers and knowledge documents it depends on. Nothing changes silently. Auto-saved work becomes a version too, meaning even an accidental edit is recoverable.

Explore Feature

Dynamic Outbound Call API

Access your AI assistant via API to programmatically initiate outbound calls with dynamic payload customization. Leverage all configured settings while maintaining complete control over call parameters, recipient targeting, and conversation flow through our RESTful API interface.

Explore Feature

Ready to transform your operations?

Contact our sales team to see how the platform works for your industry.