# Introduction

> Onari adds challenges, streaks, leaderboards, referrals and trivia to your app, and tells you when to pay out rewards.

Source: https://docs.onari.xyz/docs

Onari is gamification infrastructure for apps in Africa. Your server sends Onari the things your customers do (an order, a transfer, a top-up). Your team builds campaigns around them in the Onari dashboard. Onari tracks every player's progress, decides who wins, keeps to your budget, and tells your server to pay out.

## How it fits together

1. **Your server sends events.** `POST /v1/events` with a player ID you choose and an event like `order.placed`. See [Events](/docs/concepts/events).
2. **Your team runs campaigns.** Challenges, streaks, leaderboards, referrals and trivia, each with a reward, a budget and an audience. See [Campaigns](/docs/concepts/campaigns).
3. **Onari picks the winners.** Exactly once per win, never past your budget, even when events arrive at the same time.
4. **You pay out.** Onari sends a signed `reward.issued` webhook to your server. Voucher codes are handed out by Onari itself. See [Webhooks](/docs/webhooks).
5. **Players see it all in the Rewards Hub,** a white-label page you open inside your app. See [Rewards Hub](/docs/rewards-hub).

## Where to start

<Cards>
  <Card title="Quickstart" href="/docs/quickstart" description="Send your first event and see a sandbox reward in about 10 minutes." />
  <Card title="Webhooks" href="/docs/webhooks" description="Pay players when they win, safely and exactly once." />
  <Card title="Rewards Hub" href="/docs/rewards-hub" description="Open your players' rewards page in a WebView." />
  <Card title="Build with an AI agent" href="/docs/build-with-ai" description="Point Cursor, Claude or ChatGPT at these docs." />
</Cards>

## The basics

- **Base URL:** `https://api.onari.xyz`
- **Auth:** your secret key in `Authorization: Bearer sk_test_…` (sandbox) or `sk_live_…` (live). Only call Onari from your server.
- **Amounts** are integers in minor units: `250000` is ₦2,500.00.
- **Player IDs** are yours. Never send names, phone numbers, emails or BVN.
