Skip to main content

Why use JSON for mobile?

Mobile apps render content with native UI components — there’s no HTML injection, no iframes, no webviews needed. The JSON API approach is the natural fit:

Native rendering

Receive structured data and render it with SwiftUI, Jetpack Compose, Flutter widgets, or React Native components.

Lightweight

A single HTTP call returns exactly the fields your app needs — no SDK to install, no JavaScript runtime overhead.

Offline-friendly

Cache JSON responses locally for offline display. Refresh when connectivity returns.

Cross-platform

Same endpoint works for iOS, Android, Flutter, React Native, KMP — any client that can make HTTP requests.

Runner endpoint

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:

HTTP status codes

Code examples

Swift (iOS)

Kotlin (Android)

Flutter (Dart)

React Native

Identity management

Pass a stable user identifier in the rlvt-u query parameter: The same identity system powers all Reelevant channels (web, email, push), so personalisation is consistent across touchpoints.

Best practices

Store the last successful JSON response locally (e.g., UserDefaults, SharedPreferences, or a local database). Display cached data when offline and refresh when connectivity returns.
A 204 response means no personalised content is available. Display a sensible default or hide the personalisation zone entirely.
Initiate the API call as early as possible (e.g., on app launch or screen appear) so data is ready by the time the user scrolls to the personalised zone.
Define a struct/class matching your JSON Template schema. This catches schema mismatches at compile time and makes refactoring safe.

JSON Template configuration

JSON Templates are configured in the Reelevant platform. See the Websites > API (JSON) > Technical Integration page for full details on:
  • Template schema definition
  • Variable types (scalar vs array)
  • Template management API
  • Publish-time validation