How to handle phone number release
# support
m
I have a web app where users signup, obtain a phone number through twilio, then I associate that phone number to a newly created assistant. When that user stops being active and gets removed, what is the proper procedure? I know I can use the API to delete the assistant but I'm not sure if I need to release the phone number in VAPI (and how) knowing I'm already releasing it through the Twilio API (since that's where I got the number from).
a
HeyMistermanu\#000 Thank you for creating the ticket! A member of our team will reach out to you shortly.
v
@Mistermanu#000 When a user stops being active and is removed from your web app, it's important to clean up resources associated with that user to avoid unnecessary charges and to maintain good resource management practices. Since you're using Twilio to provision phone numbers, here's the proper procedure: 1. **Delete the Assistant**: Use the API to delete the assistant that was associated with the user. This will ensure that the assistant is no longer active and will not respond to any calls or messages. 2. **Release the Phone Number**: If you've obtained the phone number through Twilio and are managing it via Twilio's API, you should release the phone number through Twilio. This is done by sending a DELETE request to the appropriate Twilio API endpoint for releasing phone numbers. Since VAPI provisions the phone number for you via Twilio, releasing the number through Twilio's API is the correct approach. There is no separate action required in VAPI to release the number if it's being managed through Twilio. Remember to also update any databases or records you have to reflect that the user and their associated resources (assistant and phone number) have been removed. If you have any further questions or need more detailed instructions on how to release the phone number through Twilio, please ask support for more info on this.
You can continue this conversation by mentioning me in the message.
s
m
yep thank you I figured it out!