> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rolearn.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Multiplatform SDK

> One SDK and one canonical event schema for game telemetry across Roblox, Unity, and Steamworks

The **RoLearn-Multiplatform SDK** lets you ingest your own game's telemetry —
sessions, purchases, performance, crashes, ads, and custom events — into RoLearn,
then read it back as analytics, funnels, segments, and A/B experiments. One
canonical event schema works across every engine.

<Note>
  The SDK has its own dedicated documentation site with full per-engine guides
  and API reference. This page is the product-level overview; deep-dive there:
  **[SDK docs](https://rolearn.dev/sdk-docs)** (or the in-app
  [SDK Learn](https://rolearn.dev/sdk/learn) section).
</Note>

## What it gives you

* **Auto-instrumenting clients** for Roblox (Lua), Unity (C#), and Steamworks /
  Unreal / custom (C++). Sessions, purchases (via MarketplaceService / Unity IAP),
  performance, and crashes are captured with little or no manual code.
* **Dashboards**: DAU/WAU/MAU, playtime, revenue/ARPDAU, geographic breakdown,
  retention matrix, FPS histograms, and crash signatures.
* **Event Explorer, Funnels, Segments** (DSL builder) for ad-hoc analysis.
* **A/B Experiments** with deterministic variant assignment and built-in
  significance testing.
* **Data export** of raw events to your own S3 bucket (Scale+).

## Getting a key

1. Go to [`/sdk/onboarding`](https://rolearn.dev/sdk/onboarding) — link your first
   game (platform + game id), mint an API key (`rk_live_…`), and watch for your
   first event.
2. Or, on Roblox, install the [Studio plugin](/sdk/studio-plugin) and click
   **Activate** — it mints the key and drops the SDK module in for you.

<Warning>
  SDK ingest keys carry the `sdk:ingest` scope. They are **not** the same as the
  read-API keys (`read` scope) used for the [public REST API](/api-reference/overview),
  and they cannot be used interchangeably.
</Warning>

## Sending events

Events POST in batches to `/api/sdk/events` with your key in `X-API-Key`:

```bash theme={null}
curl -X POST https://rolearn.dev/api/sdk/events \
  -H "X-API-Key: rk_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{"events":[{
        "event_id":"<uuid>", "ts":"2026-06-18T10:00:00Z",
        "platform":"roblox", "game_id":"920587237",
        "session_id":"<uuid>", "type":"session_start",
        "payload":{"country":"US","membership":"Premium"}
      }]}'
```

Server-side guarantees:

* **Idempotency** — a duplicate `event_id` within 24h is silently deduped.
* **Schema validation** — each `type` has a required payload; mismatches are rejected (`422`).
* **PII guard** — payloads containing email / phone / SSN / credit-card-shaped keys or values (at any nesting depth) are rejected (`422`).
* **Game scope** — `(platform, game_id)` must be linked to your team.
* **Quota** — monthly event quota is enforced per plan; over-quota returns `429` with `Retry-After`.

See [SDK event types](/sdk/event-types) for the full schema per event.

## Plans

The SDK is metered separately from your analytics product plan — see
[Plans & Pricing → Multiplatform SDK plans](/plans#multiplatform-sdk-plans).
Free starts at 10K events/mo and 1 game; A/B testing and data export unlock at
Scale.

## Supported engines

| Engine                       | Language | Install                                                   | Auto-captured                                                          |
| ---------------------------- | -------- | --------------------------------------------------------- | ---------------------------------------------------------------------- |
| Roblox                       | Lua      | `.rbxmx` drag-drop or [Studio plugin](/sdk/studio-plugin) | sessions, gamepass/dev-product purchases, performance, crashes, errors |
| Unity                        | C#       | UPM git URL                                               | sessions, Unity IAP purchases                                          |
| Steamworks / Unreal / custom | C++      | vcpkg + CMake                                             | sessions (manual hooks for the rest)                                   |

All three clients carry parity for ad impressions, performance, crash/error
tracking, and A/B variant fetch (`getVariant` / `GetVariantAsync` / `get_variant`).
