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.
Lists all imported numbers for the project.
projectId required | string Found on your Sinch Customer Dashboard. Settings > Projects. Example: d1923022-5199-4bb3-a513-c47b3a656bc5 |
OK
If the page_token, number_pattern or order_by is not valid.
INTERNAL: Internal server error. Typically, a server bug.
{- "importedNumbers": [
- {
- "phoneNumber": "+12025550134",
- "projectId": "YOUR_project_id",
- "regionCode": "US",
- "displayName": "MyPhoneNumber",
- "smsConfiguration": {
- "servicePlanId": "YOUR_service_plan_id",
- "scheduledProvisioning": {
- "servicePlanId": "YOUR_service_plan_id",
- "status": 0,
- "lastUpdatedTime": "2019-08-24T14:15:22Z",
- "campaignId": "YOUR_campaign_id",
- "errorCodes": [
- 0
]
}, - "campaignId": "YOUR_campaign_id",
- "migrateToSinchTmo": true
},
}
], - "nextPageToken": "string",
- "totalSize": 0
}
You can use the Import Numbers API to import a non-Sinch number that you want to enable for SMS with Sinch as the Direct Connectivity Aggregator (DCA) without porting (or even partially porting) the number.
Note: Customers who are importing numbers (i.e. want to use their own NNID) will need to complete the NNID provisioning process to support proper message routing with the carriers. To learn more, refer to the article How can you provision a Network Number ID (NNID)?
phoneNumber | string The phone number in e.164 format with leading +. | ||||||||||||||||||
projectId | string The ID of the project resource. You can find your project ID on dashboard.sinch.com. | ||||||||||||||||||
regionCode | string ISO 3166-1 alpha-2 country code of the phone number. Example US, UK or SE. | ||||||||||||||||||
displayName | string User supplied name for the phone number. | ||||||||||||||||||
object (SmsConfiguration) Configuration for SMS | |||||||||||||||||||
| |||||||||||||||||||
callbackUrl | string The client's callback URL to be called upon finishing the number import. |
OK
phoneNumber | string The phone number in e.164 format with leading +. | ||||||||||||||||||||
projectId | string The ID of the project resource. You can find your project ID on dashboard.sinch.com. | ||||||||||||||||||||
regionCode | string ISO 3166-1 alpha-2 country code of the phone number. Example US, UK or SE. | ||||||||||||||||||||
displayName | string User supplied name for the phone number. | ||||||||||||||||||||
object (SmsConfiguration) Configuration for SMS | |||||||||||||||||||||
| |||||||||||||||||||||
callbackUrl | string The client's callback URL to be called upon finishing the number import. |
INVALID_ARGUMENT: If the importedNumber.phoneNumber, importedNumber.smsConfiguration.servicePlanId is not valid.
The imported number already exists.
INTERNAL: Internal server error. Typically, a server bug.
{- "regionCode": "US",
- "smsConfiguration": {
- "servicePlanId": "YOUR_service_plan_id",
- "campaignId": "YOUR_campaign_id",
- "migrateToSinchTmo": true
}, - "phoneNumber": "+11234567890",
- "displayName": "MyPhoneNumber",
}
{- "phoneNumber": "+12025550134",
- "projectId": "YOUR_project_id",
- "regionCode": "US",
- "displayName": "MyPhoneNumber",
- "smsConfiguration": {
- "servicePlanId": "YOUR_service_plan_id",
- "scheduledProvisioning": {
- "servicePlanId": "YOUR_service_plan_id",
- "status": 0,
- "lastUpdatedTime": "2019-08-24T14:15:22Z",
- "campaignId": "YOUR_campaign_id",
- "errorCodes": [
- 0
]
}, - "campaignId": "YOUR_campaign_id",
- "migrateToSinchTmo": true
},
}
Returns the imported number you specify in the path.
projectId required | string Found on your Sinch Customer Dashboard. Settings > Projects. Example: d1923022-5199-4bb3-a513-c47b3a656bc5 |
phoneNumber required |
OK
phoneNumber | string The phone number in e.164 format with leading +. | ||||||||||||||||||||
projectId | string The ID of the project resource. You can find your project ID on dashboard.sinch.com. | ||||||||||||||||||||
regionCode | string ISO 3166-1 alpha-2 country code of the phone number. Example US, UK or SE. | ||||||||||||||||||||
displayName | string User supplied name for the phone number. | ||||||||||||||||||||
object (SmsConfiguration) Configuration for SMS | |||||||||||||||||||||
| |||||||||||||||||||||
callbackUrl | string The client's callback URL to be called upon finishing the number import. |
The imported number could not be found.
INTERNAL: Internal server error. Typically, a server bug.
{- "phoneNumber": "+12025550134",
- "projectId": "YOUR_project_id",
- "regionCode": "US",
- "displayName": "MyPhoneNumber",
- "smsConfiguration": {
- "servicePlanId": "YOUR_service_plan_id",
- "scheduledProvisioning": {
- "servicePlanId": "YOUR_service_plan_id",
- "status": 0,
- "lastUpdatedTime": "2019-08-24T14:15:22Z",
- "campaignId": "YOUR_campaign_id",
- "errorCodes": [
- 0
]
}, - "campaignId": "YOUR_campaign_id",
- "migrateToSinchTmo": true
},
}
Delete an imported number from the project.
OK
The imported number could not be found.
INTERNAL: Internal server error. Typically, a server bug.
{- "code": "404",
- "message": "The imported number could not be found.",
- "status": "NOT_FOUND"
}
Update an imported phone number. You can perform the following updates:
displayName
parameter.smsConfiguration
configuration object. To unlink a number, submit the request with an empty string (””
) in the service plan ID or campaign ID fields.phoneNumber | string The phone number in e.164 format with leading +. | ||||||||||||||||||
projectId | string The ID of the project resource. You can find your project ID on dashboard.sinch.com. | ||||||||||||||||||
regionCode | string ISO 3166-1 alpha-2 country code of the phone number. Example US, UK or SE. | ||||||||||||||||||
displayName | string User supplied name for the phone number. | ||||||||||||||||||
object (SmsConfiguration) Configuration for SMS | |||||||||||||||||||
| |||||||||||||||||||
callbackUrl | string The client's callback URL to be called upon finishing the number import. |
OK
phoneNumber | string The phone number in e.164 format with leading +. | ||||||||||||||||||||
projectId | string The ID of the project resource. You can find your project ID on dashboard.sinch.com. | ||||||||||||||||||||
regionCode | string ISO 3166-1 alpha-2 country code of the phone number. Example US, UK or SE. | ||||||||||||||||||||
displayName | string User supplied name for the phone number. | ||||||||||||||||||||
object (SmsConfiguration) Configuration for SMS | |||||||||||||||||||||
| |||||||||||||||||||||
callbackUrl | string The client's callback URL to be called upon finishing the number import. |
INVALID_ARGUMENT: If the fieldMask is not provided or importedNumber.smsConfiguration.servicePlanId is not valid.
The imported number could not be found.
INTERNAL: Internal server error. Typically, a server bug.
{- "displayName": "My Display Name",
- "smsConfiguration": {
- "servicePlanId": "",
- "campaignId": ""
},
}
{- "phoneNumber": "+12025550134",
- "projectId": "YOUR_project_id",
- "regionCode": "US",
- "displayName": "MyPhoneNumber",
- "smsConfiguration": {
- "servicePlanId": "YOUR_service_plan_id",
- "scheduledProvisioning": {
- "servicePlanId": "YOUR_service_plan_id",
- "status": 0,
- "lastUpdatedTime": "2019-08-24T14:15:22Z",
- "campaignId": "YOUR_campaign_id",
- "errorCodes": [
- 0
]
}, - "campaignId": "YOUR_campaign_id",
- "migrateToSinchTmo": true
},
}