In general you work with porting orders, a porting order is the resource that keeps the number(s) status and progress in one place.
Before creating port order you should check the portability of the numbers you want to port in, if a number is not portable the order will fail.
POST /portabilityChecks
{
"phoneNumbers": ["+12345678901"]
}If the number is portable you can create an order like this:
POST v1/projects/{projectId}/orders/portIns
{
"desiredPortSchedule": {
"desiredPortDate": "2024-09-25",
},
"phoneNumbers": [
{
"phoneNumber": "+12345678901",
"voiceConfiguration": {
"type": "EST",
"trunkId": "123456"
},
"portOutInfo": {
"existingPortOutPin": "1234"
},
"endUser": {
"name": "John Doe",
"streetName": "Main St",
"streetNum": "123",
"city": "Anytown",
"state": "NY",
"zipCode": "12345"
},
}
]
}