Server respons for Squad
# support
m
Hey @Shubham Bajaj Can you help me with the server response Json for Squad curl -X POST https://{yourserver}.com/server \ -H "Content-Type: application/json" \ -d '{ "message": { "type": "assistant-request", "assistant": {} } }' In API Docs there only assistnat rquest there with no option for the Squad
id 2afbe980-8ae4-4153-9eff-1562de824d16 orgId 34c61be3-94e2-4101-a9be-07a29dfad5a7 createdAt January 23, 2025 9:45 PM updatedAt January 23, 2025 9:45 PM type inboundPhoneCall
Check this Call ID
v
@Mohammad Certainly! It seems like you're looking to understand the server response JSON structure for a Squad-related request, but the API documentation only provides details for an "assistant-request" with no specific option for Squad. To clarify, are you asking for the expected JSON response format that the server should return when handling a Squad-related request, or are you looking to send a request that includes details specific to a Squad and need to know how to structure your JSON payload? If it's the latter, could you please provide more details about the Squad-related information you wish to include in your request?
m
Copy code
{
  "squad": {
    "members": [
      {
        "assistantId": "6903b0db-0901-4446-a84b-21c0dfd2edc5",
        "assistantDestinations": [
          {
            "assistantName": "SP Regular Inbound For Old Patients",
            "type": "assistant",
            "transferMode": "rolling-history",
            "description": "when user speaks Spanish or asks to transfer to Spanish then transfer the call "
          }
        ],
        "assistant": {
          "name": "Regular Inbound For Old Patients"
        }
      },
      {
        "assistantId": "5a5a3fe7-b36b-4b88-a915-a334521d53d1",
        "assistantDestinations": [
          {
            "assistantName": "Regular Inbound For Old Patients",
            "type": "assistant",
            "description": "when user speaks English or asks to transfer to English then transfer the call "
          }
        ],
        "assistant": {
          "name": "SP Regular Inbound For Old Patients"
        }
      }
    ],
    "membersOverrides": {
      "variableValues": {
        "name": "eloeonora"
      }
    }
  },
  "squadId": "b8106dfa-df2b-4cb6-89a4-9f8aecac10ba"
}
v
You can continue this conversation by mentioning me in the message.
m
Json I used for this respons
@Shubham Bajaj
s
1. First update your phone-number server url.
Copy code
curl -X PATCH https://api.vapi.ai/phone-number/insert-your-phone-number-id-here \
     -H "Authorization: Bearer insert-your-token-here" \
     -H "Content-Type: application/json" \
     -d '{
  "provider": "twilio",
  "server": {
    "url": "insert-your-server-url-here"
  }
}'
2. After that return the squad for server event assistant-request
Copy code
{
"squad": {...squadConfigHere}
}
@Mohammad if you have done the above two steps clear me on what's blocking you currently. https://cdn.discordapp.com/attachments/1332043209190412460/1332346633580449802/Screenshot_2025-01-24_at_7.18.57_PM.png?ex=6794ebff&is=67939a7f&hm=4697dc64ab75312381fb09429a467af684b24eafabb1500a9211bfd819b73a64&
m
ok
2 Views