Running into a weird validation error when trying to programmatically create an outbound contact list. I’m using the REST API to push a fresh list of leads from our CRM. The list itself is small, just 50 records for testing.
I’m hitting POST /api/v2/outbound/contacts/lists with a valid Bearer token. The endpoint accepts the request but immediately spits back a 400 Bad Request. The error message is generic but the code is specific: INVALID_VALUE.
Here is the JSON payload I’m sending:
{
"name": "Test_List_001",
"description": "Automated import test",
"contactCount": 50,
"contacts": [
{
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+15550109876",
"data": {
"leadSource": "Web"
}
}
]
}
Wait, that’s not quite right. I’m sending the full array in the contacts field, not just one object. Let me show the actual structure causing the issue. The contacts array has 50 items. The contactCount field matches the length of that array. I’ve verified the phone numbers are E.164 compliant. No special characters.
I tried removing the contactCount field entirely. Same error. I tried setting it to 0. Same error. The documentation says contactCount is optional and usually calculated server-side, but it seems like the validator is choking on something related to the list size or the structure of the contacts array.
Is there a hidden requirement for the data object? Maybe a schema mismatch? I’m using standard string types for all custom fields. The script works fine when I manually create the list in the UI and then upload a CSV. This API path just refuses to accept the JSON body.
Any idea what triggers INVALID_VALUE on this endpoint specifically? I’m stuck on this for hours.