I’m trying to programmatically create a new contact list for an outbound campaign using the CXone API. The endpoint is POST /api/v2/outbound/contacts/lists. I’ve validated the JSON payload against the Swagger spec multiple times, and the columns array matches the required structure for a simple CSV import. The error response is consistently 400 Bad Request with the message INVALID_VALUE: The value provided for 'columns' is invalid. This is frustrating because the same payload works fine when I manually create the list via the UI and then export it, but the API rejects it outright. Here is the minimal reproducible payload I’m sending:
{
"name": "Test List API",
"description": "Automated test",
"columns": [
{
"name": "phone",
"type": "text",
"isKey": true,
"required": true
},
{
"name": "name",
"type": "text",
"required": false
}
],
"contactFormat": {
"type": "csv"
}
}
I’ve also tried adding "isEmail": false to the phone column, and changing type to string instead of text, but the result is identical. The API docs are vague on what constitutes a valid column definition in this context. I’m using a service account with full outbound:contactList:write permissions, so auth isn’t the issue. The request headers include Content-Type: application/json and a valid OAuth2 token. I’ve checked the network tab in Postman to ensure no extra characters are being appended. Is there a hidden constraint on the isKey flag or the order of columns that isn’t documented? I’ve spent the last two hours tweaking this JSON without any luck. The error doesn’t point to a specific field, just the whole object. I’m on the America/Mexico_City timezone, but that shouldn’t matter for the schema validation. Any ideas what I’m missing here?