Getting 422 Unprocessable Entity when creating messaging engagements via Terraform provider v1.15.4.
resource “genesyscloud_messaging_engagement” “test” {
name = “Test Engagement”
description = “Auto-created”
engagement_flow {
flow_id = var.flow_id
}
messaging_platform {
platform = “messaging_whatsapp”
endpoints {
endpoint_id = var.endpoint_id
}
}
}
Error response:
{
“code”: “invalid_request_body”,
“message”: “Failed to parse JSON payload: Invalid nested object structure for messaging_platform”,
“status”: 422
}
Issue happens only with WhatsApp platform. SMS and Facebook work fine.
API logs show the request payload is correctly formatted. Suspect the provider is sending nested objects that the Genesys Cloud API doesn’t accept for WhatsApp endpoints.
Environment:
- Terraform Provider: v1.15.4
- Genesys Cloud Region: AP-1
- Service Account: admin:messaging, admin:architect
Has anyone encountered this? Need to automate WhatsApp engagement creation. Manual creation in UI works without issues.