CXone Admin API 400 Bad Request on bulk agent skill proficiency update

Trying to bulk-update agent skill proficiencies via the CXone Admin API (/api/v2/admin/agents/{agentId}/skills) from our Kotlin backend service. The goal is to sync proficiency levels for a batch of agents during shift changes without hitting the API limit per agent. The docs suggest sending a PATCH request with a JSON body containing the list of skills and their proficiency levels.

Here’s the payload structure I’m using:

{
 "skills": [
 {
 "skillId": "12345",
 "proficiencyLevel": "Advanced"
 },
 {
 "skillId": "67890",
 "proficiencyLevel": "Intermediate"
 }
 ]
}

The request headers include Content-Type: application/json and the standard Authorization: Bearer <token>. When I send this, I get a 400 Bad Request with a generic error message: Invalid request body. No specific field validation errors are returned, which makes debugging tough.

I’ve verified the agentId is correct and the agent exists. The skillIds are valid and match the skills assigned to the agent. The proficiencyLevel values match the enum values from the CXone documentation (Beginner, Intermediate, Advanced, Expert).

I tried sending a single skill update first, and that worked fine. It’s only when I send multiple skills in the array that it fails. Is there a limit on the number of skills that can be updated in a single request? Or is the structure of the JSON body slightly off?

Also, I noticed that some agents have more than 10 skills. Does the API handle large arrays differently? I’m using OkHttp for the HTTP client in Kotlin, and the request is formatted correctly as per the logs.

Any insights on why this would fail only with multiple skills? I’ve checked the network tab in Postman, and the request looks identical to the successful single-skill update, except for the array length.