I’m trying to automate the creation of outbound contact lists using the Genesys Cloud API. We’ve got the OAuth token part sorted, but I’m hitting a wall when trying to POST the actual list resource.
The endpoint is /api/v2/outbound/contactlists.
Here is the JSON payload I’m sending:
{
"name": "Campaign Alpha - Q3",
"description": "Test list for new campaign",
"contactType": "CONTACT",
"dataColumns": [
{
"name": "phone_number",
"type": "string"
},
{
"name": "first_name",
"type": "string"
}
]
}
I get a 400 Bad Request response. The error object says:
{
"errors": [
{
"code": "INVALID_VALUE",
"message": "The value for 'name' is invalid."
}
]
}
This is confusing because name is just a string. I’ve tried changing the name to something super simple like “test123” with no spaces or special characters, but it still fails with the exact same error. The documentation doesn’t list any specific regex constraints for the name field other than it being required.
Am I missing a required nested field in the request body that’s causing the validator to reject the name? Or is there a limit on length I’m unaware of?
I’m using Python requests to make the call. The headers include Content-Type: application/json and the valid Bearer token. Any ideas?