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.
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.
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.
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.
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.
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.
From APIs to SDKs to sample apps
API reference documentation, SDKs, helper libraries, quickstarts, and tutorials for your language and platform.
The latest ebooks, industry reports, and webinars
Learn from customer engagement experts to improve your own communication.
Twilio's developer community hub
Best practices, code samples, and inspiration to build communications and digital engagement experiences.