How to get customerId for outboundPhoneCall
# support
s
Hi Community, I am working on a project where I need to utilize VAPI's official API to initiate an outboundPhoneCall. Here is the reference url to the endpoint I am looking at https://docs.vapi.ai/api-reference/calls/create-phone-call Not as you can see
customerID
is one of the required parameters for me to initiate a call. Can you please help me understand what's this
customerID
is it something VAPI offers before making a call to a lead's phone number? Or can i specify any unique string as the
customerID
Any help would be greatly appreciated.
v
Hi @Sumeena, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Create Phone Call]() * [Get Call]() * [Outbound Sales Example]() * [List Calls]() -----------------------------
### Answer Hi there, In the context of Vapi's API, the
customerId
is a unique identifier that you, as the developer, assign to each customer to represent them in your system. It's not something that Vapi provides automatically. When you make an outbound call using Vapi's API, you can specify any unique string that identifies the customer in your system as the
customerId
. This ID helps you manage and track calls related to specific customers in your application. You can see this in the structure of the API call for creating a phone call, where
customerId
is one of the parameters you can include in the request payload. Here's an example of how you might structure the request:
Copy code
json
{
  "customerId": "unique_customer_id_string",
  "customer": {
    "number": "+11234567890",
    "name": "John Doe"
  },
  "phoneNumberId": "your_phone_number_id",
  "assistantId": "your_assistant_id"
}
This format allows you to link the call directly to a customer record in your database. Make sure that the
customerId
is unique and meaningful within your system to avoid conflicts or confusion. If you need further details on how to structure your API requests, you can refer to the documentation on creating phone calls [here]() [(1)]() . I hope this helps! Let me know if you have any more questions. : [Create Phone Call]()
s
You don't need that you just need to provide the phone number that's all
s
Hi Sahil
I am using the following JSON as Body { "customer": { "number": "+918437405304", "name": "Vikas Goyal", "extension": "+91" }, "phoneNumberId": "", "metadata": {}, "assistantId": "", "squadId": "1" } but it said { "message": [ "squadId must be a UUID", "phoneNumberId must be a UUID" ], "error": "Bad Request", "statusCode": 400 }
what does it mean by squadId must be UUID and phoenumber must be UUID
c
Remove the squad part.
s
Thanks for squad
what about phoneNumberID
I am using a number that is in my VAPI Dashboard
I got it @Chowderr 👍
c
Go to your phone numbers and select the ID.
14 Views