Getting a 400 Bad Request error when calling vapi....
# support
a
Getting a 400 Bad Request error when calling vapi.start() with workflow ID 670eff28-4ad6-4c4a-80e7-33365ee3c980 using the Web SDK v2.5.0. The POST request to https://api.vapi.ai/call/web fails immediately, indicating the payload/request body format is incorrect or missing required fields. Using valid public API key cd167722-889a-4de1-acfe-57ac01150ea0 and passing variables: {role, type, level, techstack, amount, username, userid}. The workflow has Introduction, apiRequest, and Conversation nodes with matching variables defined. Need clarification on the correct payload structure for the /call/web endpoint when starting a workflow with variable values. this is the code for the agent.tsx file
l
This error usually means the payload structure or variable names don’t match the workflow schema. Check that all variables in your workflow (like role, type, techstack, amount, username, userId) are passed exactly as defined — both name and data type. Also ensure the API key and workflow ID are valid. Try logging the request body before sending to confirm no undefined or missing fields.
c
Could you please provide the payload for the POST request?
2 Views