{ "components": { "securitySchemes": { "accountSid_authToken": { "scheme": "basic", "type": "http" } }, "schemas": { "routes.v3.phone_number": { "type": "object", "properties": { "phoneNumber": { "type": "string", "nullable": true, "description": "The phone number in E.164 format" }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the resource." }, "accountSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique SID identifier of the Account." }, "friendlyName": { "type": "string", "nullable": true, "description": "A human readable description of the Inbound Processing Region assignments for this phone number, up to 64 characters." }, "voiceRegion": { "type": "string", "nullable": true, "description": "The Inbound Processing Region used for this phone number for voice." }, "messagingRegion": { "type": "string", "nullable": true, "description": "The Inbound Processing Region used for this phone number for messaging." }, "dateCreated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date that this phone number was assigned an Inbound Processing Region, given in ISO 8601 format." }, "dateUpdated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date that the Inbound Processing Region was updated for this phone number, given in ISO 8601 format." } } }, "routes.v3.short_code": { "type": "object", "properties": { "isoCountryCode": { "type": "string", "nullable": true, "description": "The ISO country code of the short code" }, "shortCode": { "type": "string", "nullable": true, "description": "The short code" }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the resource." }, "accountSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique SID identifier of the Account." }, "friendlyName": { "type": "string", "nullable": true, "description": "A human readable description of the Inbound Processing Region assignment for this short code, up to 64 characters." }, "messagingRegion": { "type": "string", "nullable": true, "description": "The Inbound Processing Region used for this short code for messaging." }, "dateCreated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date that this short code was assigned an Inbound Processing Region, given in ISO 8601 format." }, "dateUpdated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date that the Inbound Processing Region was updated for this short code, given in ISO 8601 format." } } }, "routes.v3.rcs": { "type": "object", "properties": { "agentId": { "type": "string", "nullable": true, "description": "The RCS agent ID, in the format `agent_name_12312321`." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the resource." }, "accountSid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique SID identifier of the Account." }, "friendlyName": { "type": "string", "maxLength": 64, "nullable": true, "description": "A human readable description of the Inbound Processing Region assignment for this RCS agent, up to 64 characters." }, "messagingRegion": { "type": "string", "enum": [ "us1", "ie1" ], "nullable": true, "description": "The Inbound Processing Region used for this RCS agent for messaging." }, "dateCreated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date that this RCS agent was assigned an Inbound Processing Region, given in ISO 8601 format." }, "dateUpdated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date that the Inbound Processing Region was updated for this RCS agent, given in ISO 8601 format." } } }, "routes.v3.regional_phone_number_item": { "oneOf": [ { "$ref": "#/components/schemas/routes.v3.regional_phone_number_long_code" }, { "$ref": "#/components/schemas/routes.v3.regional_phone_number_short_code" } ] }, "routes.v3.regional_phone_number_long_code": { "type": "object", "required": [ "numberE164" ], "properties": { "numberE164": { "type": "string", "description": "Phone number in E.164 format." } } }, "routes.v3.regional_phone_number_short_code": { "type": "object", "required": [ "isoCountryCode", "nationalNumber" ], "properties": { "isoCountryCode": { "type": "string", "description": "ISO country code." }, "nationalNumber": { "type": "string", "description": "National short code number." } } } } }, "info": { "title": "Twilio - Routes", "description": "This is the public Twilio REST API.", "termsOfService": "https://www.twilio.com/legal/tos", "contact": { "name": "Twilio Support", "url": "https://support.twilio.com", "email": "support@twilio.com" }, "license": { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, "version": "1.0.0", "x-twilio": { "apiStandards": "v1.0" } }, "openapi": "3.0.1", "paths": { "/v3/PhoneNumbers/{phoneNumber}": { "servers": [ { "url": "https://routes.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "friendlyName", "dateCreated" ], "pathType": "instance" }, "post": { "description": "Assign an Processing Region to a phone number.", "summary": "Assign an Processing Region to a phone number.", "tags": [ "RoutesV3PhoneNumber" ], "parameters": [ { "name": "phoneNumber", "in": "path", "description": "The phone number in E.164 format", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routes.v3.phone_number" }, "examples": { "update": { "value": { "phoneNumber": "+18001234567", "url": "https://routes.twilio.com/v3/PhoneNumbers/+18001234567", "accountSid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendlyName": "friendly_name", "voiceRegion": "au1", "messagingRegion": "us1", "dateCreated": "2015-07-30T20:00:00Z", "dateUpdated": "2015-07-30T20:00:00Z" } } } } }, "headers": { "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdatePhoneNumber", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdatePhoneNumberRequest", "properties": { "voiceRegion": { "type": "string", "description": "The Inbound Processing Region used for this phone number for voice" }, "messagingRegion": { "type": "string", "description": "The Inbound Processing Region used for this phone number for messaging" }, "friendlyName": { "type": "string", "description": "A human readable description of this resource, up to 64 characters." } } }, "examples": { "update": { "value": { "friendlyName": "friendly_name", "voiceRegion": "au1", "messagingRegion": "us1" } } } } } } }, "get": { "description": "Fetch the Processing Region assigned to a phone number.", "summary": "Fetch the Processing Region assigned to a phone number.", "tags": [ "RoutesV3PhoneNumber" ], "parameters": [ { "name": "phoneNumber", "in": "path", "description": "The phone number in E.164 format", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routes.v3.phone_number" }, "examples": { "fetch": { "value": { "phoneNumber": "+18001234567", "url": "https://routes.twilio.com/v3/PhoneNumbers/+18001234567", "accountSid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendlyName": "friendly_name", "voiceRegion": "au1", "messagingRegion": "us1", "dateCreated": "2015-07-30T20:00:00Z", "dateUpdated": "2015-07-30T20:00:00Z" } } } } }, "headers": { "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchPhoneNumber" } }, "/v3/ShortCodes/{isoCountryCode}/{shortCode}": { "servers": [ { "url": "https://routes.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "friendlyName", "dateCreated" ], "pathType": "instance" }, "post": { "description": "Assign an Processing Region to a short code. Short codes only support a Messaging region; Voice is not supported.", "summary": "Assign an Processing Region to a short code.", "tags": [ "RoutesV3ShortCode" ], "parameters": [ { "name": "isoCountryCode", "in": "path", "description": "The ISO country code of the short code", "schema": { "type": "string" }, "required": true }, { "name": "shortCode", "in": "path", "description": "The short code", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routes.v3.short_code" }, "examples": { "update": { "value": { "isoCountryCode": "US", "shortCode": "12345", "url": "https://routes.twilio.com/v3/ShortCodes/US/12345", "accountSid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendlyName": "friendly_name", "messagingRegion": "us1", "dateCreated": "2015-07-30T20:00:00Z", "dateUpdated": "2015-07-30T20:00:00Z" } } } } }, "headers": { "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "UpdateShortCode", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateShortCodeRequest", "properties": { "messagingRegion": { "type": "string", "description": "The Processing Region used for this short code for messaging" }, "friendlyName": { "type": "string", "description": "A human readable description of this resource, up to 64 characters." } } }, "examples": { "update": { "value": { "friendlyName": "friendly_name", "messagingRegion": "us1" } } } } } } }, "get": { "description": "Fetch the Processing Region assigned to a short code. Short codes only support a Messaging region; Voice is not supported.", "summary": "Fetch the Processing Region assigned to a short code.", "tags": [ "RoutesV3ShortCode" ], "parameters": [ { "name": "isoCountryCode", "in": "path", "description": "The ISO country code of the short code", "schema": { "type": "string" }, "required": true }, { "name": "shortCode", "in": "path", "description": "The short code", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routes.v3.short_code" }, "examples": { "fetch": { "value": { "isoCountryCode": "US", "shortCode": "12345", "url": "https://routes.twilio.com/v3/ShortCodes/US/12345", "accountSid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendlyName": "friendly_name", "messagingRegion": "us1", "dateCreated": "2015-07-30T20:00:00Z", "dateUpdated": "2015-07-30T20:00:00Z" } } } } }, "headers": { "Access-Control-Allow-Origin": { "description": "Specify the origin(s) allowed to access the resource", "schema": { "type": "string" }, "example": "*" }, "Access-Control-Allow-Methods": { "description": "Specify the HTTP methods allowed when accessing the resource", "schema": { "type": "string" }, "example": "POST, OPTIONS" }, "Access-Control-Allow-Headers": { "description": "Specify the headers allowed when accessing the resource", "schema": { "type": "string" }, "example": "Content-Type, Authorization" }, "Access-Control-Allow-Credentials": { "description": "Indicates whether the browser should include credentials", "schema": { "type": "boolean" } }, "Access-Control-Expose-Headers": { "description": "Headers exposed to the client", "schema": { "type": "string", "example": "X-Custom-Header1, X-Custom-Header2" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchShortCode" } } }, "servers": [ { "url": "https://routes.twilio.com" } ], "tags": [ { "name": "RoutesV3PhoneNumber" }, { "name": "RoutesV3ShortCode" }, { "name": "RoutesV3Rcs" }, { "name": "RoutesV3RegionalPhoneNumber" }, { "name": "RoutesV3Version" } ], "security": [ { "accountSid_authToken": [] } ] }