Create short code
A Messaging Service resource to add, fetch or remove short code numbers from a Messaging Service.
Path parameters
-
The SID of the Service to create the resource under.
Body
-
The SID of the ShortCode resource being added to the Service.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^SC[0-9a-fA-F]{32}$
.
POST /v1/Services/{ServiceSid}/ShortCodes
curl \
-X POST https://messaging.twilio.com/v1/Services/{ServiceSid}/ShortCodes \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'ShortCodeSid=string'
Request example
{
"ShortCodeSid": "string"
}
Request examples
{
"ShortCodeSid": "string"
}
Response examples (201)
{
"account_sid": "string",
"capabilities": [
"string"
],
"country_code": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"service_sid": "string",
"short_code": "string",
"sid": "string",
"url": "https://example.com"
}
Response examples (201)
{
"account_sid": "string",
"capabilities": [
"string"
],
"country_code": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"service_sid": "string",
"short_code": "string",
"sid": "string",
"url": "https://example.com"
}