BricqsBricqs

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.

Reading time6 minutes
Last updatedMay 2026

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

PathBest forEffortUI control
Headless SDKReact apps where you own the UI. Onboarding flows, in-app challenges, member dashboards.MediumFull
REST APINative mobile, server-to-server scoring, partner platforms, non-React web.MediumFull
Iframe / embedMarketing landing pages, single-campaign drops, microsites, partner placements.LowConstrained
Default rule:Default pick: SDK for product surfaces, API for mobile and server work, embed for time-bound campaigns.

Headless SDK

Quickstart for React

Three steps from zero to a working points display.

bash
npm install @bricqs/headless-react
app/providers.tsx·tsx
"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>
  );
}
app/components/PointsBadge.tsx·tsx
"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.

POST one event·bash
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"
  }'
GET participant state·bash
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.

campaign.html·html
<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

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.

1 brief to align the room2 mechanics max in version one
What happens next
01
Pick the mechanic
Choose the smallest working system for the brief.
02
Launch without rebuilds
Configure rules and rewards in one place.