Set Participant Data action failing with 400 Bad Request in Architect

Context:
Attempting to inject a custom variable into the IVR session via the Set Participant Data action. The payload structure matches the v2 schema, yet the flow execution logs show a hard fail.

POST /api/v2/flows/participants/{participantId}/data
Payload:
{
 "key": "custom_ref",
 "value": "12345"
}

Question:
Why does the API return a 400 Bad Request when the JSON is valid? The error trace indicates Invalid input format for data action. Is the value field strictly requiring a string wrapper even for numeric data, or is there a hidden schema constraint in the Architect Data Action definition?

I’d suggest checking out at the content-type header; the set participant data endpoint strictly requires application/json and the value must be a string, not an integer. here is a rust snippet using reqwest to ensure the payload is serialized correctly:

let payload = serde_json::json!({
 "key": "custom_ref",
 "value": "12345"
});
client.post(url)
 .header("Content-Type", "application/json")
 .body(payload.to_string())
 .send()
 .await?;