{ "components": { "securitySchemes": { "accountSid_authToken": { "scheme": "basic", "type": "http" } }, "schemas": { "routes.v2.phone_number": { "type": "object", "properties": { "phone_number": { "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." }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^QQ[0-9a-fA-F]{32}$", "nullable": true, "description": "A 34 character string that uniquely identifies the Inbound Processing Region assignments for this phone number." }, "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique SID identifier of the Account." }, "friendly_name": { "type": "string", "nullable": true, "description": "A human readable description of the Inbound Processing Region assignments for this phone number, up to 64 characters." }, "voice_region": { "type": "string", "nullable": true, "description": "The Inbound Processing Region used for this phone number for voice." }, "date_created": { "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." }, "date_updated": { "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.v2.sip_domain": { "type": "object", "properties": { "sip_domain": { "type": "string", "nullable": true }, "url": { "type": "string", "format": "uri", "nullable": true }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^QQ[0-9a-fA-F]{32}$", "nullable": true }, "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true }, "friendly_name": { "type": "string", "nullable": true }, "voice_region": { "type": "string", "nullable": true }, "date_created": { "type": "string", "format": "date-time", "nullable": true }, "date_updated": { "type": "string", "format": "date-time", "nullable": true } } }, "routes.v2.trunks": { "type": "object", "properties": { "sip_trunk_domain": { "type": "string", "nullable": true, "description": "The absolute URL of the SIP Trunk" }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The absolute URL of the resource." }, "sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^QQ[0-9a-fA-F]{32}$", "nullable": true, "description": "A 34 character string that uniquely identifies the Inbound Processing Region assignments for this SIP Trunk." }, "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The unique SID identifier of the Account." }, "friendly_name": { "type": "string", "nullable": true, "description": "A human readable description of the Inbound Processing Region assignments for this SIP Trunk, up to 64 characters." }, "voice_region": { "type": "string", "nullable": true, "description": "The Inbound Processing Region used for this SIP Trunk for voice." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date that this SIP Trunk was assigned an Inbound Processing Region, given in ISO 8601 format." }, "date_updated": { "type": "string", "format": "date-time", "nullable": true, "description": "The date that the Inbound Processing Region was updated for this SIP Trunk, given in ISO 8601 format." } } } } }, "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" }, "openapi": "3.0.1", "paths": { "/v2/PhoneNumbers/{PhoneNumber}": { "servers": [ { "url": "https://routes.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "date_created" ], "pathType": "instance" }, "post": { "description": "Assign an Inbound Processing Region to a phone number.", "tags": [ "RoutesV2PhoneNumber" ], "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.v2.phone_number" }, "examples": { "update": { "value": { "phone_number": "+18001234567", "url": "https://routes.twilio.com/v2/PhoneNumbers/+18001234567", "sid": "QQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "friendly_name", "voice_region": "au1", "date_created": "2015-07-30T20:00:00Z", "date_updated": "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" }, "FriendlyName": { "type": "string", "description": "A human readable description of this resource, up to 64 characters." } } }, "examples": { "update": { "value": { "FriendlyName": "friendly_name", "VoiceRegion": "au1" } } } } } } }, "get": { "description": "Fetch the Inbound Processing Region assigned to a phone number.", "tags": [ "RoutesV2PhoneNumber" ], "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.v2.phone_number" }, "examples": { "fetch": { "value": { "phone_number": "+18001234567", "url": "https://routes.twilio.com/v2/PhoneNumbers/+18001234567", "sid": "QQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "friendly_name", "voice_region": "au1", "date_created": "2015-07-30T20:00:00Z", "date_updated": "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" } }, "/v2/SipDomains/{SipDomain}": { "servers": [ { "url": "https://routes.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "date_created" ], "pathType": "instance" }, "post": { "description": "", "tags": [ "RoutesV2SipDomain" ], "parameters": [ { "name": "SipDomain", "in": "path", "description": "", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routes.v2.sip_domain" }, "examples": { "update": { "value": { "url": "https://routes.twilio.com/v2/SipDomains/test.sip.twilio.com", "sip_domain": "test.sip.twilio.com", "sid": "QQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "friendly_name", "voice_region": "au1", "date_created": "2020-08-07T22:29:24Z", "date_updated": "2020-08-07T22:29:24Z" } } } } }, "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": "UpdateSipDomain", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateSipDomainRequest", "properties": { "VoiceRegion": { "type": "string", "description": "" }, "FriendlyName": { "type": "string", "description": "" } } }, "examples": { "update": { "value": { "FriendlyName": "friendly_name", "VoiceRegion": "au1" } } } } } } }, "get": { "description": "", "tags": [ "RoutesV2SipDomain" ], "parameters": [ { "name": "SipDomain", "in": "path", "description": "", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routes.v2.sip_domain" }, "examples": { "fetch": { "value": { "url": "https://routes.twilio.com/v2/SipDomains/test.sip.twilio.com", "account_sid": "AC00000000000000000000000000000000", "sid": "QQ00000000000000000000000000000000", "sip_domain": "test.sip.twilio.com", "friendly_name": "string", "voice_region": "string", "date_created": "2022-06-02T22:33:47Z", "date_updated": "2022-06-02T22:33:47Z" } } } } }, "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": "FetchSipDomain" } }, "/v2/Trunks/{SipTrunkDomain}": { "servers": [ { "url": "https://routes.twilio.com" } ], "description": "", "x-twilio": { "defaultOutputProperties": [ "sid", "friendly_name", "date_created" ], "pathType": "instance" }, "post": { "description": "Assign an Inbound Processing Region to a SIP Trunk", "tags": [ "RoutesV2Trunk" ], "parameters": [ { "name": "SipTrunkDomain", "in": "path", "description": "The absolute URL of the SIP Trunk", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routes.v2.trunks" }, "examples": { "update": { "value": { "sip_trunk_domain": "test.pstn.twilio.com", "url": "https://routes.twilio.com/v2/Trunks/test.pstn.twilio.com", "sid": "QQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "friendly_name": "friendly_name", "voice_region": "au1", "date_created": "2020-08-07T22:29:24Z", "date_updated": "2020-08-07T22:29:24Z" } } } } }, "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": "UpdateTrunks", "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "title": "UpdateTrunksRequest", "properties": { "VoiceRegion": { "type": "string", "description": "The Inbound Processing Region used for this SIP Trunk for voice" }, "FriendlyName": { "type": "string", "description": "A human readable description of this resource, up to 64 characters." } } }, "examples": { "update": { "value": { "FriendlyName": "friendly_name", "VoiceRegion": "au1" } } } } } } }, "get": { "description": "Fetch the Inbound Processing Region assigned to a SIP Trunk.", "tags": [ "RoutesV2Trunk" ], "parameters": [ { "name": "SipTrunkDomain", "in": "path", "description": "The absolute URL of the SIP Trunk", "schema": { "type": "string" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/routes.v2.trunks" }, "examples": { "fetch": { "value": { "sip_trunk_domain": "test.pstn.twilio.com", "url": "https://routes.twilio.com/v2/Trunks/test.pstn.twilio.com", "account_sid": "AC00000000000000000000000000000000", "sid": "QQ00000000000000000000000000000000", "friendly_name": "string", "voice_region": "string", "date_created": "2022-06-02T22:33:47Z", "date_updated": "2022-06-02T22:33:47Z" } } } } }, "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": "FetchTrunks" } } }, "servers": [ { "url": "https://routes.twilio.com" } ], "tags": [ { "name": "RoutesV2PhoneNumber" }, { "name": "RoutesV2SipDomain" }, { "name": "RoutesV2Trunk" } ], "security": [ { "accountSid_authToken": [] } ] }