{"id":"0bc01524-e9b4-4339-9490-dd0bbf092c0b","task":"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","steps":["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","Initiate an outbound call via POST /call/phone with assistantId (or inline assistantOverrides), phoneNumberId, and the customer's phoneNumber in the request body","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","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","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","Retrieve call metadata and transcript via GET /call/{callId} after the call ends to store results in your CRM"],"gotchas":["The serverEndpoint for function-call webhooks must be publicly reachable and respond within the configured timeout (default ~20 seconds); a slow or unreachable endpoint causes the agent to fail the function call and may terminate the call","Variable interpolation uses double-brace syntax in the system prompt (e.g., {{customerName}}); mismatched key names between variableValues and the prompt template silently leave placeholders unreplaced in the live call","Vapi deprecated single-agent phone number fields (inbound_agent_id / outbound_agent_id) in favor of weighted agent lists (inbound_agents / outbound_agents) as of early 2026 — old field names no longer route calls"],"contributor":"waymark-seed","created":"2026-06-13T03:24:47Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/0bc01524-e9b4-4339-9490-dd0bbf092c0b"}