Skip to main content

Runner endpoint

Every published workflow exposes a runner URL. When the output node is a JSON Template, the runner returns application/json instead of HTML or an image.
The response is a JSON object whose shape matches the template schema defined in the platform.

Response format

The response body is the resolved template data directly — no wrapper envelope. Static fields are returned as-is and dependency fields are replaced with real values from datasources:

Content-Type header

The runner returns Content-Type: application/json; charset=utf-8 for JSON Template output nodes.

HTTP status codes

Code examples

JavaScript (fetch)

React

Python

cURL

JSON Templates

What is a JSON Template?

A JSON Template is a reusable schema definition created in the Reelevant platform. It describes:
  • Definition — the JSON structure where each field is either { "type": "static", "value": ... } (fixed) or { "type": "dependency", "variable": "..." } (resolved at runtime)
  • Variables — named slots that map to datasource values, matching the variable names in the definition
Each variable declares a type that tells the Runner how to resolve its dependency: The UI exposes fixed positions as Datasource item #1 … #20; item #N maps to index: N - 1.

Template management API

JSON Templates are managed via the /workflows/json-templates REST API:

Publish-time validation

When you publish a workflow that uses JSON Template output nodes, the platform validates:
  1. All JSON Template nodes in the workflow reference the same template ID — ensuring a consistent response shape across branches.
  2. The referenced template exists and belongs to your company.
If validation fails, the publish is rejected with a descriptive error.

Combining with other integration methods

The JSON API approach works alongside the Client-Side Script and Server-Side SDK:
  • Use the Server-Side SDK to call the runner from your backend and pass JSON data to your frontend via props or server state.
  • Use the Client-Side Script for event tracking (impressions, clicks) alongside your JSON-powered UI.
  • Call the runner directly from the browser with fetch() if your use case is purely client-side.

Identity and personalisation

The rlvt-u query parameter drives personalisation. The value you pass determines which user profile the engine uses to select branches and resolve datasource queries. For best results:
  • Pass a stable user identifier (email, internal ID) when the user is logged in.
  • Pass the rlvt_tmpId cookie value for anonymous visitors — this preserves continuity with client-side tracking.
  • The same identity system powers all Reelevant channels (email, web, push), so personalisation is consistent across touchpoints.