Fetch a phone number by port in request SID and phone number SID

GET /v1/Porting/PortIn/{PortInRequestSid}/PhoneNumber/{PhoneNumberSid}

Fetch a phone number by port in request SID and phone number SID

Path parameters

  • PortInRequestSid string Required

    The SID of the Port In request. This is a unique identifier of the port in request.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^KW[0-9a-fA-F]{32}$.

  • PhoneNumberSid string Required

    The SID of the Phone number. This is a unique identifier of the phone number.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^PU[0-9a-fA-F]{32}$.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • port_in_request_sid string | null

      The unique identifier for the port in request that this phone number is associated with.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^KW[0-9a-fA-F]{32}$.

    • phone_number_sid string | null

      The unique identifier for this phone number associated with this port in request.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^PU[0-9a-fA-F]{32}$.

    • url string(uri) | null

      URL reference for this resource.

    • account_sid string | null

      Account Sid or subaccount where the phone number(s) will be Ported.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • phone_number_type string | null

      The number type of the phone number. This can be: toll-free, local, mobile or unknown. This field may be null if the number is not portable or if the portability for a number has not yet been evaluated.

    • date_created string(date-time) | null

      The timestamp for when this port in phone number was created.

    • country string(iso-country-code) | null

      The ISO country code that this number is associated with. This field may be null if the number is not portable or if the portability for a number has not yet been evaluated.

    • missing_required_fields boolean | null

      Indicates if the phone number is missing required fields such as a PIN or account number. This field may be null if the number is not portable or if the portability for a number has not yet been evaluated.

    • last_updated string(date-time) | null

      Timestamp indicating when the Port In Phone Number resource was last modified.

    • phone_number string(phone-number) | null

      Phone number to be ported. This will be in the E164 Format.

    • portable boolean | null

      If the number is portable by Twilio or not. This field may be null if the number portability has not yet been evaluated. If a number is not portable reference the not_portability_reason_code and not_portability_reason fields for more details

    • not_portability_reason string | null

      The not portability reason code description. This field may be null if the number is portable or if the portability for a number has not yet been evaluated.

    • not_portability_reason_code integer | null

      The not portability reason code. This field may be null if the number is portable or if the portability for a number has not yet been evaluated.

    • port_in_phone_number_status string | null

      The status of the port in phone number.

    • port_out_pin integer | null

      The pin required by the losing carrier to do the port out.

    • rejection_reason string | null

      The description of the rejection reason provided by the losing carrier. This field may be null if the number has not been rejected by the losing carrier.

    • rejection_reason_code integer | null

      The code for the rejection reason provided by the losing carrier. This field may be null if the number has not been rejected by the losing carrier.

    • port_date string(date-time) | null

      The timestamp the phone number will be ported. This will only be set once a port date has been confirmed. Not all carriers can guarantee a specific time on the port date. Twilio will try its best to get the port completed by this time on the port date. Please subscribe to webhooks for confirmation on when a port has actually been completed.

GET /v1/Porting/PortIn/{PortInRequestSid}/PhoneNumber/{PhoneNumberSid}
curl \
 --request GET 'https://numbers.twilio.com/v1/Porting/PortIn/{PortInRequestSid}/PhoneNumber/{PhoneNumberSid}' \
 --user "username:password"
Response examples (200)
{
  "url": "https://numbers.twilio.com/v1/Porting/PortIn/KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumber/PUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "country": "US",
  "portable": true,
  "port_date": "2024-05-17T00:00:00Z",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2024-04-10T06:52:21Z",
  "last_updated": "2024-03-12T06:52:21Z",
  "phone_number": "+15024953384",
  "port_out_pin": 1234,
  "phone_number_sid": "PUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "rejection_reason": null,
  "phone_number_type": "LOCAL",
  "port_in_request_sid": "KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "rejection_reason_code": null,
  "not_portability_reason": "ALREADY_IN_TWILIO_DIFFERENT_OWNER",
  "missing_required_fields": false,
  "not_portability_reason_code": 22132,
  "port_in_phone_number_status": "in_review"
}