Numbers///
- API reference
- Imported and Hosted Numbers Overview
- Update imported number
List imported numbers
Import number
Get imported number
Delete imported number
Update imported number
Update an imported phone number. You can perform the following updates:
- Update the name that displays for a customer by modifying the
displayNameparameter. - Unlink the number from an SMS service or campaign by updating the
smsConfigurationconfiguration object. To unlink a number, submit the request with an empty string (””) in the service plan ID or campaign ID fields. - Before linking a number to a new service or campaign, it must be unlinked from any existing service or campaign. Then, link the number to a new SMS service or campaign by updating the service plan ID or campaign ID with the new desired value.
Security
Basic or OAuth2.0
Found on your Sinch Customer Dashboard. Settings > Projects.
Example:d1923022-5199-4bb3-a513-c47b3a656bc5
The ID of the project resource. You can find your project ID on dashboard.sinch.com.
Example:"YOUR_project_id"
ISO 3166-1 alpha-2 country code of the phone number. Example US, UK or SE.
Example:"US"
- Global APIhttps://imported.numbers.api.sinch.com/v1/projects/{projectId}/importedNumbers/{phoneNumber}
curl -i -X PATCH \
-u '<username>:<password>' \
'https://imported.numbers.api.sinch.com/v1/projects/d1923022-5199-4bb3-a513-c47b3a656bc5/importedNumbers/+12025550134' \
-H 'Content-Type: application/json' \
-d '{
"displayName": "My Display Name",
"smsConfiguration": {
"servicePlanId": "",
"campaignId": ""
},
"callbackUrl": "https://www.your-callback-server.com/callback"
}'OK
The ID of the project resource. You can find your project ID on dashboard.sinch.com.
Example:"YOUR_project_id"
ISO 3166-1 alpha-2 country code of the phone number. Example US, UK or SE.
Example:"US"
Response
{ "phoneNumber": "+12025550134", "projectId": "YOUR_project_id", "regionCode": "US", "displayName": "MyPhoneNumber", "smsConfiguration": { "servicePlanId": "YOUR_service_plan_id", "scheduledProvisioning": { … }, "campaignId": "YOUR_campaign_id", "migrateToSinchTmo": true }, "callbackUrl": "https://www.your-callback-server.com/callback" }