Developer use case

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.

All use cases

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.

  • Permission calls:write
  • Permission agents:read
  • Event call.completed
  • Event lead.captured
  • Places billed calls
  1. Once, look up the id of the agent that should call. GET /api/v1/agents

  2. When 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/dial

  3. Send an Idempotency-Key made from the form's own id, so a double submit never rings twice.

  4. When the call ends, the outcome and what it captured arrive at your webhook. call.completed

Your server, when the form is sent (Node)
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.

Put AI Call Studio on your phone lines.

Book a 30-minute walkthrough, or call us right now: +91 922 222 1378