ApiRequest not working unable to save
# support
m
v
To resolve the "body.type: Invalid literal value, expected 'object'" error, make sure your API request includes a
body
property set as a JSON object.
For example, if you don't need to send any data, use:
Copy code
json
"body": {}
If you need to send data, structure it like:
Copy code
json
"body": { "key": "value" }
This should allow you to save the ApiRequest tool successfully. Sources: - [Vapi API Reference: Create Tool](https://docs.vapi.ai/api-reference/tools/create) - [Vapi Changelog: API Request Node](https://docs.vapi.ai/changelog/2025/2/1)
To resolve the "body.type: Invalid literal value, expected 'object'" error, make sure your API request includes a
body
property set as a JSON object.
For example, if you don't need to send any data, use:
Copy code
json
"body": {}
If you need to send data, structure it like:
Copy code
json
"body": { "key": "value" }
This should allow you to save the ApiRequest tool successfully. Sources: - [Vapi API Reference: Create Tool](https://docs.vapi.ai/api-reference/tools/create) - [Vapi Changelog: API Request Node](https://docs.vapi.ai/changelog/2025/2/1)
To resolve the "body.type: Invalid literal value, expected 'object'" error, make sure your API request includes a
body
property set as a JSON object.
For example, if you don't need to send any data, use:
Copy code
json
"body": {}
If you need to send data, structure it like:
Copy code
json
"body": { "key": "value" }
This should allow you to save the ApiRequest tool successfully. Sources: - [Vapi API Reference: Create Tool](https://docs.vapi.ai/api-reference/tools/create) - [Vapi Changelog: API Request Node](https://docs.vapi.ai/changelog/2025/2/1)
To resolve the "body.type: Invalid literal value, expected 'object'" error, make sure your API request includes a
body
property set as a JSON object.
For example, if you don't need to send any data, use:
Copy code
json
"body": {}
If you need to send data, structure it like:
Copy code
json
"body": { "key": "value" }
This should allow you to save the ApiRequest tool successfully. Sources: - [Vapi API Reference: Create Tool](https://docs.vapi.ai/api-reference/tools/create) - [Vapi Changelog: API Request Node](https://docs.vapi.ai/changelog/2025/2/1)
It looks like the error is related to the "body" field not being an object. Could you share the exact value you're sending for the "body" property in your request, or clarify if it's missing? This will help identify the required structure to resolve the validation error. Sources: - [Vapi API Reference – Create Tool](https://docs.vapi.ai/api-reference/tools/create?explorer=true) - [Vapi Custom LLM Tool Calling Integration](https://docs.vapi.ai/customization/tool-calling-integration)
It looks like the error is related to the "body" field not being an object. Could you share the exact value you're sending for the "body" property in your request, or clarify if it's missing? This will help identify the required structure to resolve the validation error. Sources: - [Vapi API Reference – Create Tool](https://docs.vapi.ai/api-reference/tools/create?explorer=true) - [Vapi Custom LLM Tool Calling Integration](https://docs.vapi.ai/customization/tool-calling-integration)
It looks like the error is related to the "body" field not being an object. Could you share the exact value you're sending for the "body" property in your request, or clarify if it's missing? This will help identify the required structure to resolve the validation error. Sources: - [Vapi API Reference – Create Tool](https://docs.vapi.ai/api-reference/tools/create?explorer=true) - [Vapi Custom LLM Tool Calling Integration](https://docs.vapi.ai/customization/tool-calling-integration)
It looks like the error is related to the "body" field not being an object. Could you share the exact value you're sending for the "body" property in your request, or clarify if it's missing? This will help identify the required structure to resolve the validation error. Sources: - [Vapi API Reference – Create Tool](https://docs.vapi.ai/api-reference/tools/create?explorer=true) - [Vapi Custom LLM Tool Calling Integration](https://docs.vapi.ai/customization/tool-calling-integration)
c
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
4 Views