Data Table row creation returning 400 on POST /api/v2/flows/datatables/{datatableId}/rows

Hi all,

Something weird is happening with a Data Table I’m using across about 12 different flows. The table has a mix of string and integer columns, but every time a specific flow tries to push a new entry via a Data Action, it’s failing. The API returns a 400 Bad Request. It’s odd because the same payload works fine when I hit the endpoint manually in the API Explorer, but the flow execution just dies.

The request body looks like this:

{
 "key": "cust_9921",
 "values": {
 "AccountTier": "Gold",
 "RetryCount": 3,
 "LastContactDate": "2023-10-24"
 }
}

Does this happen if the Data Table is locked by another admin in the UI? I tried calling POST /api/v2/flows/actions/unlock just to be safe, but that didn’t change the result. Is there any quirk with how Architect handles the integer type coercion during the POST /api/v2/flows/datatables/{datatableId}/rows call?

We’re on Genesys Cloud. This 400 error usually happens because of a DATA_TYPE mismatch between the flow variable and the table column.

Are you sending a string where the table expects an integer? The logic should be:

IF variable IS NOT number THEN convert_to_int() ELSE send_as_is()

Check if the DATA_ACTION is passing a quote around a number.

3 Likes
{
 "key": "12345",
 "value": 100
}

The fix mentioned in the earlier reply is spot on. It’s a common headache for us with our 1,200 agents because the Data Action doesn’t cast types. If the table expects an integer but the flow sends a string “100”, the /api/v2/flows/datatables/{datatableId}/rows endpoint rejects it. You’ve got to ensure the JSON payload explicitly omits quotes for numeric columns.

Right, so the logic in the earlier reply is spot on. It’s a classic case of the Data Action passing a string wrapper around a number, which the API rejects. We’ve spent four coffees debugging this exact behavior in our ETL pipelines.

The mismatch looks like this:

[Flow Var: “123”] → [Data Action] → [API: Expects Int] = 400 Error
[Flow Var: 123] → [Data Action] → [API: Expects Int] = 200 OK

To fix this:

  1. Use a To Number function in the Architect flow before the Data Action.
  2. Ensure the dataTableRow body in the POST /api/v2/flows/datatables/{datatableId}/rows call doesn’t have quotes around the integer value.