Skip to content
Developers

An API your engineers will actually enjoy

Everything in the console is a documented endpoint. Emit an event, get a server-resolved decision back, and render the moment anywhere with loqal.js.

Send an event
curl -X POST https://api.loqal.ai/v1/events \
  -H "Authorization: Bearer $OMNI_KEY" \
  -H "Idempotency-Key: evt_29f1" \
  -d '{
    "type": "order_confirmed",
    "tenant": "acme",
    "customer": "cus_8f28",
    "value": 82.40,
    "currency": "USD"
  }'
Render a reward
<script src="https://cdn.loqal.ai/loqal.js" async></script>
<script>
  loqal.init({ tenant: "acme", key: "pk_live_..." });

  // Fire a server-controlled reward widget on a real event
  loqal.on("order_confirmed", (order) => {
    loqal.reward({ widget: "spin_wheel_holiday", order });
  });
</script>
Built for builders

The primitives you expect

REST, not surprises

Predictable resources, cursor pagination, idempotency keys and clear error envelopes.

Webhooks & events

Subscribe to platform events with signed payloads and automatic retries.

loqal.js SDK

One script renders offer cards and reward widgets on any site, framework-agnostic.

Server-resolved logic

Eligibility, odds and attribution decided server-side — the client can't be tampered with.

Multi-tenant scoping

Scope every key to a tenant and set of modules. Least-privilege by default.

Idempotent writes

Retry safely. Duplicate requests collapse to a single effect.

Build your first reward moment today

Grab a key, send an event, and render a widget in minutes. Free developer tier.