unwilling-turquoise•3h ago
Not able to set tool to async
curl -Method Post "https://api.vapi.ai/tool" ~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
-Headers @{
"Content-Type" = "application/json"
"Authorization" = "my-auth-id"
}
-Body '{
"tools": [
{
"toolId": "your-tool-id-1",
"async": true
}
]
}'
But it is returning following error
curl : {"message":["property tools should not exist","type must be one of the following values: dtmf, endCall,
transferCall, transferCancel, transferSuccessful, handoff, output, voicemail, query, sms, function, mcp, apiRequest,
code, bash, computer, textEditor, google.calendar.event.create, google.calendar.availability.check,
google.sheets.row.append, slack.message.send, gohighlevel.calendar.event.create,
gohighlevel.calendar.availability.check, gohighlevel.contact.create, gohighlevel.contact.get, make, ghl","type must be
a string"],"error":"Bad Request","statusCode":400}
At line:1 char:1
+ curl -Method Post "https://api.vapi.ai/tool" `
+ 2 Replies
Your request is failing because the API expects a single tool object, not a "tools" array. Here’s the correct format to create a custom async tool:
Replace the placeholders with your actual tool details. This should resolve the error and enable async mode as needed.
Sources:
- Custom tools troubleshooting
- Tools calling
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
unwilling-turquoiseOP•3h ago
but my took already exists, so i dont want to create it again instead only want to change a property