cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
697
Views
0
Helpful
3
Replies

Unable to remove phone number from person

joedeveloper-
Level 1
Level 1

Hello we are attempting to remove the primary number from a person so that they would go back to only have an extension but are getting the following error:

DELETE https://webexapis.com/v1/telephony/config/people/{personid}/numbers{?orgId}

Body Parameters: 
{
    "enableDistinctiveRingPattern": true,
    "phoneNumbers": [
        {
            "directNumber": "+1111111111111",
            "primary": true,
            "action": "DELETE",
            "ringPattern": "SHORT_LONG_SHORT"
        }
    ]
}

Response
{
    "message": "Primary number cannot be edited using this API.",
    "errors": [
        {
            "description": "Primary number cannot be edited using this API."
        }
    ],
    "trackingId": "ROUTERGW_c240ce70-bfee-472c-a356-70ce52d43999"
}

UPDATE: We have figured out the solution.

1 Accepted Solution

joedeveloper-
Level 1
Level 1

I read this page that said you can use the update person API to remove a primary number from a user but no details on how to pass the object to remove the primary number. https://developer.webex.com/docs/api/v1/people/update-a-person

In Control Hub you have the ability to remove a primary number and the person reverts back to only having an extension. How can we accomplish this through the API so that they no longer have a primary number but only an extension?

View solution in original post

3 Replies 3

joedeveloper-
Level 1
Level 1

I read this page that said you can use the update person API to remove a primary number from a user but no details on how to pass the object to remove the primary number. https://developer.webex.com/docs/api/v1/people/update-a-person

In Control Hub you have the ability to remove a primary number and the person reverts back to only having an extension. How can we accomplish this through the API so that they no longer have a primary number but only an extension?

Vaijanath Sonvane
VIP Alumni
VIP Alumni

Hi @joedeveloper- ,

With this API method, you cannot assign or unassign Primary Number. This method is only used for Alternate Phone Numbers. It is mentioned in description:

https://developer.webex.com/docs/api/v1/user-call-settings/assign-or-unassign-numbers-to-a-person

 

 

 

Please rate helpful posts and if applicable mark "Accept as a Solution".
Thanks, Vaijanath S.

Max Jobs
Level 1
Level 1

Hi buddy,

Typically, to remove a primary number and revert to using only an extension, you might need to assign a new primary number or set a different number as the primary one. After doing so, you can then remove the original primary number.