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.
Info
A Twilio short code associated with a Proxy Service cannot be associated with other Proxy Services in the same account.
Property nameTypePIIDescription
The unique string that we created to identify the ShortCode resource.
Pattern: ^SC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the ShortCode resource.
Pattern: ^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the ShortCode resource's parent Service resource.
Pattern: ^KS[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
date_createdstring<date-time>
date_updatedstring<date-time>
The ISO Country Code for the short code.
capabilitiesobject<phone-number-capabilities> The capabilities of the short code.
The absolute URL of the ShortCode resource.
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.
POST https://proxy.twilio.com/v1/Services/{ServiceSid}/ShortCodes
Property nameTypeRequiredPIIDescription
ServiceSidSID<KS>required The SID of the parent Service resource.
Pattern: ^KS[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Property nameTypeRequiredPIIDescription
_11// Download the helper library from https://www.twilio.com/docs/node/install
_11// Find your Account SID and Auth Token at twilio.com/console
_11// and set the environment variables. See http://twil.io/secure
_11const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11const authToken = process.env.TWILIO_AUTH_TOKEN;
_11const client = require('twilio')(accountSid, authToken);
_11client.proxy.v1.services('KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .create({sid: 'SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'})
_11 .then(short_code => console.log(short_code.sid));
_15 "sid": "SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "service_sid": "KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "date_created": "2015-07-30T20:00:00Z",
_15 "date_updated": "2015-07-30T20:00:00Z",
_15 "short_code": "12345",
_15 "sms_outbound": true,
_15 "voice_inbound": false
_15 "url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ShortCodes/SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
GET https://proxy.twilio.com/v1/Services/{ServiceSid}/ShortCodes/{Sid}
Property nameTypeRequiredPIIDescription
ServiceSidSID<KS>required The SID of the parent Service to fetch the resource from.
Pattern: ^KS[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Twilio-provided string that uniquely identifies the ShortCode resource to fetch.
Pattern: ^SC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
_11// Download the helper library from https://www.twilio.com/docs/node/install
_11// Find your Account SID and Auth Token at twilio.com/console
_11// and set the environment variables. See http://twil.io/secure
_11const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11const authToken = process.env.TWILIO_AUTH_TOKEN;
_11const client = require('twilio')(accountSid, authToken);
_11client.proxy.v1.services('KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .shortCodes('SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .then(short_code => console.log(short_code.sid));
_15 "sid": "SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "service_sid": "KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "date_created": "2015-07-30T20:00:00Z",
_15 "date_updated": "2015-07-30T20:00:00Z",
_15 "short_code": "12345",
_15 "sms_outbound": true,
_15 "voice_inbound": false
_15 "url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ShortCodes/SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
GET https://proxy.twilio.com/v1/Services/{ServiceSid}/ShortCodes
Property nameTypeRequiredPIIDescription
ServiceSidSID<KS>required The SID of the parent Service to read the resources from.
Pattern: ^KS[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Property nameTypeRequiredPIIDescription
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum: 1
Maximum: 1000
The page index. This value is simply for client state.
Minimum: 0
The page token. This is provided by the API.
_11// Download the helper library from https://www.twilio.com/docs/node/install
_11// Find your Account SID and Auth Token at twilio.com/console
_11// and set the environment variables. See http://twil.io/secure
_11const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11const authToken = process.env.TWILIO_AUTH_TOKEN;
_11const client = require('twilio')(accountSid, authToken);
_11client.proxy.v1.services('KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .then(shortCodes => shortCodes.forEach(s => console.log(s.sid)));
_28 "first_page_url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ShortCodes?PageSize=50&Page=0",
_28 "previous_page_url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ShortCodes?PageSize=50&Page=0",
_28 "next_page_url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ShortCodes?PageSize=50&Page=1",
_28 "key": "short_codes",
_28 "url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ShortCodes?PageSize=50&Page=0"
_28 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_28 "service_sid": "KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_28 "sid": "SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_28 "date_created": "2015-07-30T20:00:00Z",
_28 "date_updated": "2015-07-30T20:00:00Z",
_28 "short_code": "12345",
_28 "sms_outbound": true,
_28 "voice_inbound": false
_28 "url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ShortCodes/SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
POST https://proxy.twilio.com/v1/Services/{ServiceSid}/ShortCodes/{Sid}
Property nameTypeRequiredPIIDescription
ServiceSidSID<KS>required The SID of the parent Service of the resource to update.
Pattern: ^KS[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Twilio-provided string that uniquely identifies the ShortCode resource to update.
Pattern: ^SC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Property nameTypeRequiredPIIDescription
IsReservedbooleanOptional 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.
_11// Download the helper library from https://www.twilio.com/docs/node/install
_11// Find your Account SID and Auth Token at twilio.com/console
_11// and set the environment variables. See http://twil.io/secure
_11const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11const authToken = process.env.TWILIO_AUTH_TOKEN;
_11const client = require('twilio')(accountSid, authToken);
_11client.proxy.v1.services('KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .shortCodes('SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .update({isReserved: true})
_11 .then(short_code => console.log(short_code.sid));
_15 "sid": "SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "service_sid": "KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_15 "date_created": "2015-07-30T20:00:00Z",
_15 "date_updated": "2015-07-30T20:00:00Z",
_15 "short_code": "12345",
_15 "sms_outbound": true,
_15 "voice_inbound": false
_15 "url": "https://proxy.twilio.com/v1/Services/KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ShortCodes/SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
DELETE https://proxy.twilio.com/v1/Services/{ServiceSid}/ShortCodes/{Sid}
Property nameTypeRequiredPIIDescription
ServiceSidSID<KS>required The SID of the parent Service resource to delete the ShortCode resource from.
Pattern: ^KS[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Twilio-provided string that uniquely identifies the ShortCode resource to delete.
Pattern: ^SC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
_10// Download the helper library from https://www.twilio.com/docs/node/install
_10// Find your Account SID and Auth Token at twilio.com/console
_10// and set the environment variables. See http://twil.io/secure
_10const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10const authToken = process.env.TWILIO_AUTH_TOKEN;
_10const client = require('twilio')(accountSid, authToken);
_10client.proxy.v1.services('KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10 .shortCodes('SCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')