GetRESTProxy() throwing INVALID_FUNCTION in CXone Studio Snippet

Hey folks,

Stuck on a Studio Snippet that keeps failing validation. I’m trying to hit an external API to pull some customer data before the IVR plays, but the GetRESTProxy method is throwing an INVALID_FUNCTION error.

I’ve checked the docs and it looks like I’m using the right namespace, but maybe the syntax is off? Here’s the snippet:

// Attempt to initialize REST proxy
ASSIGN restProxy = GetRESTProxy();

// Set headers
ASSIGN headers = { "Content-Type": "application/json" };

// Build URL
ASSIGN url = "https://api.example.com/v1/customers/" + GetCustomerID();

// Execute
ASSIGN response = restProxy.Get(url, headers);

The error points specifically to the first line. I’m assuming GetRESTProxy() is the correct function name for CXone Studio, right? Or has it changed in the latest update? I’ve tried adding a namespace prefix like Studio.GetRESTProxy() but that just makes it worse.

Any idea what I’m missing here? The endpoint works fine in Postman, so it’s definitely a Studio syntax issue.

Thanks!