Architect Data Action expression validation failing on DateTimeDiff comparison via Python SDK

Problem
Trying to push an updated Architect data action through the /api/v2/architect/dataactions endpoint using the Python SDK. The flow needs to check if a timestamp from an external system falls on a weekend. We’ve been using DateTimeDiff alongside GetDayOfWeek in the expression string. The validation keeps rejecting the JSON payload before the API call even completes.

Code
Here is the expression string we are injecting into the data action mapping payload:

expression = "GetDayOfWeek(DateTimeDiff('{{trigger.payload.timestamp}}', 'now()', 'days')) == 0 OR GetDayOfWeek(DateTimeDiff('{{trigger.payload.timestamp}}', 'now()', 'days')) == 6"
data_action_update = {
 "id": "da-987654321",
 "mappings": {
 "isWeekend": {
 "type": "expression",
 "value": expression
 }
 }
}
response = client.architect_api.put_architect_data_action(data_action_id="da-987654321", body=data_action_update)

Error
The SDK throws a validation error straight away.
genesyscloud.rest.rest_client.ApiException: (400) Reason: Bad Request
Response body shows: "expression is invalid. Function DateTimeDiff expects 3 arguments."
We counted three arguments in the string. The timestamp variable, the literal string 'now()', and 'days'. The Architect UI accepts this exact string when pasted directly into the expression builder. The API just hates it. We don’t see why the platform parser is choking on the nested function call. It’s failing validation every time. Tried it three times already. The docs are pretty vague on this. String escaping in JSON usually handles the quotes fine, but maybe the expression builder strips them out during validation.

Question
Is there a specific escaping rule for nested functions when pushing expressions via the REST API? We’ve tried wrapping the inner now() call in quotes, removing them, and switching to DateTimeCompare. Nothing works through the SDK. The validation logic on the platform seems stricter than the UI builder. How do we format the date comparison string so the Python client doesn’t choke on it. The SDK just returns 400 every single time. No idea what the parser is looking for.