How do I connect an AI voice agent to my own system or API?
You connect an AI voice agent to your own system with Outpero's opt-in custom API action, which lets the agent call an endpoint you define during the conversation, for example to check an order, fetch a due amount or create a booking. Your developer exposes the endpoint, and you tell the agent in its brief when to use it.
When you need it
Most set-ups never need custom code: leads arrive by webhook, results leave by webhook, and booking, spreadsheets and WhatsApp are built-in actions. The custom API action is for cases where the agent must know something only your system holds, at the moment the caller asks.
- —An NBFC checking the exact EMI due and late charge on a loan account.
- —A logistics company fetching the current status for an AWB number.
- —A hospital booking into its own HMS rather than a calendar.
- —A broadband provider checking whether a pincode is serviceable.
How it works
- 01Your developer builds or exposes an HTTPS endpoint that takes a small input, such as a phone number or order ID, and returns a small JSON response.
- 02You add that endpoint as a custom API action on the AI employee, describing what it does and what inputs it needs.
- 03In the brief, you say when to call it, such as 'when the customer asks about delivery, look up the order'.
- 04During the call, the agent sends the request, reads the response and answers in plain language.
Design rules for the endpoint
- —Fast. Every second the API takes is a second of silence on the phone, on top of the 0.8 to 1.3 seconds on average the agent already needs to reply. Aim for well under a second.
- —Small. Return only the fields the agent needs, already formatted for speech, such as '₹4,250 due on 5 November'.
- —Safe. Use an API key, accept only the operations the agent needs, and never expose bulk data.
- —Predictable. Return clear error states so the agent can say the order could not be found instead of guessing.
Testing
Test the endpoint on its own first, then through calls where the data exists, where it does not, and where the API is down. Read transcripts to confirm the agent never invents a number when a lookup fails. This is where most hallucination risk sits in a connected agent, and good error responses remove much of it.
Webhook versus API action
The post-call webhook pushes results after the conversation. The custom API action pulls or pushes data during it. Many integrations use both: the API action for live lookups, the webhook for logging.
Want to hear an AI voice agent handle this on a real call?
Follow-up questions
Is this the same as function calling?
+
Broadly, yes. Function calling is the general technique by which a language model decides to call a defined tool with structured inputs and then uses the result. Outpero's custom API action applies that idea to phone calls: you define the endpoint and when to use it, and the agent invokes it mid-conversation instead of guessing the answer.
