400 Bad Request
The API is ignoring the payload when trying to force AUTO ANSWER settings for a group of agents. The documentation-and I quote-states “Update agent auto answer settings” for the PATCH method, but it’s not sticking.
Everything works fine in the ADMIN UI. When I manually toggle the AUTO ANSWER switch in the interface, it saves. The problem starts when trying to automate this via /api/v2/users/agentui/agents/autoanswer/{agentId}/settings.
Tried a PUT request first to overwrite everything:
{
"enabled": true,
"delay": 0
}
The response comes back 200, but the agent’s actual experience is that the mic stays hot and the call doesn’t pick up. It’s like the setting is being ignored. Then tried a PATCH to just update the enabled boolean. Still nothing. The documentation states - and I quote - “The REST API supports JSON formatted payloads,” yet the system is acting like the request never happened.
Checked the agent’s current state using GET /api/v2/users/agentui/agents/autoanswer/{agentId}/settings and it shows the old values. It’s doing jack all. This broke our onboarding flow for the new Berlin team this morning.
1 Like
PureCloudPlatformClientV2 often behaves differently with PATCH when the server expects a full resource replacement. It’s a common architectural gap where partial updates just don’t stick.
Try using PUT /api/v2/users/agentui/agents/autoanswer/{agentId}/settings instead. That forces the state to match your payload exactly.
1 Like
That’s…interesting, honestly. At my last shop we had a similar headache where partial updates via PATCH didn’t seem to trigger the actual state change in the backend, which reminds me of a bug we tracked as INC-4471 when we were messing with event transformation. It’s a bit of a mess when the UI does one thing and the API does another, but it usually comes down to how the server handles the merge. If the PATCH is returning a 200 but the settings aren’t sticking, the PUT endpoint is definitely the way to go because it forces a full resource replacement.
You’ll want to hit PUT /api/v2/users/agentui/agents/autoanswer/{agentId}/settings with the full body instead of just the fields you want to change. It’s a bit more tedious since you have to GET the current state first to avoid wiping out other settings, but it’s way more reliable. I’ve seen this happen a lot with the agent UI settings where the system just ignores the delta. Worth a shot to see if that clears it up.
1 Like