POST /api/v2/outbound/contactlists returning INVALID_VALUE for new list

Quick question about creating outbound contact lists via the API. I am automating the ingestion of lead data into Genesys Cloud from an S3 bucket processed by an AWS Glue job. The Glue job exports a CSV and then triggers a Lambda function to call the Outbound API. I am using a service account with the outbound:contactlist:create permission.

The request fails with a 400 Bad Request and the following error payload:

{
 "errors": [
 {
 "code": "INVALID_VALUE",
 "message": "Invalid value for field 'name'."
 }
 ]
}

I have validated the name string in Python before sending. It contains no special characters and is under 255 characters. Here is the configuration I am passing in the POST body:

name: "Glue_Import_Test_List"
status: "INACTIVE"
contact_columns:
 - column_name: "phone"
 data_type: "PHONENUMBER"
 name: "Phone Number"
 - column_name: "email"
 data_type: "EMAIL"
 name: "Email Address"

The API documentation suggests that contact_columns is optional on creation if you want to define it later, but I want to define it upfront. Is there a specific format requirement for the data_type enum values in the POST request that differs from the GET response? I am using Python requests library with standard JSON headers. Any insights on why name would be flagged as invalid when it appears perfectly valid?

The docs actually state that contactListName is mandatory, but the real issue is likely your column definitions. You are sending a CSV schema, but the API expects explicit columnDefinitions in the payload. If you omit this, it defaults to generic strings, causing the INVALID_VALUE error when it tries to map your specific lead data types.

Here is the correct JSON structure for the POST request:

{
 "contactListName": "Leads_Ingest_2023",
 "description": "Auto-ingested from S3",
 "contactListType": "UPLOAD",
 "columnDefinitions": [
 {
 "name": "FirstName",
 "type": "STRING",
 "length": 50
 },
 {
 "name": "Phone",
 "type": "STRING",
 "length": 20
 }
 ]
}

Ensure your Lambda constructs this payload before calling /api/v2/outbound/contactlists. Also, verify your service account has outbound:contactlist:write scope, not just create. The INVALID_VALUE usually points to schema mismatch, not auth.

It depends, but generally…

's point on columnDefinitions is valid, but your CSV delimiter might also be tripping the parser. If you’re using semicolons, you must specify delimiter: ";" in the payload.

Here is the minimal working JSON structure for the POST body:

{
 "contactListName": "Leads_Import",
 "description": "AWS Glue Ingest",
 "columnDefinitions": [
 {
 "name": "phone",
 "dataType": "PhoneNumber"
 }
 ],
 "delimiter": ";"
}