Initiate an outbound Vapi AI voice agent call, pass dynamic variables to the assistant, and handle function-call webhooks mid-call

domain: api.vapi.ai · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create or retrieve an assistant configuration via POST /assistant with model, voice, firstMessage, and a functions array describing callable tools the agent can invoke during a call
  2. Initiate an outbound call via POST /call/phone with assistantId (or inline assistantOverrides), phoneNumberId, and the customer's phoneNumber in the request body
  3. Include a variableValues map in the request body to inject dynamic data (customer name, order number, account details) into the assistant's system prompt at call time
  4. Expose a public HTTPS endpoint to receive function-call webhook payloads — when the agent calls a defined function, Vapi POSTs the call ID, function name, and arguments to your serverEndpoint URL
  5. Respond to the webhook within the timeout window with a result object so Vapi can relay the data back to the agent's LLM context and continue the conversation
  6. Retrieve call metadata and transcript via GET /call/{callId} after the call ends to store results in your CRM

Known gotchas

Related routes

Upsert Intercom contacts, start conversations, and configure Fin AI agent handoff to human support via the Intercom REST API
developers.intercom.com/docs/references/rest-api · 6 steps · unrated
Control a Vonage Voice API call using NCCO actions returned from the answer_url webhook.
developer.vonage.com · 5 steps · unrated
Call the Home Assistant WebSocket API to subscribe to state change events and trigger services programmatically
home-assistant.io · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans