Error: 400 Bad Request{"message":["property model ...
# support
j
Hello everyone . I tried to automate vapi with make to automate phone calls and it gave me this error Error: 400 Bad Request {"message":["property model should not exist","property transcriber should not exist","property voice should not exist"],"error":"Bad Request","statusCode":400} The json code gives me an error when executing Make, but when I pass it through a json syntax checker it is fine. Can you help me? Thank you #1293690685781839933 #1211483571454218261
v
@JORDI Hello! It seems like there might be an issue with the properties you are using in your JSON payload for the VAPI request. The error message indicates that the properties
model
,
transcriber
, and
voice
should not exist in the JSON you are sending. To assist you further, I would need to see the JSON payload you are trying to send to VAPI. This will help me understand what might be going wrong. Could you please provide the JSON code you are using for the VAPI request? Once I have that information, I can give you more specific guidance on how to fix the error.
You can continue this conversation by mentioning me in the message.
s
Hey @JORDI your json was incorrect, here's the fixed version. DO let me know how it goes.
Copy code
json
{
    "phoneNumberId": "55c01ca3-db2a-43d8-9111-2348685df262",
    "customer": {
        "numberE164CheckEnabled": true,
        "extension": "extension",
        "number": "telefono",
        "name": "Nombre"
    },
  "assistant": {...yourAssistantConfigComesHere}
}
j
@User But then you wouldn't take into account the content I've given you for the answers, right? That is to say, all the descriptive text that I have provided for the AI ​​to answer will not be taken into account.
s
Hey @JORDI , sorry can you be more clear?
j
In the content I have put a text so that the machine knows about our company and thus formulates responses in phone calls. If we delete that text, what will it answer? Where will you get the information to answer the calls? I just put the code that you gave me and it also gives an error, the same DataError Error: 400 Bad Request {"message":"Expected property name or '}' in JSON at position 237 (line 9 column 17)","error":"Bad Request","statusCode":400} Origin HTTP
s
can you share the complete json or use this url for making an call then you will understand by yourself what wrong your doing here: https://docs.vapi.ai/api-reference/calls/create
s
Hey @JORDI your sending incorrect JSON because of this your getting the error messages please use the below template and fill the placeholders with required details and do let me know how it goes.
Copy code
js
curl -X POST https://api.vapi.ai/call \
     -H "Authorization: Bearer " \
     -H "Content-Type: application/json" \
     -d '{
  "phoneNumberId": "",
  "customer": {
    "number": ""
  },
  "assistant": {
    "model": {
      "provider": "openai",
      "model": "gpt-4o",
      "messages": [
        {
          "role": "system",
          "content": "insert-system-prompt-here"
        }
      ]
    },
    "transcriber": {
      "provider": "deepgram",
      "language": "en",
      "model": "nova-2-phonecall"
    },
    "voice": {
      "provider": "11labs",
      "voiceId": "andrea"
    }
  }
}'
ref:
https://docs.vapi.ai/api-reference/calls/create?playground=%2Fapi-reference%2Fcalls%2Fcreate