Script API 400 Error: Invalid 'type' enum value for dynamic script updates

I’ve spent hours trying to figure out why the Genesys Cloud Script API is rejecting our update payload with a validation error, despite the payload conforming to the OpenAPI specification.

Error Message: 400 Bad Request: Validation failed: type must be one of [text, audio, video]

We are building a multi-tenant AppFoundry integration that dynamically provisions scripts for our clients. The workflow involves creating a script template in a central “master” organization and then cloning and updating specific nodes for each tenant environment. The initial POST /api/v2/scripts call succeeds without issue. The problem arises during the subsequent PUT /api/v2/scripts/{scriptId} call when we attempt to update the content of a specific node.

The node in question is a standard text node. Our payload explicitly sets the type field to "text". Here is a sanitized snippet of the JSON body we are sending:

{
 "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
 "name": "Tenant_Specific_Script_V2",
 "type": "voice",
 "version": 2,
 "nodes": [
 {
 "id": "node_001",
 "type": "text",
 "text": "Please hold while we transfer you.",
 "playback": {
 "type": "text"
 }
 }
 ]
}

The API response returns a 400 error indicating that the type field is invalid, even though text is a valid enum value for script nodes. This behavior is inconsistent. If we omit the type field entirely, the API defaults to text, but we need to explicitly set it to ensure consistency across our automated deployment pipeline.

We are using the Genesys Cloud Java SDK version 24.1.0. The issue persists across different script IDs and tenant organizations. Is there a hidden constraint on the type field when updating existing nodes via the API? Or is this a known bug in the current SDK version? We have verified that the OAuth tokens have the necessary script:write permissions. Any insights into why the enum validation is failing would be greatly appreciated.