# Update an active phone number Update an active phone number. You can perform the following updates: * Update the name that displays for a customer by modifying the displayName parameter. * Unlink the number from an SMS service or campaign by updating the smsConfiguration configuration 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. * Update the Voice app to which the number is assigned by using the voiceConfiguration object. You can update both SMS and Voice in the same object by including both configuration objects. If you only need to update either Voice or SMS, simply omit the other object. If you pass an empty configuration object, the request will fail. Endpoint: PATCH /v1/projects/{projectId}/activeNumbers/{phoneNumber} Version: 1.0.3 Security: Basic, OAuth2.0 ## Path parameters: - `projectId` (string, required) Found on your Sinch Customer Dashboard. Settings > Projects. Example: "YOUR_projectId" - `phoneNumber` (string, required) Output only. The phone number in E.164 format with leading +. Example: "+12025550134" ## Request fields (application/json): - `displayName` (string) User supplied name for the phone number. - `smsConfiguration` (object) The current SMS configuration for this number. Once the servicePlanId is sent, it enters scheduled provisioning. The status of scheduled provisioning will show under a scheduledProvisioning object if it's still running. Once processed successfully, the servicePlanId sent will appear directly under the smsConfiguration object. - `smsConfiguration.servicePlanId` (string, required) The servicePlanId can be found in the [Sinch Customer Dashboard](https://dashboard.sinch.com/sms/api/rest). The service plan ID is what ties this number to the configured SMS service. - `smsConfiguration.campaignId` (string) Only for US phone numbers. This campaignId is required to send SMS traffic to US; click [here](https://community.sinch.com/t5/10DLC/What-is-10DLC/ta-p/7845) to read more about 10DLC A2P messaging. So, it is the current campaign ID for this number. The campaignId is found on your TCR platform. - `voiceConfiguration` (object) The current voice configuration for this number. During scheduled provisioning, the app ID, service ID, or trunk ID value may be empty in a response if it is still processing or if it has failed. The status of scheduled provisioning will show under a scheduledVoiceProvisioning object if it's still running. Once processed successfully, the appId/serviceId/trunkId sent will appear directly under the voiceConfiguration object. - `callbackUrl` (string) The callback URL to be called for a rented number's provisioning / deprovisioning operations. ## Response 200 fields (application/json): - `phoneNumber` (string) The phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format with leading +. Example +12025550134. Example: "+12025550134" - `projectId` (string) Project ID. Your project ID can be found on your [Sinch Customer Dashboard](https://dashboard.sinch.com/settings/project-management). Example: "51bc3f40-f266-4ca8-8938-a1ed0ff32b9a" - `displayName` (string) User supplied name for the phone number. - `regionCode` (string) ISO 3166-1 alpha-2 country code of the phone number. Example: US, GB or SE. Example: "US" - `type` (string) The number type. Enum: "MOBILE", "LOCAL", "TOLL_FREE" - `capability` (array) The capability of the number. Enum: "SMS", "VOICE" - `money` (object) An object giving details on currency code and the amount charged. - `money.currencyCode` (string) The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). Example: "USD" - `money.amount` (string) The amount in decimal form. For example 2.00. There are no guarantees on the precision unless documented by the message origin. The amount cannot be updated and is read-only. Example: "2.00" - `paymentIntervalMonths` (integer) How often the recurring price is charged in months. - `nextChargeDate` (string) The date of the next charge. - `expireAt` (string) The timestamp when the subscription will expire if an expiration date has been set. - `smsConfiguration` (object) The current SMS configuration for this number. Once the servicePlanId is sent, it enters scheduled provisioning. The status of scheduled provisioning will show under a scheduledProvisioning object if it's still running. Once processed successfully, the servicePlanId sent will appear directly under the smsConfiguration object. - `smsConfiguration.servicePlanId` (string, required) The servicePlanId can be found in the [Sinch Customer Dashboard](https://dashboard.sinch.com/sms/api/rest). The service plan ID is what ties this number to the configured SMS service. - `smsConfiguration.campaignId` (string) Only for US phone numbers. This campaignId is required to send SMS traffic to US; click [here](https://community.sinch.com/t5/10DLC/What-is-10DLC/ta-p/7845) to read more about 10DLC A2P messaging. So, it is the current campaign ID for this number. The campaignId is found on your TCR platform. - `smsConfiguration.scheduledProvisioning` (object) Represents the ongoing or failed scheduled provisioning job. This field will be empty if the number was both successfully provisioned to the SMS platform and linked to the 10DLC campaign. - `smsConfiguration.scheduledProvisioning.servicePlanId` (string) The SMS service plan that the scheduled provisioning job will configure with the number. - `smsConfiguration.scheduledProvisioning.campaignId` (string) TCR campaign ID that the scheduled provisioning job will configure with the number. - `smsConfiguration.scheduledProvisioning.status` (any) The provisioning status. It will be either WAITING, IN_PROGRESS or FAILED. If the provisioning fails, a reason for the failure will be provided. [See a full list of provisioning error descriptions]<(https://developers.sinch.com/docs/numbers/api-reference/error-codes/provisioning-errors) and troubleshooting recommendations. Enum: "PROVISIONING_STATUS_UNSPECIFIED", "WAITING", "IN_PROGRESS", "FAILED" - `smsConfiguration.scheduledProvisioning.lastUpdatedTime` (string) Timestamp when the status was last updated. - `smsConfiguration.scheduledProvisioning.errorCodes` (array) Enum: "ERROR_CODE_UNSPECIFIED", "INTERNAL_ERROR", "SMS_PROVISIONING_FAILED", "CAMPAIGN_PROVISIONING_FAILED", "CAMPAIGN_NOT_AVAILABLE", "EXCEEDED_10DLC_LIMIT", "NUMBER_PROVISIONING_FAILED", "PARTNER_SERVICE_UNAVAILABLE", "CAMPAIGN_PENDING_ACCEPTANCE", "MNO_SHARING_ERROR", "CAMPAIGN_EXPIRED", "CAMPAIGN_MNO_REJECTED", "CAMPAIGN_MNO_SUSPENDED", "CAMPAIGN_MNO_REVIEW", "INSUFFICIENT_BALANCE", "MOCK_CAMPAIGN_NOT_ALLOWED", "TFN_NOT_ALLOWED", "INVALID_NNID" - `voiceConfiguration` (object) The current voice configuration for this number. During scheduled provisioning, the app ID, service ID, or trunk ID value may be empty in a response if it is still processing or if it has failed. The status of scheduled provisioning will show under a scheduledVoiceProvisioning object if it's still running. Once processed successfully, the appId/serviceId/trunkId sent will appear directly under the voiceConfiguration object. - `callbackUrl` (string) The callback URL to be called for a rented number's provisioning / deprovisioning operations. Example: "https://www.your-callback-server.com/callback" ## Response 400 fields (application/json): - `error` (object) - `error.code` (integer) Enum: 400 - `error.message` (string) - `error.status` (string) Enum: "INVALID_ARGUMENT" - `error.details` (array) - `error.details.type` (string) Enum: "BadRequest" - `error.details.fieldViolations` (array) - `error.details.fieldViolations.field` (string) - `error.details.fieldViolations.description` (string) ## Response 404 fields (application/json): - `error` (object) - `error.code` (integer) Enum: 404 - `error.message` (string) - `error.status` (string) Enum: "NOT_FOUND" - `error.details` (array) - `error.details.type` (string) - `error.details.resourceType` (string) The type of the resource that was not found. - `error.details.resourceName` (string) The name of the resource that was not found. - `error.details.owner` (string) The owner of the resource that was not found. - `error.details.description` (string) A description of the error. ## Response 500 fields (application/json): - `error` (object) - `error.code` (integer) Enum: 500 - `error.message` (string) - `error.status` (string) Enum: "INTERNAL", "UNKNOWN" - `error.details` (array)