{ "components": { "schemas": { "numbers.v1.bulk_eligibility": { "type": "object", "properties": { "request_id": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^EC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the bulk eligibility check that you want to know about." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "This is the url of the request that you're trying to reach out to locate the resource." }, "results": { "type": "array", "items": {}, "nullable": true, "description": "The result set that contains the eligibility check response for each requested number, each result has at least the following attributes: phone_number: The requested phone number ,hosting_account_sid: The account sid where the phone number will be hosted, country: Phone number\u2019s country, eligibility_status: Indicates the eligibility status of the PN (Eligible/Ineligible), eligibility_sub_status: Indicates the sub status of the eligibility , ineligibility_reason: Reason for number's ineligibility (if applicable), next_step: Suggested next step in the hosting process based on the eligibility status." }, "friendly_name": { "type": "string", "nullable": true, "description": "This is the string that you assigned as a friendly name for describing the eligibility check request." }, "status": { "type": "string", "nullable": true, "description": "This is the status of the bulk eligibility check request. (Example: COMPLETE, IN_PROGRESS)" }, "date_created": { "type": "string", "format": "date-time", "nullable": true }, "date_completed": { "type": "string", "format": "date-time", "nullable": true } } }, "bulk_eligibility_enum_eligibility_status": { "type": "string", "enum": [ "ineligible", "eligible" ] }, "bulk_eligibility_enum_eligibility_sub_status": { "type": "string", "enum": [ "country-ineligible", "number-format-ineligible", "number-type-ineligible", "carrier-ineligible", "already-in-twilio", "internal-processing-error", "invalid-phone-number", "invalid-hosting-account-sid", "eligible", "eligible-by-manual-process" ] }, "numbers.v1.eligibility": { "type": "object", "properties": { "results": { "type": "array", "items": {}, "nullable": true, "description": "The result set that contains the eligibility check response for the requested number, each result has at least the following attributes: phone_number: The requested phone number ,hosting_account_sid: The account sid where the phone number will be hosted, date_last_checked: Datetime (ISO 8601) when the PN was last checked for eligibility, country: Phone number\u2019s country, eligibility_status: Indicates the eligibility status of the PN (Eligible/Ineligible), eligibility_sub_status: Indicates the sub status of the eligibility , ineligibility_reason: Reason for number's ineligibility (if applicable), next_step: Suggested next step in the hosting process based on the eligibility status." } } }, "eligibility_enum_eligibility_status": { "type": "string", "enum": [ "ineligible", "eligible" ] }, "eligibility_enum_eligibility_sub_status": { "type": "string", "enum": [ "country-ineligible", "number-format-ineligible", "number-type-ineligible", "carrier-ineligible", "already-in-twilio", "internal-processing-error", "invalid-phone-number", "invalid-hosting-account-sid", "eligible" ] }, "numbers.v1.porting_port_in": { "type": "object", "properties": { "port_in_request_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^KW[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Port In request. This is a unique identifier of the port in request." }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "The URL of this Port In request" }, "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The Account SID that the numbers will be added to after they are ported into Twilio." }, "notification_emails": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "List of emails for getting notifications about the LOA signing process. Allowed Max 10 emails." }, "target_port_in_date": { "type": "string", "format": "date", "nullable": true, "description": "Minimum number of days in the future (at least 2 days) needs to be established with the Ops team for validation." }, "target_port_in_time_range_start": { "type": "string", "nullable": true, "description": "Minimum hour in the future needs to be established with the Ops team for validation." }, "target_port_in_time_range_end": { "type": "string", "nullable": true, "description": "Maximum hour in the future needs to be established with the Ops team for validation." }, "port_in_request_status": { "type": "string", "nullable": true, "description": "The status of the port in request. The possible values are: In progress, Completed, Expired, In review, Waiting for Signature, Action Required, and Canceled." }, "losing_carrier_information": { "nullable": true, "description": "The information for the losing carrier. " }, "phone_numbers": { "type": "array", "items": {}, "nullable": true, "description": "The list of phone numbers to Port in. Phone numbers are in E.164 format (e.g. +16175551212)." }, "documents": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "The list of documents SID referencing a utility bills" } } }, "numbers.v1.porting_port_in_phone_number": { "type": "object", "properties": { "port_in_request_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^KW[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Port In request. This is a unique identifier of the port in request." }, "phone_number_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^PU[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the Port In request phone number. This is a unique identifier of the phone number." }, "url": { "type": "string", "format": "uri", "nullable": true }, "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The SID of the account that the phone number belongs to." }, "phone_number_type": { "type": "string", "nullable": true, "description": "The type of the phone number." }, "date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "The date when the phone number was created." }, "country": { "type": "string", "format": "iso-country-code", "nullable": true, "description": "The country of the phone number." }, "missing_required_fields": { "type": "boolean", "nullable": true, "description": "The phone number is missing required fields." }, "status_last_time_updated_timestamp": { "type": "string", "format": "date-time", "nullable": true, "description": "The timestamp when the status was last updated." }, "phone_number": { "type": "string", "format": "phone-number", "nullable": true, "description": "The phone number." }, "portable": { "type": "boolean", "nullable": true, "description": "The phone number is portable." }, "not_portability_reason": { "type": "string", "nullable": true, "description": "The reason why the phone number is not portable." }, "not_portability_reason_code": { "type": "string", "nullable": true, "description": "The code of the reason why the phone number is not portable." }, "port_in_phone_number_status": { "type": "string", "nullable": true, "description": "The status of the phone number in the port in request." } } }, "numbers.v1.porting_portability": { "type": "object", "properties": { "phone_number": { "type": "string", "format": "phone-number", "nullable": true, "description": "The phone number which portability is to be checked. Phone numbers are in E.164 format (e.g. +16175551212)." }, "account_sid": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$", "nullable": true, "description": "The target account sid to which the number will be ported" }, "portable": { "type": "boolean", "nullable": true, "description": "Boolean flag specifying if phone number is portable or not." }, "pin_and_account_number_required": { "type": "boolean", "nullable": true, "description": "Boolean flag specifying if PIN and account number is required for the phone number." }, "not_portable_reason": { "type": "string", "nullable": true, "description": "Reason why the phone number cannot be ported into Twilio, `null` otherwise." }, "not_portable_reason_code": { "type": "integer", "nullable": true, "description": "The Portability Reason Code for the phone number if it cannot be ported into Twilio, `null` otherwise. One of `22131`, `22132`, `22130`, `22133`, `22102` or `22135`." }, "number_type": { "type": "string", "$ref": "#/components/schemas/porting_portability_enum_number_type", "nullable": true, "description": "The type of the requested phone number. One of `LOCAL`, `UNKNOWN`, `MOBILE`, `TOLL-FREE`." }, "country": { "type": "string", "format": "iso-country-code", "nullable": true, "description": "Country the phone number belongs to." }, "messaging_carrier": { "type": "string", "nullable": true, "description": "Current messaging carrier of the phone number" }, "voice_carrier": { "type": "string", "nullable": true, "description": "Current voice carrier of the phone number" }, "url": { "type": "string", "format": "uri", "nullable": true, "description": "This is the url of the request that you're trying to reach out to locate the resource." } } }, "porting_portability_enum_number_type": { "type": "string", "enum": [ "LOCAL", "UNKNOWN", "MOBILE", "TOLL-FREE" ] }, "numbers.v1.porting_webhook_configuration": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "nullable": true, "description": "The URL of the webhook configuration request" }, "port_in_target_url": { "type": "string", "format": "uri", "nullable": true, "description": "Webhook URL to send a request when a port in request or port in phone number event happens" }, "port_out_target_url": { "type": "string", "format": "uri", "nullable": true, "description": "Webhook URL to send a request when a port out phone number event happens" }, "notifications_of": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "List of notification events to send a request to the webhook URL" } } }, "numbers.v1.porting_webhook_configuration_delete": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "nullable": true, "description": "The URL of the webhook configuration request" }, "webhook_type": { "type": "string", "$ref": "#/components/schemas/porting_webhook_configuration_delete_enum_webhook_type", "nullable": true, "description": "The of the webhook type of the configuration to be deleted" } } }, "porting_webhook_configuration_delete_enum_webhook_type": { "type": "string", "enum": [ "PORT_IN", "PORT_OUT" ] }, "numbers.v1.porting_webhook_configuration_fetch": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "nullable": true, "description": "The URL of the webhook configuration request" }, "port_in_target_url": { "type": "string", "format": "uri", "nullable": true, "description": "Webhook URL to send a request when a port in request or port in phone number event happens" }, "port_out_target_url": { "type": "string", "format": "uri", "nullable": true, "description": "Webhook URL to send a request when a port out phone number event happens" }, "notifications_of": { "type": "array", "items": { "type": "string" }, "nullable": true, "description": "List of notification events to send a request to the webhook URL" }, "port_in_target_date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "Creation date for the port in webhook configuration" }, "port_out_target_date_created": { "type": "string", "format": "date-time", "nullable": true, "description": "Creation date for the port out webhook configuration" } } } }, "securitySchemes": { "accountSid_authToken": { "type": "http", "scheme": "basic" } } }, "info": { "title": "Twilio - Numbers", "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.56.0" }, "openapi": "3.0.1", "paths": { "/v1/HostedNumber/Eligibility/Bulk": { "servers": [ { "url": "https://numbers.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [], "pathType": "list", "mountName": "bulk_eligibilities" } }, "/v1/HostedNumber/Eligibility/Bulk/{RequestId}": { "servers": [ { "url": "https://numbers.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [], "pathType": "instance", "mountName": "bulk_eligibilities" }, "get": { "description": "Fetch an eligibility bulk check that you requested to host in Twilio.", "tags": [ "NumbersV1BulkEligibility" ], "parameters": [ { "name": "RequestId", "in": "path", "description": "The SID of the bulk eligibility check that you want to know about.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^EC[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/numbers.v1.bulk_eligibility" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchBulkEligibility", "x-maturity": [ "Beta" ] } }, "/v1/HostedNumber/Eligibility": { "servers": [ { "url": "https://numbers.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [], "pathType": "list", "mountName": "eligibilities" } }, "/v1/Porting/PortIn": { "servers": [ { "url": "https://numbers.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [ "port_in_request_sid" ], "pathType": "list", "mountName": "porting_port_ins" } }, "/v1/Porting/PortIn/{PortInRequestSid}": { "servers": [ { "url": "https://numbers.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [ "port_in_request_sid" ], "pathType": "instance", "mountName": "porting_port_ins" }, "delete": { "description": "Allows to cancel a port in request by SID", "tags": [ "NumbersV1PortingPortIn" ], "parameters": [ { "name": "PortInRequestSid", "in": "path", "description": "The SID of the Port In request. This is a unique identifier of the port in request.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^KW[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeletePortingPortIn", "x-maturity": [ "Beta" ] }, "get": { "description": "Fetch a port in request by SID", "tags": [ "NumbersV1PortingPortIn" ], "parameters": [ { "name": "PortInRequestSid", "in": "path", "description": "The SID of the Port In request. This is a unique identifier of the port in request.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^KW[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/numbers.v1.porting_port_in" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchPortingPortIn", "x-maturity": [ "Beta" ] } }, "/v1/Porting/PortIn/{PortInRequestSid}/PhoneNumber/{PhoneNumberSid}": { "servers": [ { "url": "https://numbers.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [ "port_in_request_sid", "phone_number_sid" ], "pathType": "instance", "mountName": "porting_port_in_phone_number" }, "delete": { "description": "Allows to cancel a port in request phone number by SID", "tags": [ "NumbersV1PortingPortInPhoneNumber" ], "parameters": [ { "name": "PortInRequestSid", "in": "path", "description": "The SID of the Port In request. This is a unique identifier of the port in request.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^KW[0-9a-fA-F]{32}$" }, "required": true }, { "name": "PhoneNumberSid", "in": "path", "description": "The SID of the Port In request phone number. This is a unique identifier of the phone number.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^PU[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeletePortingPortInPhoneNumber", "x-maturity": [ "Beta" ] }, "get": { "description": "Fetch a phone number by port in request SID and phone number SID", "tags": [ "NumbersV1PortingPortInPhoneNumber" ], "parameters": [ { "name": "PortInRequestSid", "in": "path", "description": "The SID of the Port In request. This is a unique identifier of the port in request.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^KW[0-9a-fA-F]{32}$" }, "required": true }, { "name": "PhoneNumberSid", "in": "path", "description": "The SID of the Phone number. This is a unique identifier of the phone number.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^PU[0-9a-fA-F]{32}$" }, "required": true } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/numbers.v1.porting_port_in_phone_number" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchPortingPortInPhoneNumber", "x-maturity": [ "Beta" ] } }, "/v1/Porting/Portability/PhoneNumber/{PhoneNumber}": { "servers": [ { "url": "https://numbers.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [], "pathType": "instance", "mountName": "porting_portabilities" }, "get": { "description": "Allows to check if a single phone number can be ported to Twilio or not.", "tags": [ "NumbersV1PortingPortability" ], "parameters": [ { "name": "PhoneNumber", "in": "path", "description": "The phone number which portability is to be checked. Phone numbers are in E.164 format (e.g. +16175551212).", "schema": { "type": "string", "format": "phone-number" }, "required": true }, { "name": "TargetAccountSid", "in": "query", "description": "The SID of the account where the phone number(s) will be ported.", "schema": { "type": "string", "minLength": 34, "maxLength": 34, "pattern": "^AC[0-9a-fA-F]{32}$" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/numbers.v1.porting_portability" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchPortingPortability", "x-maturity": [ "Beta" ] } }, "/v1/Porting/Configuration/Webhook": { "servers": [ { "url": "https://numbers.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [], "pathType": "list", "mountName": "porting_webhook_configurations" }, "get": { "description": "Allows to fetch the webhook configuration", "tags": [ "NumbersV1PortingWebhookConfigurationFetch" ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/numbers.v1.porting_webhook_configuration_fetch" } } }, "description": "OK" } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "FetchPortingWebhookConfigurationFetch", "x-maturity": [ "Beta" ], "x-twilio": { "mountName": "porting_webhook_configuration_fetch" } } }, "/v1/Porting/Configuration/Webhook/{WebhookType}": { "servers": [ { "url": "https://numbers.twilio.com" } ], "description": "TODO: Resource-level docs", "x-twilio": { "defaultOutputProperties": [], "pathType": "instance", "mountName": "porting_webhook_configurations_delete", "className": "porting_webhook_configuration_delete" }, "delete": { "description": "Allows the client to delete a webhook configuration.", "tags": [ "NumbersV1PortingWebhookConfigurationDelete" ], "parameters": [ { "name": "WebhookType", "in": "path", "description": "The of the webhook type of the configuration to be deleted", "schema": { "type": "string", "$ref": "#/components/schemas/porting_webhook_configuration_delete_enum_webhook_type" }, "required": true } ], "responses": { "204": { "description": "The resource was deleted successfully." } }, "security": [ { "accountSid_authToken": [] } ], "operationId": "DeletePortingWebhookConfigurationDelete", "x-maturity": [ "Beta" ] } } }, "servers": [ { "url": "https://numbers.twilio.com" } ], "tags": [ { "name": "NumbersV1BulkEligibility" }, { "name": "NumbersV1PortingPortIn" }, { "name": "NumbersV1PortingPortInPhoneNumber" }, { "name": "NumbersV1PortingPortability" }, { "name": "NumbersV1PortingWebhookConfigurationDelete" }, { "name": "NumbersV1PortingWebhookConfigurationFetch" } ], "x-maturity": [ { "name": "Beta", "description": "PLEASE NOTE that this is a Beta product that is subject to change. Use it with caution." } ] }