Agent Scripting API 400 on Custom Attribute Payload

I’m trying to figure out why the /api/v2/interaction/agent-scripting endpoint returns a 400 Bad Request when submitting custom attributes via our AppFoundry integration. The payload structure matches the schema documentation for v2.10, yet the response indicates a missing required field. Our environment runs Genesys Cloud v2024.1. The issue persists across multiple tenants using multi-org OAuth. Any insights on payload formatting quirks for scripting metadata?

Take a look at at the interaction ID validation within the payload structure. The 400 Bad Request error often occurs when the reference ID is malformed or does not correspond to an active interaction in the system.

Verify that the custom attribute schema aligns strictly with the v2.10 definitions. A mismatch in data types or missing required nested fields will trigger this response immediately.

What’s probably happening here is that the interaction ID format. Double-check that it matches the exact structure from the active session payload, as a slight mismatch triggers the 400 immediately.