Website form to AI call in 60 seconds
When someone fills in your website form, your AI agent rings them within a minute, already knowing their name and what they asked about.
Before you start
- A live key with calls:write and agents:read, kept on your server, never in the page.
- API access is on Growth and above. Without it every request answers 402, and the key works again once the plan includes it.
How it works
Someone fills in your website form and your AI agent rings them within a minute, already knowing their name and what they asked about.
Once, look up the id of the agent that should call.
GET /api/v1/agentsWhen the form is sent, your server places the call with the person's name and what they asked about. The number becomes a contact, and the values fill {interest} and any other variable in your agent's script.
POST /api/calls/dialSend an Idempotency-Key made from the form's own id, so a double submit never rings twice.
When the call ends, the outcome and what it captured arrive at your webhook.
call.completed
await fetch("https://aicallstudio.com/api/calls/dial", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.AICALLSTUDIO_KEY,
"Content-Type": "application/json",
"Idempotency-Key": "form-" + form.id,
},
body: JSON.stringify({
phone: form.mobile, // 10 digits, e.g. "9876543210"
agent_id: process.env.AGENT_ID,
name: form.name,
variables: { interest: form.interest, city: form.city },
}),
});Why call from my server and not from the form?
Because the key would be in the page for anyone to copy. The form posts to your server; your server places the call. Use the form entry's own id as the Idempotency-Key, so a double submit never rings twice.
Do I need code at all?
Not if your forms reach us another way: your own web forms and lead sources can start a New Contact workflow that calls at once, set up on Workflows. This recipe is for a form on your own site that should call through the API.
Costs and what to watch
- Every call the API places is a real call to a real person, billed from your wallet like any other call, at your plan's rates. Try it on your own number first.
- Calls are placed only inside your calling hours. A form sent at night is refused, not queued: book a call-back for the morning instead.
More use cases
- EMI reminder calls with promise-to-pay back into your LMS
- Missed call to WhatsApp and an AI call back
- New CRM lead to AI call
EMI reminder calls with promise-to-pay back into your LMS
Each morning your loan system sends the EMIs due; the AI calls each borrower with their own amount and date, and each promise to pay goes back to your LMS.
Read more →Missed call to WhatsApp and an AI call back
A customer rings while every line is busy or after hours: they get a WhatsApp at once, and an AI call back at a time that suits.
Read more →New CRM lead to AI call
A lead created in your CRM is rung by your AI agent within a minute, and the call's outcome is written back to that lead.
Read more →