Where did you get the extension id and make sure that it's valid.
Show me the code how you call the PATCH method to assign a number.
Is the extension number itself the extensionID? For example, when I GET info for an account, this is the response:
{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"totalResults": 1,
"startIndex": 1,
"itemsPerPage": 100,
"Resources": [
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id": "63548308004",
"meta": {
"resourceType": "User",
"created": "2023-11-15T19:17:30.342Z",
"lastModified": "2023-11-15T19:17:30.342Z",
"location": "https://platform.ringcentral.com/scim/v2/Users/63548308004"
},
"userName": "test.user15@wellthy.com",
"name": {
"formatted": "Test User15",
"familyName": "User15",
"givenName": "Test"
},
"active": true,
"emails": [
{
"value": "test.user15@wellthy.com",
"type": "work"
}
],
"phoneNumbers": [
{
"value": "326",
"type": "other"
}
]
}
]
}
So is "326" the extenstion ID? Because when I try to do a get extension phone number list, it gives a 404 when I enter extensionID as 326:
curl --request GET
--url 'https://platform.ringcentral.com/restapi/v1.0/account/~/extension/326/phone-number?page=1&perPage=100'
{
"errorCode": "CMN-102",
"message": "Resource for parameter [extensionId] is not found",
"errors": [
{
"errorCode": "CMN-102",
"message": "Resource for parameter [extensionId] is not found",
"parameterName": "extensionId"
}
],
"parameterName": "extensionId"
}
I also want to make sure that I am not changing the company number for our entire account, just the direct number for the user using the extension.
EDIT: I found the issue, I needed to use the "id" not the extension number. I am able to add a phone line now!
The only other thing I have to figure out is if there is an API to make the phone number type fax only,
And also if there is an API that can make that primary number as the caller ID for fax number in user's profile