CXone Studio: Invoking shared Common Module flow via GetRESTProxy fails with 400

Trying to call a shared Common Module flow from multiple inbound call flows using the Studio Snippet editor. The Common Module is published and has a defined input parameter callerId. Using GetRESTProxy to hit the /api/v2/cxone/flows/{flowId}/sessions endpoint, but getting a 400 Bad Request. The error message says “Invalid session request: missing required parameter ‘callerId’” even though I’m passing it in the JSON body.

Here’s the snippet code:

var proxy = GetRESTProxy();
var body = {
 "input": {
 "callerId": "%CallerID%"
 }
};
var response = proxy.Post("/api/v2/cxone/flows/12345678-1234-1234-1234-123456789012/sessions", body, {});

Checked the Common Module definition in the API docs and the input schema matches. Tried different casing for callerId. Also tried passing the value as a string literal instead of the variable.

  • CXone Studio version: 2023.10
  • Common Module flow ID: 12345678-1234-1234-1234-123456789012
  • Input parameter name: callerId
  • Tried: proxy.Post with and without headers
  • Tried: Hardcoded string value for callerId

Any idea what’s wrong with the request format?

Are you actually using the CXone REST Proxy or just mixing up Genesys Cloud API paths in Studio? The endpoint /api/v2/cxone/flows/... doesn’t exist in Genesys Cloud. That looks like a CXone path. If you’re in Genesys Cloud, you can’t invoke flows via REST like that anyway. Architect flows are triggered by events, not HTTP POSTs to a session endpoint.

Cause:
You’re trying to treat a flow like a web service. Genesys Cloud doesn’t expose a /sessions endpoint for flows. The callerId error is likely a red herring from a malformed request to a non-existent resource.

Solution:
If you need shared logic, use a Subflow or a Common Module in Architect. Don’t use REST. If you absolutely must trigger something external, use an HTTP Request block in Architect, not the other way around.

Here’s how you’d actually pass data if you were calling an external API from Architect:

{
 "callerId": "{{contact.phoneNumber}}"
}

But again, you can’t call Architect flows via API. You’re fighting the platform architecture here.

The suggestion above is spot on. You’re mixing up two completely different ecosystems here. CXone and Genesys Cloud are not the same platform, even though the branding can be confusing sometimes. The /api/v2/cxone/... path definitely doesn’t exist in Genesys Cloud. Architect flows aren’t RESTful services you can just POST to. They are event-driven.

If you’re actually in Genesys Cloud and trying to jump to another flow, you don’t use a REST proxy. You use the Transfer or Call Subflow block. That’s the standard way to move logic around.

If you are somehow trying to trigger an external system that looks like a flow, you’d use the Make REST Call block in Studio, but you’d need a valid URL and OAuth token. You can’t just guess an API path.

Here’s how you’d actually call another flow in Genesys Cloud Studio:

  1. Drop a Transfer block.
  2. Select the target flow from the dropdown.
  3. Map your callerId variable to the input parameter in the target flow.

No JSON bodies. No 400 errors. Just simple variable mapping.

If you’re stuck on CXone because that’s what your org actually uses, then you’re in the wrong forum. This is the Genesys Cloud developer community. CXone has its own separate docs and forums. The APIs are different. The Studio logic is different. Don’t waste time trying to make Genesys Cloud endpoints work for CXone logic. It won’t work.

Check your platform first. If you’re in Genesys Cloud, drop the REST approach. Use the native flow blocks. It’s cleaner and less prone to auth errors.