Script block fails to render in Architect flow

Stuck on a configuration error when linking a new script block to an Architect flow. The API call to POST /api/v2/flow/flowbuilder/elements returns a 400 Bad Request with message Invalid script reference ID. How do I validate the script ID format before publishing?

The docs actually state that script references in Architect flows must strictly adhere to the UUID v4 format without any surrounding whitespace or formatting characters. The Invalid script reference ID error typically arises when the ID copied from the Script Manager contains hidden characters or when the system expects a specific version identifier that is missing from the payload. To validate the format, ensure the ID matches the pattern xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. If you are constructing the JSON payload manually, verify that the id field is a string type and not an integer or null value.

From an operational perspective, this issue often surfaces when teams migrate flows between regions, such as moving configurations from US to Europe/Paris. The underlying resource IDs might remain consistent, but the local cache within the Architect interface can sometimes lag, presenting stale or invalid references in the UI. It is advisable to refresh the Architect canvas after copying the script ID directly from the script’s URL in the browser address bar, rather than from the settings panel, to ensure the full, untruncated identifier is captured. Additionally, check if the script is published; unpublished drafts do not generate stable IDs suitable for flow integration. If the ID is valid, try creating a new test flow element to isolate whether the issue is specific to that flow instance or a broader account-level caching problem. This approach helps distinguish between a simple copy-paste error and a more systemic synchronization delay within the platform.

If I remember correctly… the script ID format is strict, but the real issue is often how the payload is constructed in the JMeter request body. When testing API throughput, extra whitespace or incorrect JSON structure causes that 400 error immediately.

{
 "element": {
 "type": "script",
 "settings": {
 "scriptId": "valid-uuid-here"
 }
 }
}

Validate the UUID in your test script before sending. The platform API rejects malformed inputs instantly, which breaks load testing patterns. Check the raw JSON in the request headers to ensure no trailing characters exist. This usually resolves the reference issue without needing to rebuild the flow.

If I recall correctly, the issue is rarely the UUID format itself, but how the payload is constructed during high-throughput API calls. When running JMeter scripts to simulate concurrent flow updates, extra whitespace or incorrect JSON nesting often triggers that 400 error immediately.

“Invalid script reference ID”

The platform API is strict about the scriptId field. Ensure your JSON body matches this exact structure without any trailing commas or hidden characters:

{
 "element": {
 "type": "script",
 "settings": {
 "scriptId": "your-valid-uuid-here"
 }
 }
}

Validate the UUID in your test script before sending. The platform API rejects malformed inputs instantly. Also, check if you are hitting rate limits on the POST /api/v2/flow/flowbuilder/elements endpoint. If you are pushing too many requests per second, the API might return generic errors. Throttle your JMeter thread group to match the documented API throughput limits for your tenant tier. This usually resolves the rendering failure.

have you tried checking if the script is actually published? in zendesk we just saved drafts and they worked, but here in genesys cloud the script must be fully published to get a valid id. also make sure no extra spaces are in that uuid field.