I've been fighting with getting this working and it just keeps erroring out saying that "Field 'templateId' is required and cannot be empty."
I found the below post, although old, and it has a fairly simple code that I've tried to emulate to no avail.
This post references the exact error and says that it was caused by lineBaseSettings being required but not in the JSON. I have this there but still cannot get it to work.
Updating remote phone adress through API - Platform API - Genesys Cloud Developer Forum
Here's what I have in the JSON Body. I've previously had a Name field under Lines but that's removed from this example:
{
"webRtcUser": {
"id": "ID Value"
},
"lines": [
{
"lineBaseSetting": {
"id": "ID Value"
}
}
],
"site": {
"id": "ID Value"
},
"name": "Brad Hand - WebRTC",
"phoneBaseSettings": {
"id": "ID Value"
}
}
And here's the direct PowerShell code:
$WebRTCPhone = @{
name = "Brad Hand - WebRTC"
phoneBaseSettings = @{
id = "ID Value"
}
webRtcUser = @{
id = "ID Value"
}
site = @{
id = "ID Value"
}
lines = @(
@{
lineBaseSetting = @{
id = "ID Value"
}
}
)
}
$WebRTCPhone | ConvertTo-Json -depth 5