Short Code
With Twilio Proxy, you associate phone numbers and short codes (this resource) directly with a Proxy Service. All added numbers go into the Proxy Number Pool associated with a given Proxy Service. For more information on managing the phone numbers in your number pool, refer to our Phone Number Management guide.
A Twilio short code associated with a Proxy Service cannot be associated with other Proxy Services in the same account.
ShortCode properties
Resource Properties in REST API format | |
---|---|
sid
|
The unique string that we created to identify the ShortCode resource. |
account_sid
|
The SID of the Account that created the ShortCode resource. |
service_sid
|
The SID of the ShortCode resource's parent Service resource. |
date_created
|
The ISO 8601 date and time in GMT when the resource was created. |
date_updated
|
The ISO 8601 date and time in GMT when the resource was last updated. |
short_code
|
The short code's number. |
iso_country
|
The ISO Country Code for the short code. |
capabilities
|
The capabilities of the short code. |
url
|
The absolute URL of the ShortCode resource. |
is_reserved
|
Whether the short code should be reserved and not be assigned to a participant using proxy pool logic. See Reserved Phone Numbers for more information. |
Add a Short Code to a Proxy Service
https://proxy.twilio.com/v1/Services/{ServiceSid}/ShortCodes
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the parent Service resource. |
sid
Required
|
The SID of a Twilio ShortCode resource that represents the short code you would like to assign to your Proxy Service. |
Example 1
Fetch a ShortCode resource
https://proxy.twilio.com/v1/Services/{ServiceSid}/ShortCodes/{Sid}
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the parent Service to fetch the resource from. |
sid
Path
|
The Twilio-provided string that uniquely identifies the ShortCode resource to fetch. |
Example 1
Get the list of Short Codes associated with a Proxy Service
https://proxy.twilio.com/v1/Services/{ServiceSid}/ShortCodes
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the parent Service to read the resources from. |
Example 1
Update a ShortCode resource
https://proxy.twilio.com/v1/Services/{ServiceSid}/ShortCodes/{Sid}
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the parent Service of the resource to update. |
sid
Path
|
The Twilio-provided string that uniquely identifies the ShortCode resource to update. |
is_reserved
Optional
|
Whether the short code should be reserved and not be assigned to a participant using proxy pool logic. See Reserved Phone Numbers for more information. |
Example 1
Remove a Short Code from a Proxy Service
https://proxy.twilio.com/v1/Services/{ServiceSid}/ShortCodes/{Sid}
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the parent Service resource to delete the ShortCode resource from. |
sid
Path
|
The Twilio-provided string that uniquely identifies the ShortCode resource to delete. |
Example 1
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.