Skip to content

Text enable numbers in hosting orders

Request

Text enable numbers associated with hosting orders of a specific project.

Security
Basic or OAuth2.0
Path
projectIdstringrequired

Found on your Sinch Customer Dashboard. Settings > Projects.

Example:d1923022-5199-4bb3-a513-c47b3a656bc5
Bodyapplication/jsonrequired

The request to text-enable hosting orders numbers in the current project

regionCodestringrequired

The region code for the hosting order.

Example:"US"
numbersArray of stringsrequired

An array of all the phone numbers associated with the hosting order.

Example:
[ "+12025550134" ]
servicePlanIdstringrequired

The ID of the service plan to which the hosting order is associated.

Example:"YOUR_service_plan_id"
projectIdstring

The ID of the project to which the hosting order is associated.

Example:"YOUR_project_id"
displayNamestring

The optional display name of the hosting order.

Example:"MyHostingOrder"
nnidstring

Defaults to either Sinch NNID or what was originally configured on the customer account. Sinch encourages customers to use the Sinch NNID, but if you want to use another NNID, please contact your account manager.

campaignIdstring

The ID of the campaign to which the hosting order is associated.

Example:"YOUR_campaign_id"
directLoaInfoobject(DirectLoaInfo)

Letter of Authorization for direct Sinch customers.

resellerLoaInfoobject(ResellerLoaInfo)

Letter of Authorization for resellers.

blanketLoaInfoobject(BlanketLoaInfo)

You can set up a blanket Letter of Authorization (LoA) that will allow you to import numbers to your account without having to sign an LoA each time you submit a request. To set up a blanket LoA, email your account manager. Once the LoA has been approved, you can use this blanketLoaInfo object in your requests. The blanketLoaInfo object should be sent as an empty object.

scheduledOsrUpdateTimestring, (date-time)

The scheduled time for OSR to be updated.

callbackUrlstring

The client's callback URL to be called for text enablement updates.

Example:"https://www.your-callback-server.com/callback"
curl -i -X POST \
  -u '<username>:<password>' \
  https://imported.numbers.api.sinch.com/v1/projects/d1923022-5199-4bb3-a513-c47b3a656bc5/hostingOrders:textEnableNumbers \
  -H 'Content-Type: application/json' \
  -d '{
    "regionCode": "US",
    "numbers": [
      "+17724295286",
      "+17724295287"
    ],
    "servicePlanId": "07d6c2621f364b68856fe4938b7bb78f",
    "campaignId": "C3O8OGA",
    "callbackUrl": "https://www.your-callback-server.com/callback",
    "directLoaInfo": {
      "authorisedPerson": {
        "firstName": "John",
        "lastName": "Smith",
        "email": "email@domain.com"
      },
      "address": {
        "buildingNumber": "2433",
        "street": "Vesta Drive",
        "city": "Chicago",
        "state": "IL",
        "postalCode": "60647",
        "country": "US"
      },
      "currentVoiceCarrier": "Verizon"
    },
    "scheduledOsrUpdateTime": "2023-01-13T14:34:40.968Z",
    "migrateToSinchTmo": true
  }'

Responses

A successful response with a hosting order, or an error

Bodyapplication/json
projectIdstring

The project ID to which the hosting order is associated.

Example:"YOUR_project_id"
hostingOrderIdstring

The unique ID of the hosting order.

Example:"YOUR_hosting_order_id"
displayNamestring

The friendly name of the hosting order.

Example:"MyHostingOrder"
regionCodestring

The region code of the hosting order. Number hosting is only available for the US and Canada, so you must enter either "US" or "CA".

Example:"US"
statestring

The state of the hosting order.

Enum ValueDescription
HOSTING_ORDER_STATE_UNSPECIFIED

State is unspecified.

DRAFT

Hosting order is a draft.

SUBMITTED

Hosting order has been submitted.

WAITING_FOR_LOA_SIGNATURE

Hosting order is waiting for the LoA signature.

IN_PROGRESS

Hosting order is in progress.

COMPLETED

Hosting order is completed.

REJECTED

Hosting order is rejected.

typestring

The hosting order type.

Enum ValueDescription
HOSTING_ORDER_TYPE_UNSPECIFIED

The type of hosting order is unspecified.

IMPORT

Hosting order to import numbers.

TYPE_TEXT_ENABLE

Hosting order to text-enable numbers.

createdTimestring, (date-time)read-only

Timestamp when the hosting order was created

updatedTimestring, (date-time)read-only

Timestamp when the hosting order was last updated

scheduledOsrUpdateTimestring, (date-time)read-only

Timestamp when the OSR update will be done

servicePlanIdstring

The service plan to which the hosting order is associated.

Example:"YOUR_service_plan_id"
campaignIdstring

The campaign to which the hosting order is associated.

Example:"YOUR_campaign_id"
migrateToSinchTmobooleanread-only

Displays if a number is assigned to another aggregator in T-Mobile's platform, and requires migration from previous aggregator to Sinch.

textEnableInfoobject(TextEnableInfo)
callbackUrlstring

The client's callback URL to be called upon finishing the number import.

Example:"https://www.your-callback-server.com/callback"
Response
{ "projectId": "d1923022-5199-4bb3-a513-c47n7a656bc5", "hostingOrderId": "01arz3nhyrtsv4rrffq69g5fav", "displayName": "Hosting order with campaignId, nnid and smsAppId", "regionCode": "US", "state": "SUBMITTED", "type": "TYPE_TEXT_ENABLE", "createdTime": "2023-01-12T14:34:40.968Z", "updatedTime": "2023-01-12T14:34:40.968Z", "scheduledOsrUpdateTime": "2023-01-13T14:34:40.968Z", "servicePlanId": "16e5c8d2odc842bda9a1b90e1673c174", "campaignId": "C3O84GA", "migrateToSinchTmo": true, "callbackUrl": "https://www.your-callback-server.com/callback", "hostingOrderInfo": { "businessName": "Sinch AB", "authorisedPerson": { … }, "address": { … }, "serviceProvider": "Sinch America Inc.", "currentVoiceCarrier": "Verizon", "nnid": "104029", "loaType": "DIRECT" } }