Introducing Twilio Applications: An Easier Way to Manage Phone Numbers
Time to read: 2 minutes
Today we’re excited to announce a new feature for Twilio developers: the ability to create and assign a Twilio Application to a phone number instead of a URL. When you log into Twilio.com you’ll see a new tab in your account dashboard called “Apps” where you can create and manage your applications. Applications make it easy to change voice and SMS URLs and other settings across many phone numbers in a single place. In addition to an updated dashboard, we’ve added complete REST API support for managing your apps from your code.
Configure Multiple Numbers with a Single Application
If you’re like many Twilio customers, you might have hundreds or thousands of phone numbers pointing to the exact same set of URLs. When updating the settings for a large set of numbers you would need to update each one individually in the Twilio.com account dashboard, or write a script to update them one at a time via the REST API.
With Twilio Applications, you simply change the VoiceUrl, SmsUrl or other settings in your application and it will be immediately updated for all your numbers assigned to that application.
Using Applications via the REST API
Applications have complete REST API support so you can view, create and update application settings from your code. Phone numbers can be updated to use an application via the API as well. Here are a few examples of managing your applications via the REST API.
Creating a New Application
You can create a new application for your account by making a POST request to the new Applications List Resource with the URL options specified. Specify the friendly name and any additional voice and SMS settings your application will use.
Twilio will respond to the request with a representation of the newly-created Application Instance Resource which includes the ApplicationSid. The documentation has been updated with complete information for managing applications.
Updating a Phone Number to Use an Application
Once you have created an application, you can update a phone number to point to it instead of a URL. Every application you create has a unique ApplicationSid. To assign it to a phone number, specify the VoiceApplicationSid or SmsApplicationSid when making a POST request to the IncomingPhoneNumber Instance Resource.
If you specify both an ApplicationSid and a URL in your request for either voice or SMS, the application settings will take precedence.
Make an Outbound Call Using an Application
You can also use an application to control a call when making an outbound call via the REST API. Instead of specifying a Url parameter, you can optionally specify an ApplicationSid parameter. When the call is answered, the VoiceUrl setting of your application will be used to control the call.
Twilio Applications have been enabled for all existing and new customers. If you have any questions about how to use set up and configure them for your projects, drop us a note at help@twilio.com or tweet to @Twilio and we’ll be happy to assist you.
Related Posts
Related Resources
Twilio Docs
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
Resource Center
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Ahoy
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.