batch call
# support
d
How do I include several numbers to call within in the customer object? I tried this but it expects an object not an array...
Copy code
{
  "name": "test_httpie",
  "assistant": {
    "model": "gpt-4o"
  },
  "customer": [
    {
      "numberE164CheckEnabled": false,
      "number": "..."
    },
    {
      "numberE164CheckEnabled": false,
      "number": "..."
    }
  ],
  "phoneNumber": {
    "twilioPhoneNumber": "+...",
    "twilioAccountSid": "...",
    "twilioAuthToken": "..."
  }
}
v
@DeFacedFace To include multiple numbers within the customer object, you need to structure the object in a way that can hold multiple entries. However, typically a customer object represents a single customer. If you want to call multiple customers, you would usually have an array of customer objects. If your system is designed to handle an array of customers, you would need to adjust the system to accept and iterate over an array. If it's not, and you can only pass a single customer object at a time, you would need to make separate API calls for each customer. Here's an example of how you might structure an array of customer objects if your system supports it:
Copy code
json
{
  "customers": [
    {
      "name": "Customer1",
      "number": "+1xxxxxxxxxx"
    },
    {
      "name": "Customer2",
      "number": "+1yyyyyyyyyy"
    }
  ]
}
Each customer in the array has their own object with their respective details. If your system does not support this, you would need to call each customer individually by passing a single customer object to the API for each call. If you need to make calls to multiple customers, please provide the details for each customer, and I can assist you with setting up the calls. If the system does not support multiple customers in a single request and you need further assistance on how to implement this, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
d
@Vapi
v
@DeFacedFace Please let me know if you have any other questions or need further assistance with VAPI!
d
@User
bump
s
@DeFacedFace you can only make a call to one number at a time, instead you can make call in batch maximum 10 with gap of 1 second b/w each call.