API for importing, hosting, and qualifying numbers to enable them for use with Sinch SMS text messaging services.
Imported Numbers and Hosting Orders (1.0)
https://imported.numbers.api.sinch.com/
Hosting Orders
Hosted numbers provide you with an easy method to port your SMS enabled numbers to Sinch or to use SMS messaging and other products to send and receive messages, on voice-enabled numbers (including landline numbers) that you already own.
Note: The SMS enablement process is only supported in United States and Canada.
The Hosting Orders API allows you to manage all the numbers that you are hosting on the Sinch platform. This includes numbers that you have ported to Sinch and/or any non- Sinch numbers that you already own and are hosting on Sinch to enable Sinch SMS messaging and other products.
Imported Numbers
Use the Imported Numbers API endpoints to list imported numbers or import a number that's already been provisioned with an NNID for use with Sinch. Imported numbers can be used with Sinch SMS services.
Note: The SMS enablement process is only supported in United States and Canada.
Qualified Numbers
You can use the Qualified Numbers API to qualify numbers you want Sinch to host and have available for use with Sinch SMS services. Qualifying a number involves verifying ownership of a number either by providing a one time passcode sent to the number by voice call or by providing invoices for multiple numbers. Once numbers are qualified, you can then enable those numbers for SMS text messaging services.
Note: The SMS enablement process is only supported in United States and Canada.
Found on your Sinch Customer Dashboard. Settings > Projects.
The qualified number states
| Enum Value | Description |
|---|---|
| GLOBAL_PROCESS_STATE_UNSPECIFIED | The state is unspecified. |
| GLOBAL_PROCESS_STATE_ELIGIBLE_CHECK_PENDING | The check for eligibility is pending. |
| GLOBAL_PROCESS_STATE_ELIGIBLE | The state is eligible. |
| GLOBAL_PROCESS_STATE_NOT_ELIGIBLE | The state is not eligible. |
| GLOBAL_PROCESS_STATE_VERIFICATION_PENDING | The state verification is pending. |
| GLOBAL_PROCESS_STATE_VERIFICATION_FAILED | The state verification failed. |
| GLOBAL_PROCESS_STATE_VERIFICATION_BLOCKED | The state verification is blocked. |
| GLOBAL_PROCESS_STATE_VERIFIED | The state is verified. |
| GLOBAL_PROCESS_STATE_HOSTING_IN_PROGRESS | Hosting process is in progress. |
| GLOBAL_PROCESS_STATE_HOSTING_DONE | Hosting process is done. |
Region code to filter by. ISO 3166-1 alpha-2 country code of the phone number. Currently supported are US, CA
The maximum number of items to return, server can enforce an upper limit and overwrite the value.
The next page token value returned from a previous listing.
- Global API
https://imported.numbers.api.sinch.com/v1/projects/{projectId}/qualifiedNumbers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://imported.numbers.api.sinch.com/v1/projects/d1923022-5199-4bb3-a513-c47b3a656bc5/qualifiedNumbers?states=GLOBAL_PROCESS_STATE_HOSTING_IN_PROGRESS®ionCode=US&pageSize=20&pageToken=C2VNYXJrEg4KDCsxMjAxMjI2MzUyOQ%3D%3D&orderBy=createdTime'{ "qualifiedNumbers": [ { … } ], "nextPageToken": "string", "totalSize": 0 }
Found on your Sinch Customer Dashboard. Settings > Projects.
- Global API
https://imported.numbers.api.sinch.com/v1/projects/{projectId}/qualifiedNumbers/{phoneNumber}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://imported.numbers.api.sinch.com/v1/projects/d1923022-5199-4bb3-a513-c47b3a656bc5/qualifiedNumbers/+12025550134'OK
The ID of the project to which the number belongs.
ISO 3166-1 alpha-2 country code of the phone number. Example US or CA.
The global processing state of the qualified number.
| Enum Value | Description |
|---|---|
| GLOBAL_PROCESS_STATE_UNSPECIFIED | The state is unspecified. |
| GLOBAL_PROCESS_STATE_ELIGIBLE_CHECK_PENDING | The check for eligibility is pending. |
| GLOBAL_PROCESS_STATE_ELIGIBLE | The state is eligible. |
| GLOBAL_PROCESS_STATE_NOT_ELIGIBLE | The state is not eligible. |
| GLOBAL_PROCESS_STATE_VERIFICATION_PENDING | The state verification is pending. |
| GLOBAL_PROCESS_STATE_VERIFICATION_FAILED | The state verification failed. |
| GLOBAL_PROCESS_STATE_VERIFICATION_BLOCKED | The state verification is blocked. |
| GLOBAL_PROCESS_STATE_VERIFIED | The state is verified. |
| GLOBAL_PROCESS_STATE_HOSTING_IN_PROGRESS | Hosting process is in progress. |
| GLOBAL_PROCESS_STATE_HOSTING_DONE | Hosting process is done. |
Details about the OSR eligibility, including the status of the OSR update, and the error if available.
Details about the ownership verification, including the status of the verification process and any error if available.
Details about the hosting status of a number, including any errors if available.
{ "phoneNumber": "+12025550134", "projectId": "abcd12ef-ab12-ab12-bc34-abcdef123456", "regionCode": "US", "globalProcessState": "GLOBAL_PROCESS_STATE_UNSPECIFIED", "osrEligibility": { "status": "DONE", "error": "string" }, "ownershipVerification": { "status": "DONE", "error": "string" }, "hostedNumber": { "status": 0, "error": "string" }, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z" }
Found on your Sinch Customer Dashboard. Settings > Projects.
- Global API
https://imported.numbers.api.sinch.com/v1/projects/{projectId}/qualifiedNumbers/{phoneNumber}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
-u <username>:<password> \
'https://imported.numbers.api.sinch.com/v1/projects/d1923022-5199-4bb3-a513-c47b3a656bc5/qualifiedNumbers/+12025550134'Request
Create a request to qualify a batch of numbers. After you have submitted the request, you must send an email to orders@sinch.com attaching all of the invoices related to the phone numbers in the request. In most cases, it will take the Sinch team 1-3 days to review your documentation and qualify your numbers.
Found on your Sinch Customer Dashboard. Settings > Projects.
- Global API
https://imported.numbers.api.sinch.com/v1/projects/{projectId}/qualifiedNumbers:addNumbers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://imported.numbers.api.sinch.com/v1/projects/d1923022-5199-4bb3-a513-c47b3a656bc5/qualifiedNumbers:addNumbers \
-H 'Content-Type: application/json' \
-d '{
"phoneNumbers": [
"+12345612345"
]
}'{ "qualifiedNumbers": [ { … } ] }
Request
Enables text capability for the specified qualified numbers. You can enable up to 500 numbers at once. To enable a number for SMS, you must include a Campaign ID and billing information for a Letter of Authorization to be generated. The information required can differ depending on if you are a direct customer of Sinch or a reseller. The Letter of Authorization will be sent to the email you provide in the request to be e-signed.
Found on your Sinch Customer Dashboard. Settings > Projects.
An array of all the phone numbers associated with the hosting order.
The ID of the service plan to which the hosting order is associated.
The ID of the project to which the hosting order is associated.
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.
The ID of the campaign to which the hosting order is associated.
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.
- Global API
https://imported.numbers.api.sinch.com/v1/projects/{projectId}/qualifiedNumbers:textEnableNumbers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://imported.numbers.api.sinch.com/v1/projects/d1923022-5199-4bb3-a513-c47b3a656bc5/qualifiedNumbers:textEnableNumbers \
-H 'Content-Type: application/json' \
-d '{
"regionCode": "US",
"numbers": [
"+12025550134"
],
"servicePlanId": "YOUR_service_plan_id",
"campaignId": "YOUR_campaign_id",
"directLoaInfo": {
"authorisedPerson": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@email.com"
},
"address": {
"buildingNumber": "1234",
"street": "Main St",
"city": "NYC",
"state": "NY",
"postalCode": "01002",
"country": "US"
},
"currentVoiceCarrier": "Verizon"
},
"scheduledOsrUpdateTime": "2023-01-13T14:34:40.968Z",
"migrateToSinchTmo": true
}'{ "hostingOrderId": "string" }
Found on your Sinch Customer Dashboard. Settings > Projects.
The request to text-enable hosting orders Toll Free numbers in the current project
Request for text enabling project Toll Free numbers.
Letter of Authorization for direct Sinch customers.
The person authorized and responsible for the hosting order.
The first name of the authorized person.
The last name of the authorized person.
The address of the business.
The building number of the address.
- Global API
https://imported.numbers.api.sinch.com/v1/projects/{projectId}/qualifiedNumbers:textEnableTollFreeNumbers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://imported.numbers.api.sinch.com/v1/projects/d1923022-5199-4bb3-a513-c47b3a656bc5/qualifiedNumbers:textEnableTollFreeNumbers \
-H 'Content-Type: application/json' \
-d '{
"regionCode": "US",
"numbers": [
"+18335870229",
"+18339460473"
],
"servicePlanId": "07d6c2621f364b68856fe4938b7bb78f",
"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",
"scheduledZipwhipProvisioningTime": "2023-01-13T14:34:40.968Z",
"migrateToSinchTmo": true
}
}'A successful response with a hosting order, or an error
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".
The state of the hosting order.
| Enum Value | Description |
|---|---|
| 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. |
The hosting order type.
| Enum Value | Description |
|---|---|
| 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. |
The service plan to which the hosting order is associated.
Displays if a number is assigned to another aggregator in T-Mobile's platform, and requires migration from previous aggregator to Sinch.
{ "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" } }
Found on your Sinch Customer Dashboard. Settings > Projects.
- Global API
https://imported.numbers.api.sinch.com/v1/projects/{projectId}/qualifiedNumbers/{phoneNumber}:verifyVoiceChallenge
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://imported.numbers.api.sinch.com/v1/projects/d1923022-5199-4bb3-a513-c47b3a656bc5/qualifiedNumbers/+12025550134:verifyVoiceChallenge' \
-H 'Content-Type: application/json' \
-d '{
"code": "1234"
}'OK
The ID of the project to which the number belongs.
ISO 3166-1 alpha-2 country code of the phone number. Example US or CA.
The global processing state of the qualified number.
| Enum Value | Description |
|---|---|
| GLOBAL_PROCESS_STATE_UNSPECIFIED | The state is unspecified. |
| GLOBAL_PROCESS_STATE_ELIGIBLE_CHECK_PENDING | The check for eligibility is pending. |
| GLOBAL_PROCESS_STATE_ELIGIBLE | The state is eligible. |
| GLOBAL_PROCESS_STATE_NOT_ELIGIBLE | The state is not eligible. |
| GLOBAL_PROCESS_STATE_VERIFICATION_PENDING | The state verification is pending. |
| GLOBAL_PROCESS_STATE_VERIFICATION_FAILED | The state verification failed. |
| GLOBAL_PROCESS_STATE_VERIFICATION_BLOCKED | The state verification is blocked. |
| GLOBAL_PROCESS_STATE_VERIFIED | The state is verified. |
| GLOBAL_PROCESS_STATE_HOSTING_IN_PROGRESS | Hosting process is in progress. |
| GLOBAL_PROCESS_STATE_HOSTING_DONE | Hosting process is done. |
Details about the OSR eligibility, including the status of the OSR update, and the error if available.
Details about the ownership verification, including the status of the verification process and any error if available.
Details about the hosting status of a number, including any errors if available.
{ "phoneNumber": "+12025550134", "projectId": "abcd12ef-ab12-ab12-bc34-abcdef123456", "regionCode": "US", "globalProcessState": "GLOBAL_PROCESS_STATE_UNSPECIFIED", "osrEligibility": { "status": "DONE", "error": "string" }, "ownershipVerification": { "status": "DONE", "error": "string" }, "hostedNumber": { "status": 0, "error": "string" }, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z" }
Found on your Sinch Customer Dashboard. Settings > Projects.
- Global API
https://imported.numbers.api.sinch.com/v1/projects/{projectId}/qualifiedNumbers/{phoneNumber}:sendVoiceChallenge
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://imported.numbers.api.sinch.com/v1/projects/d1923022-5199-4bb3-a513-c47b3a656bc5/qualifiedNumbers/+12025550134:sendVoiceChallenge'OK
The ID of the project to which the number belongs.
ISO 3166-1 alpha-2 country code of the phone number. Example US or CA.
The global processing state of the qualified number.
| Enum Value | Description |
|---|---|
| GLOBAL_PROCESS_STATE_UNSPECIFIED | The state is unspecified. |
| GLOBAL_PROCESS_STATE_ELIGIBLE_CHECK_PENDING | The check for eligibility is pending. |
| GLOBAL_PROCESS_STATE_ELIGIBLE | The state is eligible. |
| GLOBAL_PROCESS_STATE_NOT_ELIGIBLE | The state is not eligible. |
| GLOBAL_PROCESS_STATE_VERIFICATION_PENDING | The state verification is pending. |
| GLOBAL_PROCESS_STATE_VERIFICATION_FAILED | The state verification failed. |
| GLOBAL_PROCESS_STATE_VERIFICATION_BLOCKED | The state verification is blocked. |
| GLOBAL_PROCESS_STATE_VERIFIED | The state is verified. |
| GLOBAL_PROCESS_STATE_HOSTING_IN_PROGRESS | Hosting process is in progress. |
| GLOBAL_PROCESS_STATE_HOSTING_DONE | Hosting process is done. |
Details about the OSR eligibility, including the status of the OSR update, and the error if available.
Details about the ownership verification, including the status of the verification process and any error if available.
Details about the hosting status of a number, including any errors if available.
{ "phoneNumber": "+12025550134", "projectId": "abcd12ef-ab12-ab12-bc34-abcdef123456", "regionCode": "US", "globalProcessState": "GLOBAL_PROCESS_STATE_UNSPECIFIED", "osrEligibility": { "status": "DONE", "error": "string" }, "ownershipVerification": { "status": "DONE", "error": "string" }, "hostedNumber": { "status": 0, "error": "string" }, "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z" }
Imported Numbers and Hosting Orders Callbacks
You can set up callback URLs to receive event notifications when your numbers are updated.
When delivering events the order is not guaranteed (for example, a failed event scheduled for retry will not block other events that were queued).
The client's callback handler must implement the state machine that can decide what to do with unexpected events, for example, "old" events or invalid state transitions. In these cases the handler could use the API to GET the latest state for the resource.
The callback handler is expected to "ingest" the event and respond with 200 OK. The domain-specific business logic and processes should be executed outside of the callback request, as internal asynchronous jobs.
To use callbacks, add the following IP addresses to your allowlist:
- 54.76.19.159
- 54.78.194.39
- 54.155.83.128