Getting started with gamification
Three integration paths, one decision. Pick the one that matches the surface you are integrating into. Most production stacks end up using two of the three over time. This page covers the decision and ships a working quickstart for all three.
Key takeaways
Quick read- Headless SDK is the default for React. Hooks render points, tier, badges, streaks, challenges, leaderboards, and engagement components.
- REST API is the default for everything else: native mobile, server-to-server, partner platforms, non-React frontends.
- Embed is the fastest path. Drop an iframe, capture the participant id, ship in an afternoon.
- Most teams start with embed for an engagement, move to SDK for owned UI, and reach for the API to wire it server-side.
- All three paths share the same engine. Switching does not lose data.
The decision
Which path is right
| Path | Best for | Effort | UI control |
|---|---|---|---|
| Headless SDK | React apps where you own the UI. Onboarding flows, in-app challenges, member dashboards. | Medium | Full |
| REST API | Native mobile, server-to-server scoring, partner platforms, non-React web. | Medium | Full |
| Iframe / embed | Marketing landing pages, single-campaign drops, microsites, partner placements. | Low | Constrained |
Headless SDK
Quickstart for React
Three steps from zero to a working points display.
npm install @bricqs/headless-react"use client";
import { BricqsProvider } from "@bricqs/headless-react";
export function Providers({ children }: { children: React.ReactNode }) {
return (
<BricqsProvider
tenantId={process.env.NEXT_PUBLIC_BRICQS_TENANT!}
participantToken={getParticipantTokenFromCookie()}
env="production"
>
{children}
</BricqsProvider>
);
}"use client";
import { usePoints } from "@bricqs/headless-react";
export function PointsBadge() {
const { available, lifetime, isLoading } = usePoints();
if (isLoading) return <span>Loading...</span>;
return (
<span className="inline-flex items-center gap-2">
<strong>{available.toLocaleString()}</strong> pts
<small>(lifetime {lifetime.toLocaleString()})</small>
</span>
);
}REST API
Quickstart for any backend
Two steps: send an event, read state.
curl -X POST https://api.bricqs.co/api/v1/ingest/events \
-H "Authorization: Bearer bq_live_..." \
-H "Content-Type: application/json" \
-d '{
"participant_id": "p_8a3f",
"event_type": "purchase_completed",
"attributes": { "amount": 1250, "currency": "INR" },
"idempotency_key": "p_8a3f:order_4271"
}'curl https://api.bricqs.co/api/v1/gamify/state/p_8a3f \
-H "Authorization: Bearer bq_live_..."
# response
{
"participant_id": "p_8a3f",
"points": { "available": 1250, "lifetime": 4820 },
"tier": { "id": "silver", "label": "Silver" },
"streaks": [...],
"active_challenges": [...]
}Iframe and embed
Quickstart for fastest ship
One script tag, one participant token, zero engineering follow-up.
<div id="bricqs-engagement"
data-tenant="your_tenant_id"
data-engagement="spring_quiz_2026"
data-participant="p_8a3f"></div>
<script async src="https://embed.bricqs.co/v1/embed.js"></script>The embed handles UI, event submission, and reward flow. You provide the participant id; everything else is configured in the dashboard.
Where to go next
Pick the next page based on your path
Provider, auth, environments for the React SDK.
useChallenge, objective progress, completion handoff.
Live and test keys, scopes, rotation, rate limits.
POST events with idempotency, batch, retries.
Mental model: tenants, events, facts, programs.
Endpoint-level documentation.
Developer FAQ
Common questions when integrating gamification with Bricqs.
Ready to ship?
Wire it up with the Bricqs SDK or API
Headless SDK for React UIs, REST API for any backend. Same engine behind both.
