Need Help Squad having error 400
# support
m
curl -X POST https://api.vapi.ai/squad \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "members": [ { "assistantId": "", "assistantDestinations": [ { "assistantName": "", "description": "When User needs to speaking in English", "transferMode": "rolling-history", "message": "ok" } ] }, { "assistantId": "", "assistantDestinations": [ { "assistantName": "Regular Inbound Spanish", "transferMode": "rolling-history", "description": "When User needs to speaking in Spanish", "message": "OK" } ], "assistant": { "name": "name" } } ], "name": "Regular Inbound Natasha New Patients" }' Need Help where I am doing worng
v
@Mohammad It looks like you're trying to create a squad with members and their destinations using the VAPI. To assist you better, I would need to know the specific error or issue you're encountering. However, I can provide some general advice: 1. Ensure that the
Authorization: Bearer
header includes a valid API token after
Bearer
. It should look something like
Authorization: Bearer YOUR_API_TOKEN
. 2. Make sure that the
assistantId
fields are filled with valid assistant IDs. These should not be empty strings. 3. Verify that the
assistantName
for the first member is provided if it's required. It's currently an empty string. 4. Check if all required fields are provided and correctly formatted according to the API's specification. 5. If there's a specific error message you're receiving, please provide it so I can offer more targeted assistance. If you're unsure about the values for
assistantId
,
assistantName
, or any other parameters, or if you're encountering an error you can't resolve, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
s
@Mohammad try this CURL and let me know how it goes.
Copy code
curl -X POST https://api.vapi.ai/squad \
     -H "Authorization: Bearer token-here" \
     -H "Content-Type: application/json" \
     -d '{
  "members": [
    {
      "assistantId": "your-assistant-id-here-1",
      "assistantDestinations": [
        {
          "assistantName": "your-assistant-name-here",
          "message": "ok",
          "transferMode": "rolling-history",
          "description": "When User needs to speaking in English"
        }
      ]
    },
    {
      "assistantId": "your-assistant-id-here-2",
      "assistantDestinations": [
        {
          "assistantName": "Regular Inbound Spanish",
          "transferMode": "rolling-history",
          "description": "When User needs to speaking in Spanish",
          "message": "ok"
        }
      ]
    }
  ],
  "name": "Regular Inbound Natasha New Patients"
}'