CXone Admin API bulk skill update failing with 400 Bad Request

Trying to bulk-update agent skill proficiencies via the CXone Admin API. I’m sending a POST to /api/v2/users/skills with a JSON payload containing an array of skill updates. The request keeps failing with 400 Bad Request. Here’s the payload structure: [{ "userId": "123", "skillId": "456", "proficiency": "advanced" }]. I’ve verified the IDs are correct. Is there a specific format for the array or a missing header? The docs are sparse on bulk operations. Any help appreciated.

The endpoint /api/v2/users/skills doesn’t handle bulk array payloads like that. It expects individual user-skill mapping objects, not an array of updates. The 400 is likely because the parser chokes on the leading [.

Here’s the correct structure for a single update, which you’ll need to loop through in your script:

{
 "userId": "123",
 "skillId": "456",
 "proficiency": "advanced"
}

If you’re doing this in Studio, don’t try to jam an array into one REST Proxy action. It won’t work. Instead, use a For Each loop over your list of agents. Inside the loop, configure the REST Proxy to POST to /api/v2/users/skills with the individual JSON object mapped from the loop variables.

Make sure your headers include Content-Type: application/json and that you’re using a token with the user:skill:write scope. The Admin API is strict on schema validation. If the proficiency string doesn’t exactly match the enum values (novice, basic, intermediate, advanced, expert), it’ll also reject it.

Studio’s REST Proxy handles the JSON serialization automatically if you map the fields directly in the request body tab. Just avoid wrapping it in an array.

Here’s a quick curl example for testing outside Studio to verify the payload shape works:

curl -X POST https://api.mynice.com/api/v2/users/skills \
 -H 'Authorization: Bearer YOUR_TOKEN' \
 -H 'Content-Type: application/json' \
 -d '{
 "userId": "123",
 "skillId": "456",
 "proficiency": "advanced"
 }'

If you still get a 400, check the response body. It usually points to the exact field causing the issue. Sometimes it’s a trailing comma or a typo in the skill ID.