400 INVALID_VALUE on POST /api/v2/outbound/contactlists - missing required field?

Attempting to provision a new outbound contact list via the REST API as part of our Terraform genesyscloud_outbound_contact_list resource logic. The provider is failing during the create step, so I’m debugging the raw API call to isolate the issue.

I’m sending a POST to /api/v2/outbound/contactlists with the following JSON payload:

{
 "name": "Test Contact List - API",
 "description": "Created via API for debugging",
 "type": "CSV",
 "contactColumns": [
 {
 "id": "name",
 "name": "Name",
 "contactField": "name"
 },
 {
 "id": "phone",
 "name": "Phone",
 "contactField": "phone"
 }
 ]
}

The response is a 400 Bad Request with the error code INVALID_VALUE. The error message is generic: Invalid value for request body. It doesn’t specify which field is at fault. The name is unique in our org, and the contactColumns array matches the schema defined in the Swagger spec. I’ve verified the OAuth token is valid and has the outbound:contact_list:write scope.

Is there a hidden required field I’m missing? Or is the contactField mapping incorrect for a CSV type? The Terraform docs are sparse on this specific error.

The docs for the Outbound API are a bit sparse on this specific error, but I’ve seen this 400 INVALID_VALUE pop up when the type field is missing or set to an unexpected value. It’s not just about the name.

You’re likely hitting a schema validation error on the server side. The contact list resource requires a type property to distinguish between standard lists and dynamic ones. If you omit it, the API assumes a default, but sometimes the validation layer gets picky if other fields imply a specific type.

Here’s the payload structure that actually works for me in our Python scripts:

{
 "name": "Test Contact List - API",
 "description": "Created via API for testing",
 "type": "STATIC",
 "knowledge": {
 "knowledgeArticles": []
 },
 "contactListType": "DEFAULT"
}

Notice the type: "STATIC" line. That’s the key. Also, check if your Terraform provider is sending an empty object for knowledge or contactListType. If you’re using the genesyscloud_outbound_contact_list resource, ensure you’re explicitly setting type = "STATIC" in the HCL.

If that doesn’t fix it, try adding contactListType: "DEFAULT". I ran into a similar issue last quarter where the API rejected the request because the client sent contactListType: null instead of omitting it or setting it to “DEFAULT”.

One more thing to check: are you using the correct OAuth scopes? You need outbound:contactlist:write and outbound:contactlist:read. If the token is stale or missing those, you might get a 403, but sometimes the API returns a 400 if the internal routing fails due to auth issues. Weird, but it happens.

Try updating your JSON with the explicit type and see if the error changes. If you still get a 400, dump the full response body. The errors array usually points to the exact field causing the headache.