We are attempting to provision a new contact list via the Genesys Cloud REST API as part of our Terraform import strategy. The goal is to create the resource outside of Terraform to capture the initial ID, then import it into state. However, the POST request to /api/v2/outbound/contactlists consistently fails with a 400 Bad Request.
The response body indicates an INVALID_VALUE error, but the error message is generic and does not specify which field is malformed. Here is the JSON payload we are sending:
{
"name": "QA_Test_List_001",
"description": "Automated test list for QA environment",
"addressType": "CSV",
"columnHeaders": [
{
"name": "contactId",
"type": "STRING",
"required": true
},
{
"name": "firstName",
"type": "STRING",
"required": false
},
{
"name": "lastName",
"type": "STRING",
"required": false
},
{
"name": "phone",
"type": "STRING",
"required": true
}
]
}
We have verified the following:
- The OAuth token has the
outbound:contact-list:createscope. - The
addressTypeis set toCSVwhich should allow creation without immediate file upload if we plan to add contacts later. - The column headers match the expected schema for outbound contacts.
The error persists even when we strip the payload down to just name and addressType. It feels like there is a hidden validation rule or a required field that is not documented in the standard OpenAPI spec. Has anyone encountered this specific INVALID_VALUE trap when creating lists via API? The Terraform provider creates these lists without issue, so we are trying to reverse-engineer the underlying API call structure. The headers include Content-Type: application/json and Accept: application/json. We are using the Berlin region endpoint api.europe.genesys.cloud.