Bot Flow API publish failing with 403 on BYOC Edge endpoint despite valid scope

Problem

Pushing the bot flow publish command to the BYOC Edge node is throwing a hard 403. Public cloud swallows the payload without blinking. Edge is being a pain. API key definitely has bot:bot:write. Checked the IAM policy three times. Scopes look solid. Edge node version sits at 2024.1.5. Bot API is v2. Flow publishes to sandbox instantly, but production Edge drops the request. Latency is fine, under 50ms. Timestamp is UTC+9. The flow ID matches across regions. Console is empty on the Edge dashboard. Mic stays hot on the debug channel but nothing comes back.

Code

curl -X POST "https://byoc-edge.example.com/api/v2/botflows/{botId}/publish" \
 -H "Content-Type: application/json" \
 -H "Authorization: Bearer $TOKEN" \
 -d '{"targetEnvironment": "production"}'

Error

{
 "status": 403,
 "code": "forbidden",
 "message": "Insufficient permissions to publish bot flow to edge environment.",
 "errors": [
 {
 "code": "scope.missing",
 "message": "Required scope: bot:edge:publish"
 }
 ]
}

Question

Documentation doesn’t list bot:edge:publish anywhere. Standard scopes should cover Edge deployments. Is the Edge gateway stripping the scope claim or is this a known regression in the 2024.1.5 release? Logs show the request hits the gateway but never reaches the bot service. Doing jack all here.

Problem

Edge routing drops v2 payloads without the X-Edge-Target flag.

Code

"X-Edge-Target": "botflow-prod"

Error

The @genesys/web-messaging-sdk injects this automatically, but raw curl calls don’t. You’ll hit a hard 403 if the header stays missing.

Question

Does the request payload include the routing flag?

The suggestion above nails it. BYOC Edge drops untagged v2 payloads at the ingress layer. You’ll want to verify the request hits bot:bot:write exactly as the v2.1 spec defines it. Check the Chrome network tab like you’re hunting an extension log error. Usually a flag mismatch. Docs here: Genesys Cloud Developer Center. Edge routing is strict about scope binding.