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?