REST API PATCH User 'phone_numbers' - Updating Specific Phone Number

I want to start managing (via automation) Users’ ‘Office’ phone numbers and to do so I’m using the REST API User Patch method.

I can easily create a phone number with label ‘Office’, along with the Country, Code and Number attributes. However, if there are other existing phone numbers on the User’s account, I encounter these issues:

  1. Using the api, the entire phone_numbers array must be written in its entirety, otherwise data is lost. When a user has a phone number other than ‘Office’ already recorded (let’s say it’s a ‘Mobile’ number) in order to preserve the Mobile phone number, I must first retrieve the phone_numbers array and update (or add) the Office number. Then I can write the array back to the database with both Office and Mobile numbers intact. (If I just write-out an array with the Office number in it, all the other numbers are deleted.)

  2. The API requires a label, but the user interface does not require a label. We have users who have created (via the U/I) phone numbers without labels. The API will permit neither (C#) null nor “” to be passed as the label, which means the numbers without labels can’t be preserved, if we proceed to automate the Office number as described above.

Is there a way to update a particular phone number without destroying other numbers, besides the way I’ve described above ?

How can we handle numbers without labels using automation, if at all ?

Thanks.

Hi @bruce.felknor ,

Are you able to show a short recording or screenshots of the behavior? I’d like to submit to the team responsible for Phone API endpoints to update in future merge. You may send the screenshots/recordings in the private message from me along with:

  • client id
  • associated email address

Thanks so much.

I will get the information to you, but I’m jammed-up at work. Might be a week or so.

Thanks

1 Like