API Request Tool “Form has validation errors: body.type: Invalid literal value, expected 'object'”
Hi Vapi team,
I'm trying to set up an API Request tool for my assistant, but I keep getting this error immediately upon creation:
Form has validation errors:
body.type: Invalid literal value, expected "object"
This happens as soon as I create the tool – before I can configure anything. The error shows up even if I enter a valid URL and set the method to POST.
I understand that the Code section is not meant for manual editing, but it seems like the system doesn't generate the correct structure for body, which causes the validation to fail. As a result, I’m completely blocked from saving or using the API tool.
Details:
The issue occurs instantly when choosing “API Request” as the tool type.
It does not happen with Function tools.
I tested different browsers and devices – no change.
This prevents me from connecting Vapi to my n8n backend via webhooks. Could you please look into this or offer a workaround (e.g., importing JSON manually)?
Thanks a lot for your help!
Best regards,
Simon
I'm trying to set up an API Request tool for my assistant, but I keep getting this error immediately upon creation:
Form has validation errors:
body.type: Invalid literal value, expected "object"
This happens as soon as I create the tool – before I can configure anything. The error shows up even if I enter a valid URL and set the method to POST.
I understand that the Code section is not meant for manual editing, but it seems like the system doesn't generate the correct structure for body, which causes the validation to fail. As a result, I’m completely blocked from saving or using the API tool.
Details:
The issue occurs instantly when choosing “API Request” as the tool type.
It does not happen with Function tools.
I tested different browsers and devices – no change.
This prevents me from connecting Vapi to my n8n backend via webhooks. Could you please look into this or offer a workaround (e.g., importing JSON manually)?
Thanks a lot for your help!
Best regards,
Simon