I’m trying to programmatically create a new Outbound contact list via the CXone REST API. The goal is to automate the onboarding of new CSV uploads for our weekly dial campaigns. I have the OAuth token sorted, and it has the outbound:contactlist scope. I’m hitting the endpoint POST /api/v2/outbound/contactlists.
The request fails with a 422 Unprocessable Entity. The error body is pretty vague. It says INVALID_VALUE for the address property in the contactListData object. I’ve checked the schema docs, and I’m supplying the required fields: city, state, country, postalCode, and street1.
Here is the JSON payload I’m sending:
{
"name": "Test List Oct 2023",
"description": "Automated test",
"contactListData": {
"id": "",
"name": "Test List Oct 2023",
"address": {
"city": "San Francisco",
"state": "CA",
"country": "US",
"postalCode": "94105",
"street1": "123 Market St"
},
"contacts": []
}
}
I’ve tried removing street1 just to test. I’ve tried swapping US for United States. I’ve even tried passing an empty string for postalCode since it’s technically optional in some contexts. Nothing works. The error always points back to the address block.
I know this list structure works if I create it manually in the UI. The API seems to be rejecting the nested object structure or expecting a different format for the address components. Is there a specific order required? Or am I missing a hidden validation rule for the contactListData wrapper?
I’m using Postman for this test, so it’s not a language-specific serialization issue. Just raw JSON. Any ideas on what the API is actually expecting here? I’ve been staring at this for two hours.