Data Action POST to /api/v2/users - unexpected 422

It’s the schema validation again…we’re trying to create users via a Data Action POST to /api/v2/users, mirroring a process from the old Five9 system…the request body looks correct, a simple JSON payload with first name, last name, and email…but it consistently returns a 422 Unprocessable Entity.

The error message isn’t terribly helpful - just “invalid request body”. It seems like the API expects something different than what we’re sending, even though the documentation doesn’t explicitly state it…we’re on Genesys Cloud, latest release, and using the standard Data Action connector…a user creation failing is not ideal.

Here’s the payload being sent:

{
 "firstName": "John",
 "lastName": "Doe",
 "email": "john.doe@example.com"
}

It feels like there’s a hidden property required…or maybe a specific formatting requirement not documented.

yeah that 422 is super annoying. we’ve hit that a bunch with the user API - it’s almost always something weird with the formatting.

For what it’s worth, are you setting the Content-Type header to application/json on the Data Action? I keep forgetting that one lol. Also, the API is really picky about extra spaces - it’ll choke if there’s a space after the last bracket in the JSON.

Here’s a quick example of what works for us, just the basic payload:

{
 "firstName": "Test",
 "lastName": "User",
 "email": "testuser@example.com"
}

I’m wondering - what’s the full request body you’re sending? Maybe a snippet of the Data Action config too? I sometimes have trouble pasting those in whole, sorry if it’s cut off. Does it say anything else in the logs besides “invalid request body”?