Mary
04/14/2025, 8:09 PMVapi Support Bot
04/14/2025, 8:11 PM/squad
endpoint:
javascript
// Endpoint: https://api.vapi.ai/squad
// Method: POST
// Headers: Authorization: Bearer <your_token>
// Request body example:
{
"name": "My Outbound Squad", // Optional name for your squad
"members": [
// List of assistants that make up the squad
// The call will start with the first assistant in the list
{
"type": "assistant",
"id": "your_assistant_id" // Use your "Callie - Life Insurance Scheduling" assistant ID
},
{
"type": "destination",
"number": "+13127253480" // The destination number
}
]
}
Alternatively, you can create a transient squad at the time of making the call without storing it in Vapi, similar to transient assistants, as mentioned in the [Vapi documentation](https://docs.vapi.ai/squads).
## Using the VAPI Web SDK
If you're using the VAPI Web SDK, you can create a squad and trigger a call like this:
```javascript
const vapi = new VAPI({
apiKey: 'your_api_key',
});
// Define squad members
const squadMembers = [
{ type: 'assistant', id: 'your_assistant_id' }, // Your Callie assistant
{ type: 'destination', number: '+13127253480' } // The destination number
];
// Start the call
vapi.squadCall(squadMembers)
.then(response => {
console.log('Call initiated successfully:', response);
})Vapi Support Bot
04/14/2025, 8:11 PMKings_big💫
04/14/2025, 8:34 PM