# PortIn resource

> \[!IMPORTANT]
>
> The Porting API is in Public Beta. The information in this document could change. We might add or update features before the product becomes Generally Available. Beta products don't have a Service Level Agreement (SLA). Learn more about [beta product support](https://help.twilio.com/articles/115002413087-Twilio-Beta-product-support).

The PortIn resource represents a port-in request for a set of phone numbers to Twilio. A port-in request contains potentially many [phone numbers](/docs/phone-numbers/port-in/port-in-phone-numbers). A port-in request allows you to group assets shared across multiple phone numbers, but every phone number is an independent resource. For example, you can use one LOA for all phone numbers in a single port-in request. Twilio generates the LOA based on the authorized representative information in the port-in request and other fields that are also shared for all phone numbers in that request. The [porting webhooks](/docs/phone-numbers/port-in/porting-webhooks) and [PhoneNumber resources](/docs/phone-numbers/port-in/port-in-phone-numbers) give you visibility and access to handle basic errors during the port-in process.

## Limitations

The PortIn resource has the following restrictions:

* Country available: United States
* Supported number types: Landline and mobile. Toll-free numbers are not currently supported.
* Maximum of 1,000 phone numbers per request.
* You must upload a utility bill using the [Documents API](/docs/phone-numbers/document-apis) prior to submitting the request.
* The Port In resource doesn't support moving an existing Twilio number from one account to another. See [Moving Twilio Phone Numbers to another Twilio Account](https://help.twilio.com/articles/223135327) in the Twilio Help Center to learn more.

## PortIn Properties

```json
{"type":"object","refName":"numbers.v1.porting_port_in","modelName":"numbers_v1_porting_port_in","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":"Account Sid or subaccount where the phone number(s) will be Ported"},"notification_emails":{"type":"array","nullable":true,"description":"Additional emails to send a copy of the signed LOA to.","items":{"type":"string"}},"target_port_in_date":{"type":"string","format":"date","nullable":true,"description":"Target date to port the number. We cannot guarantee that this date will be honored by the other carriers, please work with Ops to get a confirmation of the firm order commitment (FOC) date. Expected format is ISO Local Date, example: ‘2011-12-03`. This date must be at least 7 days in the future for US ports and 10 days in the future for Japanese ports. If a start and end range is provided, the date will be converted to its UTC equivalent with the ranges as reference and stored in UTC. We can't guarantee the exact date and time, as this depends on the losing carrier."},"target_port_in_time_range_start":{"type":"string","nullable":true,"description":"The earliest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00'. We can't guarantee the exact date and time, as this depends on the losing carrier. The time will be stored and returned as UTC standard timezone."},"target_port_in_time_range_end":{"type":"string","nullable":true,"description":"The latest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00'. We can't guarantee the exact date and time, as this depends on the losing carrier. The time will be stored and returned as UTC standard timezone."},"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."},"order_cancellation_reason":{"type":"string","nullable":true,"description":"If the order is cancelled this field will provide further context on the cause of the cancellation."},"losing_carrier_information":{"nullable":true,"description":"Details regarding the customer’s information with the losing carrier. These values will be used to generate the letter of authorization and should match the losing carrier’s data as closely as possible to ensure the port is accepted.","title":"Losing carrier information","type":"object","required":["customer_name","authorized_representative","authorized_representative_email"],"refName":"numbers.v1.porting_losing_carrier_information","modelName":"numbers_v1_porting_losing_carrier_information","properties":{"customer_name":{"type":"string","description":"Customer name as it is registered with the losing carrier. This can be an individual or a business name depending on the customer type selected."},"account_number":{"type":"string","description":"The account number of the customer for the losing carrier. Only require for mobile phone numbers."},"account_telephone_number":{"type":"string","description":"The account phone number of the customer for the losing carrier."},"address_sid":{"type":"string","description":"If you already have an Address SID that represents the address needed for the LOA, you can provide an Address SID instead of providing the address object in the request body. This will copy the address into the port in request. If changes are made to the Address SID after port in request creation, those changes will not be reflected in the port in request."},"address":{"description":"The customer’s billing address with the losing carrier. It must match the address they have registered with the losing carrier.","title":"Address","type":"object","required":["street","city","state","zip","country"],"refName":"numbers.v1.porting_address","modelName":"numbers_v1_porting_address","properties":{"street":{"type":"string","description":"The street address, ex: 101 Spear St"},"street_2":{"type":"string","description":"The building information, ex : 5th floor."},"city":{"type":"string","description":"The city name, ex: San Francisco."},"state":{"type":"string","description":"The state name, ex: CA or California. Note this should match the losing carrier’s information exactly. So if they spell out the entire state’s name instead of abbreviating it, please do so."},"zip":{"type":"string","description":"The zip code, ex: 94105."},"country":{"type":"string","description":"The country, ex: USA."}}},"authorized_representative":{"type":"string","description":"The first and last name of the person listed with the losing carrier who is authorized to make changes on the account."},"authorized_representative_email":{"type":"string","format":"email","description":"Email address of the person (owner of the number) who will sign the letter of authorization for the port in request. This email address should belong to the person named in as the authorized representative."},"customer_type":{"type":"string","enum":["Business","Individual"],"description":"The type of customer account in the losing carrier. This should either be: 'Individual' or 'Business'."},"authorized_representative_katakana":{"type":"string"},"sub_municipality":{"type":"string"},"building":{"type":"string"},"katakana_name":{"type":"string"}}},"phone_numbers":{"type":"array","nullable":true,"items":{"title":"Phone number result","type":"object","refName":"numbers.v1.porting_port_in_phone_number_result","modelName":"numbers_v1_porting_port_in_phone_number_result","properties":{"not_portability_reason":{"type":"string","nullable":true,"description":"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":{"type":"integer","nullable":true,"description":"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."},"number_type":{"type":"string","nullable":true,"description":"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."},"phone_number":{"type":"string","nullable":false,"description":"Phone number to be ported. This will be in the E164 Format."},"port_date":{"type":"string","nullable":true,"format":"date-time","description":"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."},"port_in_phone_number_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^PU[0-9a-fA-F]{32}$","description":"The SID of the Phone number. This is a unique identifier of the phone number."},"port_in_phone_number_status":{"type":"string","nullable":false,"description":"The status of the port in phone number."},"portable":{"type":"boolean","nullable":true,"description":"Whether 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"},"rejection_reason":{"type":"string","nullable":true,"description":"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":{"type":"string","nullable":true,"description":"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."},"status_last_time_updated_timestamp":{"type":"string","nullable":true,"description":"Timestamp indicating when the Port In Phone Number resource was last modified."},"external_porting_vendor_phone_number_id":{"type":"string","nullable":true}}}},"bundle_sid":{"type":"string","nullable":true,"description":"The bundle sid is an optional identifier to reference a group of regulatory documents for a port request."},"portability_advance_carrier":{"type":"string","nullable":true,"description":"A field only required for Japan port in requests. It is a unique identifier for the donor carrier service the line is being ported from."},"auto_cancel_approval_numbers":{"type":"string","nullable":true,"description":"Japan specific field, indicates the number of phone numbers to automatically approve for cancellation."},"documents":{"type":"array","nullable":true,"description":"List of document SIDs for all phone numbers included in the port in request. At least one document SID referring to a document of the type Utility Bill is required.","items":{"type":"string"}},"date_created":{"type":"string","format":"date-time","nullable":true},"support_ticket_id":{"type":"integer","description":"Unique ID of the request's support ticket"},"signature_request_url":{"format":"uri","type":"string","nullable":true}}}
```

### `phone_number` nested properties

The following table describes the

| Property       | Data type | Required | Country | Description                                                                                                                                                                                                                                 |
| -------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `phone_number` | String    | Yes      | All     | Phone number to be ported. This must be in E164 format.                                                                                                                                                                                     |
| `pin`          | String    | No       | All     | If the phone number is mobile, this field is mandatory to process a porting request. A PIN is the security tool designed to prevent unauthorized use of the SIM card (chip) of a phone number. It should be provided by the losing carrier. |

### `losing_carrier_information` nested properties

The "losing carrier" is the carrier that you're porting away from. The following table describes the child properties of the `losing_carrier_information` property.

| Property                             | Data type | Required | Country | Description                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------------------ | --------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `customer_type`                      | String    | Yes      | All     | The type of customer account in the losing carrier. This should either be: `Individual` or `Business`.                                                                                                                                                                                                                                                                 |
| `customer_name`                      | String    | Yes      | All     | Customer name as it is registered with the losing carrier. This can be an individual or a business name depending on the customer type selected.                                                                                                                                                                                                                       |
| `account_number`                     | String    | No       | All     | Customer account number in the carrier who owns numbers to be ported. It's mandatory for US local numbers.                                                                                                                                                                                                                                                             |
| `account_telephone_number`           | String    | Yes      | All     | Primary number that carriers identify with an account. US local numbers require this parameter. If you don't know the value, add the same phone number as the ported-in number.                                                                                                                                                                                        |
| `address_sid`                        | String    | No       | All     | If you already have an Address SID that represents the address needed for the LOA, you can provide an Address SID instead of providing the address object in the request body. This will copy the address into the port-in request. If changes are made to the Address SID after port-in request creation, those changes will not be reflected in the port-in request. |
| `address`                            | Object    | No       | All     | The customer's billing address with the losing carrier. It must match the address they have registered with the losing carrier.                                                                                                                                                                                                                                        |
| `address.street`                     | String    | No       | All     | The street address, ex: 101 Spear St                                                                                                                                                                                                                                                                                                                                   |
| `address.street_2`                   | String    | No       | All     | The building information, ex : 5th floor                                                                                                                                                                                                                                                                                                                               |
| `address.city`                       | String    | No       | All     | The city name, ex: San Francisco                                                                                                                                                                                                                                                                                                                                       |
| `address.state`                      | String    | No       | All     | The state name, ex: CA or California. this should match the losing carrier's information exactly.                                                                                                                                                                                                                                                                      |
| `address.zip`                        | String    | No       | All     | The zip code, ex: 94105                                                                                                                                                                                                                                                                                                                                                |
| `address.country`                    | String    | No       | All     | The country, ex: US, JP                                                                                                                                                                                                                                                                                                                                                |
| `authorized_representative`          | String    | Yes      | All     | The first and last name of the person listed with the losing carrier who is authorized to make changes on the account.                                                                                                                                                                                                                                                 |
| `authorized_representative_email`    | String    | Yes      | All     | Email address of the person (owner of the number) who will sign the letter of authorization for the port-in request. This email address should belong to the person named in as the authorized representative.                                                                                                                                                         |
| `authorized_representative_katakana` | String    | No       | Japan   | Authorized representative's name written in Katakana characters.                                                                                                                                                                                                                                                                                                       |
| `portability_advance_carrier`        | String    | Yes      | Japan   | Specific carrier service into which you port the phone numbers. To learn more about these values, see the [full list of values](/docs/phone-numbers/port-in/porting-values).                                                                                                                                                                                           |
| `auto_cancel_approval_numbers`       | String    | No       | Japan   | If you aren't porting all numbers in the group, this sets the quantity of 0ABJ numbers that the donor carrier should terminate during port in. To not terminate any numbers, set this value to `0`. This value can't exceed the number of lines in the port-in request.                                                                                                |

## Create a port-in request

`POST https://numbers.twilio.com/v1/Porting/PortIn`

### Request

Create port-in request

```bash
$ curl --location 'https://numbers.twilio.com/v1/Porting/PortIn' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic {{YOUR TOKEN HERE}}' \
--data-raw '{
	"account_sid": "AC5d169368692aa8ab93638f0efb556ba3",
	"target_port_in_date": "2024-10-31",
	"target_port_in_time_range_start": "10:15:00-08:00",
	"target_port_in_time_range_end": "23:15:00-08:00",
	"notification_emails": ["bar@twilio.com", "foo@twilio.com"],
	"losing_carrier_information": {
    	    	"customer_type": "Business",
    	    	"customer_name": "FooBar Inc.",
    	    	"account_number": "Test123",
    	    	"account_telephone_number": "+16175551212",
    	    	"authorized_representative": "John Smith",
    	    	"authorized_representative_email": "foo@twilio.com",
            "address_sid": null,
    	    	"address": {
        	    "street": "101 Spear St",
        	    "street_2": "5th floor",
        	    "city": "San Francisco",
        	    "state": "CA",
        	    "zip": "94105",
        	    "country": "US"
    	    	}
	},
	"phone_numbers": [
	    	{
        		"phone_number": "+13802075834",
	        	"pin": null
    		}
	],
	"documents": [
    		"RD0f36b9a5a6a700fb5949ea9959d041c3"
	]
}'
```

```json
{
  "account_sid": "AC5d169368692aa8ab93638f0efb556ba3",
  "target_port_in_date": "2024-10-31",
  "port_in_request_sid": "KW5096cf8e95c21761161c4f0388074b3a",
  "port_in_request_status": "In Progress",
  "target_port_in_time_range_start": "10:15:00-08:00",
  "target_port_in_time_range_end": "23:15:00-08:00",
  "date_created": "2024-05-03T16:13:10Z",
  "notification_emails": ["bar@twilio.com", "foo@twilio.com"],
  "losing_carrier_information": {
    "customer_type": "Business",
    "customer_name": "FooBar Inc.",
    "account_number": "Test123",
    "account_telephone_number": "+16175551212",
    "authorized_representative": "John Smith",
    "authorized_representative_email": "foo@twilio.com",
    "address_sid": null,
    "address": {
      "street": "101 Spear St",
      "street_2": "5th floor",
      "city": "San Francisco",
      "state": "CA",
      "zip": "94105",
      "country": "US"
    },
    "authorized_representative_katakana": null,
    "subscription_right": null,
    "pre_adjustment_article": null,
    "mnp_article": null,
    "losing_carrier_name": null
  },
  "phone_numbers": [
    {
      "phone_number": "+13503331359",
      "portable": true,
      "rejection_reason": null,
      "port_in_phone_number_status": "in_review",
      "rejection_reason_code": null,
      "not_portability_reason": null,
      "port_in_phone_number_sid": "PUf0e8205043b2a805a1672eb137043afd",
      "not_portability_reason_code": null
    }
  ],
  "documents": [
    "RD0f36b9a5a6a700fb5949ea9959d041c3"
  ]
}
```

### Error responses

| HTTP status code |                                                                                                               Response                                                                                                               | Next steps                                                                                                                                                                  |
| :--------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|       `400`      |                  `{` <br /> `"code": 400,` <br /> `"message": "phoneNumbers: size must be between 1 and 1000",` <br /> ` "more_info": "https://www.twilio.com/docs/errors/400",` <br /> `"status": 400` <br /> `} `                  | Review the message value to determine what fields you need to correct. After correcting the values in your request, try to send the request again.                          |
|       `400`      |                                `{ ` <br /> `"code": 400, ` <br /> `"message": "Invalid documents",` <br /> `"more_info": "https://www.twilio.com/docs/errors/400",` <br /> `"status": 400 ` <br /> `}`                               | Confirm that you provided at least one document SIDs in the documents field. At least one of the provided document SIDs must refer to a document of the type "Utility Bill" |
|       `403`      | `{` <br /> `"code": 20403, ` <br /> `"message": "Account lacks permission to access the API (possibly suspended or closed)",` <br /> ` "more_info": "https://www.twilio.com/docs/errors/20403",` <br /> ` "status": 403` <br /> `} ` | This indicates you do not have access to port numbers into this account.<br /> Confirm you've got the correct Account Sid and try again.                                    |
|       `500`      |                    `{` <br /> `"code": 20500, ` <br /> `"message": "An internal server error has occurred",` <br /> ` "more_info": "https://www.twilio.com/docs/errors/20500",` <br /> ` "status": 500` <br /> `}`                   | This indicates there was an error within Twilio while trying to create the port-in request. Try again and contact support if the issue persists.                            |

## Get all Port-In Requests

`GET https://numbers.twilio.com/v1/Porting/PortIn/PortInRequests`

### Request

|       Property      | Data Type |                                   Description                                   |               Example               |
| :-----------------: | :-------: | :-----------------------------------------------------------------------------: | :---------------------------------: |
|     CreatedAfter    |   String  |                      Find all created after a certain date                      |             `2025-03-05`            |
|    CreatedBefore    |   String  |                      Find all created before a certain date                     |             `2025-03-05`            |
| PortInRequestStatus |   String  |                     Filter by the status of a PortInRequest                     |              `Canceled`             |
|   PortInRequestSid  |   String  | Filter by the SID of a PortInRequest, supports multiple values separated by `,` | `KW456bbb456bbb456bbb456bbb456bbb4` |
|         Size        |    Int    |                             Number of items per page                            |                 `20`                |
|        Token        |   String  |         Page start token, if null then it will start from the beginning         | `KW123aaa123aaa123aaa123aaa123aaa1` |

Get all port-in requests

```bash
$ curl --location 'https://numbers.twilio.com/v1/Porting/PortIn/PortInRequests?Size=1&CreatedAfter=2025-02-05' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic {{YOUR TOKEN HERE}}' \
```

```json
{
  "meta": {
    "next_token": "KW123aaa123aaa123aaa123aaa123aaa1",
    "previous_token": null
  },
  "port_in_requests": [
    {
      "phone_numbers_ported": 0,
      "phone_numbers_requested": 1,
      "port_in_request_sid": "KW456bbb456bbb456bbb456bbb456bbb4",
      "port_in_request_status": "In Progress",
      "status_last_updated_timestamp": "2025-03-05T13:50:06Z",
      "suggested_action": null
    }
  ]
}
```

## Fetch a port-in request

`GET https://numbers.twilio.com/v1/Porting/PortIn/{PortInRequestSid}`

### Path parameters

```json
[{"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}]
```

Fetch a PortIn

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchPortingPortIn() {
  const portingPortIn = await client.numbers.v1
    .portingPortIns("KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .fetch();

  console.log(portingPortIn.portInRequestSid);
}

fetchPortingPortIn();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

porting_port_in = client.numbers.v1.porting_port_ins(
    "KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).fetch()

print(porting_port_in.port_in_request_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Numbers.V1;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var portingPortIn = await PortingPortInResource.FetchAsync(
            pathPortInRequestSid: "KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

        Console.WriteLine(portingPortIn.PortInRequestSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.numbers.v1.PortingPortIn;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        PortingPortIn portingPortIn = PortingPortIn.fetcher("KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch();

        System.out.println(portingPortIn.getPortInRequestSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	resp, err := client.NumbersV1.FetchPortingPortIn("KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.PortInRequestSid != nil {
			fmt.Println(*resp.PortInRequestSid)
		} else {
			fmt.Println(resp.PortInRequestSid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$porting_port_in = $twilio->numbers->v1
    ->portingPortIns("KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->fetch();

print $porting_port_in->portInRequestSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

porting_port_in = @client
                  .numbers
                  .v1
                  .porting_port_ins('KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
                  .fetch

puts porting_port_in.port_in_request_sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:numbers:v1:porting:port-in:fetch \
   --port-in-request-sid KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X GET "https://numbers.twilio.com/v1/Porting/PortIn/KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

```json
{
  "port_in_request_sid": "KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://numbers.twilio.com/v1/Porting/PortIn/KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "bundle_sid": null,
  "portability_advance_carrier": null,
  "auto_cancel_approval_numbers": null,
  "notification_emails": [
    "user@domain.com"
  ],
  "target_port_in_date": "2023-09-10",
  "target_port_in_time_range_start": "10:00:00+01:00",
  "target_port_in_time_range_end": "20:00:00+01:00",
  "port_in_request_status": "pending",
  "support_ticket_id": 123456,
  "order_cancellation_reason": null,
  "date_created": "2023-09-10T06:52:21Z",
  "losing_carrier_information": {
    "customer_type": "Business",
    "customer_name": "Customer name for carrier",
    "authorized_representative": "John Smith",
    "authorized_representative_email": "signer@domain.com",
    "account_number": "123456",
    "account_telephone_number": "+133232323",
    "address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "authorized_representative_katakana": "ジョン スミス",
    "building": null,
    "katakana_name": null,
    "sub_municipality": null,
    "address": {
      "street": "Your Street",
      "street_2": "Other Street or null",
      "city": "City",
      "state": "State",
      "zip": "000000",
      "country": "US"
    }
  },
  "phone_numbers": [
    {
      "phone_number": "+16175551212",
      "number_type": "LOCAL",
      "rejection_reason": null,
      "rejection_reason_code": null,
      "status_last_time_updated_timestamp": "2025-01-01T00:52:21Z",
      "portable": true,
      "not_portability_reason": "string",
      "not_portability_reason_code": 0,
      "port_in_phone_number_sid": "PUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "port_in_phone_number_status": "In Review",
      "port_date": "2023-09-17T00:00:00Z",
      "external_porting_vendor_phone_number_id": null
    }
  ],
  "documents": [
    "RDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
  ],
  "signature_request_url": null
}
```

## Cancel a port-in request

`DELETE https://numbers.twilio.com/v1/Porting/PortIn/{PortInRequestSid}`

To cancel a port-in request you can send a `DELETE` request to the API. This
will cancel the porting request and all associated phone number requests.
Twilio is only able to accept cancellations that occur more than 72 hrs before
the port in date.

### Path parameters

```json
[{"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}]
```

Delete a PortIn

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function deletePortingPortIn() {
  await client.numbers.v1
    .portingPortIns("KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    .remove();
}

deletePortingPortIn();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

client.numbers.v1.porting_port_ins(
    "KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
).delete()
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Numbers.V1;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        await PortingPortInResource.DeleteAsync(
            pathPortInRequestSid: "KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.numbers.v1.PortingPortIn;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        PortingPortIn.deleter("KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete();
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	err := client.NumbersV1.DeletePortingPortIn("KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$twilio->numbers->v1
    ->portingPortIns("KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
    ->delete();
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client
  .numbers
  .v1
  .porting_port_ins('KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
  .delete
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:numbers:v1:porting:port-in:remove \
   --port-in-request-sid KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
```

```bash
curl -X DELETE "https://numbers.twilio.com/v1/Porting/PortIn/KWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```
