Trying to push the ACMA opt-out script through the nightly GitHub Actions run against the Sydney BYOC edge. The /api/v2/architect/scripts endpoint just rejects the payload with a 422 on the prompt duration validation.
Running SDK version 2024.3.0 and latency to mypurecloud.com.au sits around 180ms so it doesn’t look like a network timeout. Console throws {“code”:“invalid”,“message”:“Prompt duration exceeds maximum allowed threshold”}.
Hit this exact wall last month during the ACMA rollout. The Sydney edge is stricter than the global endpoints, and the SDK validation logic hasn’t caught up with the specific ACMA compliance requirements for mpt duration.
The issue isn’t your network latency. It’s how you’re defining the duration in the JSON payload. The API expects milliseconds, but the ACMA mpt validator on the edge caps it at 30,000ms (30 seconds) for single-tone mpts. If you’re sending a value like 35000 or leaving it undefined, it defaults to a longer duration that triggers the 422.
Here’s the fix. Stop using the high-level SDK method for this specific mpt type. It abstracts away the validation details. Drop down to the raw HTTP request or use the Architect JSON builder directly.
{
"actions": [
{
"id": "acma-optout-mpt",
"type": "playPrompt",
"mpt": {
"type": "text",
"text": "To opt out of future calls, press 9 now."
},
"duration": 25000,
"barge": true,
"maxRepeats": 1
}
]
}
Notice the duration is explicitly set to 25000. Keep it under 30 seconds. Also, make sure the mpt.text doesn’t contain any special characters that might be interpreted as longer audio segments by the TTS engine. I had an issue where a hyphen in the text caused the TTS to add a pause, pushing the calculated duration over the limit.
If you’re still stuck, try removing the duration field entirely and let the system calculate it. Sometimes the SDK sends a default of 60000ms which gets rejected. The edge logs will show the exact calculated duration if you enable debug mode in the Architect script settings. Just don’t use the GUI to export the script for the API call. It adds metadata that the validation layer hates.