optimistic-gold
optimistic-gold5mo ago

Unable to Save new API Request tool and update

Due to confusing validation unable to save a new API request tools and When trying to update an existing API request tool, It gives an error. When looking at the responses it gives responses as in the attached screen shot images.
No description
No description
No description
No description
6 Replies
Vapi
Vapi5mo ago
To resolve the "Body 'properties' must have at least one property" error, ensure your request body schema includes at least one property. For example, if you are configuring a POST request, your body schema should look like this:
{
"type": "object",
"properties": {
"exampleField": {
"type": "string",
"description": "A sample field"
}
},
"required": ["exampleField"]
}
{
"type": "object",
"properties": {
"exampleField": {
"type": "string",
"description": "A sample field"
}
},
"required": ["exampleField"]
}
Avoid using $ref in your schema, as it is not supported by Vapi's function calling integration with OpenAI, Anthropic, or Google. Try adding a simple property as shown above and save again. Sources: - Vapi API Request Node Documentation - Vapi Tool Calling Integration
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
Vapi
Vapi5mo ago
To resolve the "Body 'properties' must have at least one property" error, add at least one property to your request body schema. For example, you can add a dummy property if your API does not require a body:
{
"type": "object",
"properties": {
"dummy": { "type": "string" }
}
}
{
"type": "object",
"properties": {
"dummy": { "type": "string" }
}
}
This should allow you to save or update the API Request tool successfully. Avoid using $ref in your schema, as it is not supported for function calling with OpenAI, Anthropic, or Google models. Source: - Vapi Custom Tools Documentation
Shubham Bajaj
Shubham Bajaj5mo ago
We apologize for the confusing interface as we are continuously working to improve the experience. Is there a specific API request you are trying to connect?
optimistic-gold
optimistic-goldOP5mo ago
I just want to point to an API request using the API Request Tool to trigger using an Assistant. Updating an existing tool is fine now. But when i am trying to Save a new API Request Tool a validation prevents from saving.
No description
ratty-blush
ratty-blush5mo ago
I have the same issue how do you fix this?
Shubham Bajaj
Shubham Bajaj5mo ago
The main issue is that you're using a GET request method but have configured a request body with properties. GET requests don't typically use request bodies, and the validation error suggests the body type configuration is incorrect for your intended use case. Two possible fixes depending on your intent: ### Option 1: If you need to send data (recommended) - Change HTTP Method from GET to POST - Keep your request body configuration as is - The body type should automatically resolve to "object" when you have properties defined ### Option 2: If this should be a GET request - Remove the entire Request Body section - Use URL parameters or headers instead for any data you need to send - GET requests should not have request bodies Step-by-step implementation: 1. For POST request (Option 1): - Change the HTTP Method dropdown from "GET" to "POST" - Add a Content-Type: application/json header if not already present - Your existing message property configuration should work correctly 2. For GET request (Option 2): - Keep GET method - Remove the "message" property from the Request Body section - If you need to send the message, add it as a URL parameter instead

Did you find this page helpful?