Handling inbound calling thru the API
# support
t
How can I handle inbound calling to a specific number through the API?
v
message has been deleted
s
Hey @Trent™ can you please describe it more around your usage, purpose and expectations so I will have a better idea, and this will help me figure out a solution for you.
t
I want to purchase a phone number, then be able to call that number and listen my ai on the other end
s
1. Purchase a number using twilio or vonage 2. Import the number to Vapi 3. Assign an assistant to the phone number 4. Make an call to your purchased number and it will work!! Do let me know how it goes @Trent™
t
@Shubham Bajaj Is there a way to do this programically thru the API?
s
The steps 3 and 4 are doable using API but not the steps 1 and 2. Also @Trent™ can i close this ticket if resolved for you?
t
Can you show me some documentation before you close?
s
> Purchase a number using twilio or vonage Go to provider of your choice and purchase a number from their dashboard. > Import the number to Vapi 1. Goto Vapi Dashboard 2. Select PhoneNumbers from the left side of the dashboard 2A. Click on the import button to import the purchased number from telephony. > Assign an assistant to the phone number Run the following curl with your phoneNumberId, assistantId, and private API Key. curl -X PATCH https://api.vapi.ai/phone-number/insert-phone-number-id-here \ -H "Authorization: Bearer insert-your-private-api-key" \ -H "Content-Type: application/json" \ -d '{ "assistantId": "insert-assistant-id-here" }' > Make an call to your purchased number and it will work!! Now make a call to your phone number and it will work.
@Trent™ do let me know if you require further help and update me on when I can close this ticket.