# Create port-in order

Create an order to port phone numbers from another carrier into Sinch. Refer to the Port-In Status section for more information on port-in order updates.
Please note that order will fail if you try to port numbers that are not portable, so you should always use the portability check before creating an order.

Note: For port orders of over 500 numbers, please contact the support team.

Note: In order to send SMS and MMS messages in the US using 10DLC phone numbers, all messages must be sent via an approved campaign. Your campaigns are managed under US 10DLC Campaigns in the SMS section. A number can be associated to an approved campaign after the port completes.

Endpoint: POST /orders/portIns
Version: 1.0
Security: basicAuth, bearerAuth

## Request fields (application/json):

  - `desiredPortSchedule` (object, required)
    The date and time you want the numbers to be ported in. If you set a defaultPortTime and defaultPortTimeZone in defaults those settings will be used if not set per order. If you haven't set defaults and do not set the time and time zone on the order the system default will be used. System Default Time: 09:00:00 US/Eastern

  - `desiredPortSchedule.desiredPortDate` (string, required)
    The date you want the numbers to be ported in, in ISO format.
    Example: "2025-01-31"

  - `desiredPortSchedule.desiredPortTime` (string)
    The time you want the numbers to be ported in.
    Example: "09:00:00"

  - `desiredPortSchedule.desiredPortTimeZone` (string)
    The time zone you want to use for the desired port time.
    Enum: "US/Eastern", "US/Central", "US/Mountain", "US/Pacific", "GMT"

  - `phoneNumbers` (array, required)
    The numbers for the order in e164 format

  - `phoneNumbers.phoneNumber` (string, required)
    The phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format.
    Example: "+12345678901"

  - `phoneNumbers.endUser` (object, required)
    If specified, this will override the endUser for the order.

  - `phoneNumbers.endUser.name` (string, required)
    The name of the end user can be a person's name or company name. Please note if you are not using this yourself it should be the name/company of the actual user.
    Example: "Joe Doe"

  - `phoneNumbers.endUser.streetNum` (string, required)
    The end user's street number.
    Example: "123"

  - `phoneNumbers.endUser.streetName` (string, required)
    The end user's street name.
    Example: "Main"

  - `phoneNumbers.endUser.city` (string, required)
    The end user's city.
    Example: "Anytown"

  - `phoneNumbers.endUser.state` (string, required)
    The end user's state, using the two letter abbreviation.
    Example: "CA"

  - `phoneNumbers.endUser.zipCode` (string, required)
    The end user's zip code.
    Example: "12345"

  - `phoneNumbers.endUser.streetPreDir` (string)
    The prefix direction in the end user's address, if any.
    Example: "N"

  - `phoneNumbers.endUser.streetType` (string)
    The end user's street type, for example Road or Court.
    Example: "Court"

  - `phoneNumbers.endUser.streetPostDir` (string)
    The suffix direction in the end user's address, if any.
    Example: "SW"

  - `phoneNumbers.endUser.locationType1` (string)
    Any additional location information, such as suite or apartment.
    Example: "Suite"

  - `phoneNumbers.endUser.locationValue1` (string)
    Any additional location information, such as suite number or apartment number.
    Example: "2134"

  - `phoneNumbers.endUser.locationType2` (string)
    Field for additional location information, such as suite number or apartment number.

  - `phoneNumbers.endUser.locationValue2` (string)
    Field for additional location information, such as suite number or apartment number.

  - `phoneNumbers.endUser.locationType3` (string)
    Field for additional location information, such as suite number or apartment number.

  - `phoneNumbers.endUser.locationValue3` (string)
    Field for additional location information, such as suite number or apartment number.

  - `phoneNumbers.endUser.typeOfService` (string)
    The type of address. Available values are B for Business or R for Residence
    Enum: "B", "R"

  - `phoneNumbers.portOutInfo` (object, required)
    The port out information at the previous carrier for the number. Usually only a port-out PIN is required.

  - `phoneNumbers.portOutInfo.existingPortOutPin` (string)
    The existing port-out PIN from the previous carrier.

  - `phoneNumbers.portOutInfo.accountNum` (string)
    The account number associated with the number from the previous carrier.

  - `phoneNumbers.portOutInfo.accountPhoneNumber` (string)
    The contact phone number on the account.

  - `phoneNumbers.portOutInfo.authorizingName` (string)
    Name of the person authorizing the port-in.

  - `phoneNumbers.portOutInfo.authorizingDate` (string)
    Date of authorizing the port-in (must be today or earlier and cannot be in the future), in YYYY-MM-DD format.
    Example: "2024-09-24"

  - `phoneNumbers.voiceConfiguration` (any) — one of (discriminator: type):
    If specified, this will override the voice configuration for the order.
    - RTC:
      - `type` (string)
        Enum: "RTC"
      - `appId` (string)
        The app id from the dashboard where you want to use the number
        Example: "6afd2da3-1692-4443-834c-8a2f386ec284"
    - EST:
      - `type` (string)
        Enum: "EST"
      - `trunkId` (string)
        Example: "01G65Z755AFWAKHE12NY0CQ9FH"
    - FAX:
      - `type` (string)
        Enum: "FAX"
      - `serviceId` (string)
        Example: "01G65Z755GHWAKHE12NY0CQO0T"

  - `phoneNumbers.smsConfiguration` (object)
    If specified, this will override the sms configuration for the order.

  - `phoneNumbers.smsConfiguration.smsAppId` (string)

  - `phoneNumbers.features` (object)

  - `phoneNumbers.features.e911` (object)
    An object describing the emergency 911 contact address associated with the number.

  - `phoneNumbers.features.e911.name` (string)
    The contact name.

  - `phoneNumbers.features.e911.streetNum` (string)
    The street number for the emergency address.
    Example: "12345"

  - `phoneNumbers.features.e911.streetInfo` (string)
    The street name of the emergency location.
    Example: "Main St"

  - `phoneNumbers.features.e911.location` (string)
    The location for address.
    Example: "Apt 5"

  - `phoneNumbers.features.e911.city` (string)
    The city of the emergency location.
    Example: "Springfield"

  - `phoneNumbers.features.e911.state` (string)
    The state or province of the emergency location.
    Example: "IL"

  - `phoneNumbers.features.e911.postalCode` (string)
    The postal code of the emergency location.
    Example: "62701"

  - `phoneNumbers.features.e911.postalCodePlusFour` (string)
    The postal code of the emergency location.
    Example: "1234"

  - `phoneNumbers.newPortOutPin` (string)

  - `customerOrderReference` (string)
    Your reference you specified when creating the order
    Example: "123456"

  - `onDemandActivation` (boolean)
    If you use onDemand activation you will need to make sure the numbers are both confirmed and released for activation, if you don't use onDemand the numbers will be activated on the desiredPortDate is the recommended way.
If true the numbers will be activated as when you call :activate, if false they will be activated on the desiredPortDate

  - `loaUploadedBy` (string)
    Name of the user uploading the LOA.
    Example: "john doe"

  - `loaAttachmentDate` (string)
    Date when the LOA was uploaded. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): YYYY-MM-DDThh:mm:ss.SSSZ.
    Example: "2024-09-24T12:00:00Z"

  - `resellerName` (string)
    This is requirement for canadian numbers only, we need to figure out what we expect here and where the customer can find this info

## Response 201 fields (application/json):

  - `desiredPortSchedule` (object, required)
    The date and time you want the numbers to be ported in. If you set a defaultPortTime and defaultPortTimeZone in defaults those settings will be used if not set per order. If you haven't set defaults and do not set the time and time zone on the order the system default will be used. System Default Time: 09:00:00 US/Eastern

  - `status` (string)
    The current status of the port order.
    Enum: "PENDING", "CONFIRMED", "COMPLETED", "CANCELED"

  - `customerOrderReference` (string)
    Your reference you specified when creating the order
    Example: "123456"

  - `onDemandActivation` (boolean)
    If you use onDemand activation you will need to make sure the numbers are both confirmed and released for activation, if you don't use onDemand the numbers will be activated on the desiredPortDate is the recommended way.
If true the numbers will be activated as when you call :activate, if false they will be activated on the desiredPortDate

  - `loaUploadedBy` (string)
    Name of the user uploading the LOA.
    Example: "john doe"

  - `loaAttachmentDate` (string)
    Date when the LOA was uploaded. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): YYYY-MM-DDThh:mm:ss.SSSZ.
    Example: "2024-09-24T12:00:00Z"

  - `phoneNumbers` (array)
    The numbers for the order in e164 format

  - `notes` (array)
    Notes if any on the order, you will get notes if there is any problems with the order and you send notes as reply to those problems

  - `notes.note` (string)
    The message of the note.

  - `notes.createdTime` (string)
    The date and time when the note was created in UTC ISO https://www.ietf.org/rfc/rfc3339.txt.

  - `notes.createdBy` (string)
    The user who created the note.

  - `documents` (array)
    Documents if any on the order, you will get documents if there is any problems with the order and you send documents as reply to those problems

  - `documents.id` (number)
    The ID of the order document.

  - `documents.documentName` (string)
    The name of the document.

  - `documents.description` (string)
    A description of the contents of the document.

  - `createdDate` (string)
    The date the order was created, in YYYY-MM-DD format.
    Example: "2024-09-24"

  - `resellerName` (string)
    This is requirement for canadian numbers only, we need to figure out what we expect here and where the customer can find this info

  - `id` (number)
    The unique identifier for the order
    Example: 890192331


