CXone Studio Snippet: INVALID_FUNCTION error with GetRESTProxy syntax

Stuck on a CXone Studio snippet trying to call an external REST API. The goal is simple: send a POST request to a local endpoint to update a ticket status based on the call disposition. I’m using the GetRESTProxy function, but the script fails immediately with an INVALID_FUNCTION error during runtime. The error log points to the line where I declare the proxy variable.

Here is the exact snippet code:

ASSIGN restProxy = GetRESTProxy("https://internal-api.corp.com/tickets/update")
restProxy.SetMethod("POST")
restProxy.SetHeader("Content-Type", "application/json")
restProxy.SetHeader("Authorization", "Bearer " + auth_token)
restProxy.SetBody('{"status": "resolved"}')
restProxy.Execute()

I’ve checked the CXone developer docs for Studio Snippets, and GetRESTProxy is listed as a valid function for creating REST clients. The syntax looks correct according to the examples. I’m passing the URL as a string argument. The variable auth_token is populated earlier in the flow and contains a valid JWT.

The error is specific: INVALID_FUNCTION: GetRESTProxy is not recognized in this context. This implies the function might not be available in the current execution environment, or maybe the argument structure is wrong. I tried wrapping the URL in quotes explicitly and removing spaces, but no change.

Is GetRESTProxy supported in standard Studio snippets, or is this a feature restricted to specific CXone versions or enterprise tiers? We’re running the latest stable release of CXone. Another team member mentioned using InvokeREST instead, but I can’t find documentation for that function. If GetRESTProxy is the right path, what’s the exact parameter signature? Maybe I’m missing a configuration object or a proxy type argument.

Any working example of a POST request in a Studio snippet would help. I just need to hit that endpoint and get a 200 OK. The logic is straightforward, but the syntax is blocking progress. I’ve spent two hours staring at this code block. It feels like a minor typo, but I’ve compared it character by character with the docs.

Could it be a permissions issue on the Studio environment? The script runs fine when I remove the GetRESTProxy line. The rest of the logic executes without errors. So the problem is isolated to this function call.

I don’t want to rewrite the whole integration using Architect if I can fix this snippet. It’s cleaner to keep it in Studio for this use case. Just need the correct syntax.

Thanks for any pointers.