Python webhook registrar POST to `/api/v2/platform/webhooks` keeps throwing 422 on retry policy schema

Running a Python 3.10 script to spin up system event webhooks automatically, and the registration endpoint keeps rejecting the payload. The JSON schema validation step in our webhook registrar pipeline passes locally, but Genesys drops it with a 422 Unprocessable Entity. Here’s the payload structure we’re pushing to /api/v2/platform/webhooks:

payload = {
 "name": "sys-event-router-prod",
 "url": "https://internal-gw.example.com/hook",
 "events": ["system:queue:member:added", "system:interaction:created"],
 "retryPolicy": {
 "maxAttempts": 5,
 "backoff": "exponential",
 "timeoutSeconds": 30
 },
 "secret": hashlib.sha256(os.urandom(32)).hexdigest(),
 "idempotencyKey": f"webhook-{uuid.uuid4()}"
}

The validator keeps barfing on the retry block. Docs are outdated anyway. Swapped it to responseTimeoutSeconds and now it’s choking on the events array format. We’ve got an attribute extraction pipeline running upstream to strip out nested objects before the POST, but the API expects a flat list of event strings. Also, the automatic deprecation hook for stale endpoints isn’t triggering when we overwrite the idempotency key. Rate limits on the endpoint are kicking in after three rapid POSTs, so we added a 2-second sleep, but the delivery latency tracking in the dashboard still shows zero health metrics. Audit logs just show 422 again. Not touching the retry block anymore.

Problem
Sticking to the standard api integration flow means the RETRY_POLICY schema expects a strict nested object, not a flat dictionary.

Code

"retryPolicy": {
 "maxRetries": 3,
 "backoffRate": "EXPONENTIAL"
}

Error
You’ll stop the 422 immediately by swapping the flat keys for that nested RETRY_POLICY structure.

Question
Verify the WEBHOOK_ENDPOINT_CONFIG mapping before pushing the next batch.

The suggestion above gets past validation, but watch out for the backoffRate enum casing. POST /api/v2/platform/webhooks expects lowercase values. Docs miss that detail constantly. You’ll hit a silent 422 on deployment otherwise.

"retryPolicy": {
 "maxRetries": 3,
 "backoffRate": "exponential"
}

Scope platform:webhooks:write handles the rest. Just verify the edge routing matches your BYOC setup before pushing.