# Orishare Loyalty, incentives, promotions and engagement infrastructure behind one REST API. Integrate once, send events, and versioned rules award points, move tiers, issue rewards, progress challenges and emit webhooks. ## Agent quick start An AI agent can do everything with no browser and no person. 1. Sign up: POST https://api.orishare.com/v1/agent/signup_challenges, solve the proof of work (sha256(challenge + ":" + nonce) with difficulty leading zero bits, about a second), then POST https://api.orishare.com/v1/agent/signups with an Idempotency-Key; you get one test and one production environment (runtime_class sandbox and production; names are free-form and more can be added), secret and publishable keys, an agent token and a claim link to give your person. 2. Connect MCP at https://api.orishare.com/mcp with Authorization: Bearer and X-Orishare-Environment: , or Bearer alone (with no credential it offers only the signup tools). 3. Pick a recipe. In a test environment every change set you propose (status pending) commits when you apply it with POST /v1/change_set_applications { change_set_id, plan_digest }; a production environment follows its autonomy policy (an agent-created project starts in limits). Every page is markdown at its URL plus .md (https://docs.orishare.com/docs/agent-start.md); all pages in one file: https://docs.orishare.com/llms-full.txt - Start here for AI agents (signup, secrets, claim link, test and production environments): https://docs.orishare.com/docs/agent-start - Connect MCP (hosted and stdio, signup tools, read, propose and apply, the agent gate): https://docs.orishare.com/docs/mcp - Connect your AI (a person connects Claude, ChatGPT, Cursor, VS Code or Codex: one-click OAuth sign-in at https://api.orishare.com/mcp/connect, or an AI access key opat_ on https://api.orishare.com/mcp; OAuth details for AI app developers): https://docs.orishare.com/docs/connect-your-ai - Autonomy (auto, limits, confirm; propose then apply; refusals; undo): https://docs.orishare.com/docs/autonomy - Recipes (integrations by stack): https://docs.orishare.com/docs/recipes - Signup endpoints: POST https://api.orishare.com/v1/agent/signup_challenges, then POST https://api.orishare.com/v1/agent/signups - MCP server (streamable HTTP): https://api.orishare.com/mcp; OAuth sign-in connector: https://api.orishare.com/mcp/connect (metadata https://api.orishare.com/.well-known/oauth-authorization-server) - OpenAPI 3.1: https://docs.orishare.com/openapi.json - Capability manifest: https://docs.orishare.com/capabilities.json - All pages as markdown, one file: https://docs.orishare.com/llms-full.txt ## Start here - Quickstart (CLI): https://docs.orishare.com/docs/quickstart - Agent integration guide (REST, credential matrix): https://docs.orishare.com/docs/agent-guide - Capability manifest (orishare.capabilities/v1: rest_operations with credential kinds, scopes and tool or null, rule_actions, tools; call only what it lists): https://docs.orishare.com/capabilities.json - OpenAPI 3.1 (the only source of routes): https://docs.orishare.com/openapi.json (also served at https://api.orishare.com/v1/openapi.json) - Integration prompts: https://docs.orishare.com/docs/prompts/firebase-web, https://docs.orishare.com/docs/prompts/supabase-web, https://docs.orishare.com/docs/prompts/node-backend, https://docs.orishare.com/docs/prompts/python-backend - Hosted widget (one script tag; backend or identity session path; parent API, events, theming, troubleshooting): https://docs.orishare.com/docs/hosted-widget - Author a mechanic through a change set (a complete, working streak: program, rule, confirmation): https://docs.orishare.com/docs/concepts/authoring - Game economy (items, shop, energy, boosts, chests with odds, battle passes, and a complete recipe): https://docs.orishare.com/docs/concepts/economy - Error codes (status, type, retry class and meaning): https://docs.orishare.com/errors - Page index (JSON): https://docs.orishare.com/index.json - Dashboard (where a person confirms change sets; review link /change-sets/{id}): https://app.orishare.com for the hosted service; for a local or self-run deployment, the operator's own dashboard URL - Analytics (retention cohorts and active customers in UTC days, maturity, 95% intervals, the hourly and on-demand build): https://docs.orishare.com/docs/concepts/analytics - Experiments (holdouts and A/B tests between programs, rules and campaigns; the exp:: segment; GET /v1/customer/experiments; reading results; ending with a winner): https://docs.orishare.com/docs/concepts/experiments Paths: the API origin is https://api.orishare.com (no /v1) and every route is under /v1. The pages keep that origin, without /v1, in one constant named API (const API = 'https://api.orishare.com') and write full /v1 paths after it (API + '/v1/events'); the OpenAPI server URL is https://api.orishare.com/v1 and its paths (and those in capabilities.json) omit /v1. The API reference pages under /docs/api are generated from openapi.json. ## Pages Each page is also markdown at its URL plus .md. - [Agent integration guide](https://docs.orishare.com/docs/agent-guide): REST-first plan for a coding agent: credentials and where they live, the anonymous, Firebase, Supabase and server paths, retry-safe fetch examples, async ingestion and customer reads. - [Start here for AI agents](https://docs.orishare.com/docs/agent-start): Three steps for an AI agent adding rewards to an app: sign up with no browser, connect MCP, pick a recipe. Exact HTTP calls, the proof of work, what to store and what to hand your person. - [Autonomy](https://docs.orishare.com/docs/autonomy): How each environment applies change sets: auto, limits or confirm. What limits refuses (reward cost caps and nothing destructive), advisories, how an agent proposes and applies, how refusals and undo work, and who changes the policy. - [Connect your AI](https://docs.orishare.com/docs/connect-your-ai): Connect Claude, ChatGPT, Cursor, VS Code, Codex or any MCP client to Orishare: one-click sign-in with the connector URL https://api.orishare.com/mcp/connect, or an AI access key (opat_) on https://api.orishare.com/mcp. Setup per client, what the AI may do, and the OAuth details for AI app developers. - [Customer sessions and browser integration](https://docs.orishare.com/docs/customer-integration): Connect a verified customer identity to the customer API, use safe receipts and polling, and migrate a trusted backend. - [Environments and limits](https://docs.orishare.com/docs/environments-and-limits): Test and production environments, test players and reset, the free allowance and its grace. - [Hosted widget](https://docs.orishare.com/docs/hosted-widget): Embed the hosted rewards widget in your product with one script tag, hand it a customer session from your backend or your identity provider, and theme, localise and troubleshoot it. - [Orishare](https://docs.orishare.com/docs): Loyalty, incentives, promotions and engagement infrastructure behind one REST API. - [Connect MCP](https://docs.orishare.com/docs/mcp): Hosted MCP at https://api.orishare.com/mcp (OAuth sign-in at https://api.orishare.com/mcp/connect) for Claude Code, ChatGPT, Cursor, Codex and any client: a small core that reaches every operation (search, describe, then read, write or delete), toolsets, acting as a customer, the production gate and pending approvals; signup tools with no credential. - [Pricing and billing](https://docs.orishare.com/docs/pricing): Launch pricing: 10,000 actions free per organization each month, then $0.25 per 1,000. What counts as an action, how small charges accrue until $5, and how billing works in the dashboard. - [Quickstart](https://docs.orishare.com/docs/quickstart): From signup to the first evaluated event with the CLI only, in a few minutes. - [Reference scenario](https://docs.orishare.com/docs/reference-scenario): The audiobook purchase, progress and completion rules, every edge case and its expected result. - [API reference](https://docs.orishare.com/docs/api): The REST API at https://api.orishare.com/v1: conventions, credentials, errors, and one generated page per resource. - [AI drafting](https://docs.orishare.com/docs/concepts/ai-drafting): Describe a campaign in plain language; get validated rule documents to review, simulate and publish. - [Analytics](https://docs.orishare.com/docs/concepts/analytics): Retention cohorts and active customers: what the numbers mean, when they are built and their limits. - [Author a mechanic through a change set](https://docs.orishare.com/docs/concepts/authoring): A complete, working daily streak: the change set that creates and publishes the program, the rule that feeds it, who confirms what, and when a customer first sees it. - [Configuration as code](https://docs.orishare.com/docs/concepts/config): Export an environment as one JSON document and apply it to another, atomically: the v2 format, revisions, preview, merge semantics and the diff. - [Game economy](https://docs.orishare.com/docs/concepts/economy): Items, a shop, inventory, energy and lives, timed boosts, chests with published odds and battle passes: the configuration commands, the player and backend routes, the events, the limits, and one complete recipe. - [Events and identity](https://docs.orishare.com/docs/concepts/events): Ingestion modes, idempotency, the client-event trust contract and customer identity. - [Experiments](https://docs.orishare.com/docs/concepts/experiments): Holdouts and A/B tests between programs, rules and campaigns: assignment, targets, results, and how to end one. - [Friends and teams](https://docs.orishare.com/docs/concepts/friends-and-teams): Friend codes, requests, blocks, nudges and high-fives, friend standings, friend quests, friend streaks, teams and team quests, with the privacy rules and what anonymous sessions can do. - [Leagues](https://docs.orishare.com/docs/concepts/leagues): Weekly or daily leagues: tiers, cohorts, promotion and demotion, rank rewards in currency or items, standings, settlement and the league events. - [Match results](https://docs.orishare.com/docs/concepts/match-results): Report finished matches from an authoritative game server: plausibility bounds, per-player rate windows, held results and review, and the trusted match.completed event rules turn into XP, scores and items. - [Mechanics](https://docs.orishare.com/docs/concepts/mechanics): Streaks, badges, quests, levels, leaderboards, referrals, catalogue and seasons: what each does, its operator commands and its reads. - [Notifications](https://docs.orishare.com/docs/concepts/notifications): From event to message: message types, templates and locales, consent, quiet hours and caps, built-in sending, webhooks and connectors (Klaviyo, Braze, OneSignal, FCM), the delivery log and unsubscribe links. - [Playbooks](https://docs.orishare.com/docs/concepts/playbooks): Ready-made, parameterized setups: install, upgrade and uninstall through reviewed change sets, and what customers keep. - [Programs](https://docs.orishare.com/docs/concepts/programs): Currencies and the ledger, tiers, rewards, challenges, segments and historical counters. - [Rule examples 04 and 05](https://docs.orishare.com/docs/concepts/rule-examples): Purchase-gated completion and refund reversal in the canonical v2 rule shape, with the trust floor and reversal semantics stated. - [Rules](https://docs.orishare.com/docs/concepts/rules): The orishare.rule/v1 document: triggers, conditions, limits, actions, versions. - [Program trust policy](https://docs.orishare.com/docs/concepts/trust-policy): Where trust is set: event admission, the program trust policy with allowed_sources and minimum_trust, the rule trust floor and environment liability caps. - [Webhooks](https://docs.orishare.com/docs/concepts/webhooks): Signed deliveries, retries, replay and the event catalog. - [Birthdays and anniversaries](https://docs.orishare.com/docs/guides/birthdays-and-anniversaries): Collect a birthday, an anniversary or any yearly date for a customer and reward it once a year, at a local time in the customer's time zone. - [Klaviyo connector](https://docs.orishare.com/docs/guides/connectors-klaviyo): Keep every customer's Klaviyo profile current with points, VIP tier, birthday, referral code and store credit, and send loyalty activity to Klaviyo as metrics for flows. - [Shopify and Stripe connectors](https://docs.orishare.com/docs/guides/connectors-shopify-stripe): Turn verified Shopify orders and Stripe billing events into trusted loyalty events, and let customers spend store credit at Shopify checkout. - [Dynamic segments](https://docs.orishare.com/docs/guides/dynamic-segments): Segments defined by conditions over attributes, balances, tiers, account age and event activity, recomputed on a schedule and usable as any audience. - [Import from another loyalty program](https://docs.orishare.com/docs/guides/import-from-another-loyalty-program): Move customers, point balances, lifetime totals, VIP tiers and birthdays from Smile, LoyaltyLion, Yotpo or any CSV file, check the result before anything is written, and reconcile it against the ledger afterwards. - [Partner rewards and gift cards](https://docs.orishare.com/docs/guides/partner-rewards): Supply catalogue rewards through a gift-card supplier or a brand partner, share the cost with the partner, and settle per period. - [Points transfer](https://docs.orishare.com/docs/guides/points-transfer): Let customers gift points to each other, or move points between customers from your backend, with per currency limits. - [ROI and revenue](https://docs.orishare.com/docs/guides/roi-and-revenue): See what members spend compared with everyone else, what rewards cost, what you owe in points and store credit, and the return of the program. - [Store credit at checkout](https://docs.orishare.com/docs/guides/store-credit): Give customers a money valued wallet and apply it to orders with quote, apply, capture, void and refund. - [VIP tiers with yearly windows and benefits](https://docs.orishare.com/docs/guides/vip-tiers): Qualify members per calendar or membership year, keep a tier through the following year, add a grace period, declare benefits and gate offers by tier. - [Prompt: Firebase web app](https://docs.orishare.com/docs/prompts/firebase-web): A prompt to paste into a coding agent that integrates a Firebase-authenticated web app with Orishare customer sessions. - [Prompt: Node backend](https://docs.orishare.com/docs/prompts/node-backend): A prompt to paste into a coding agent that sends trusted events and reads customer state from a Node.js backend with a secret key. - [Prompt: Python backend](https://docs.orishare.com/docs/prompts/python-backend): A prompt to paste into a coding agent that sends trusted events and reads customer state from a Python backend with a secret key. - [Prompt: Supabase web app](https://docs.orishare.com/docs/prompts/supabase-web): A prompt to paste into a coding agent that integrates a Supabase-authenticated web app with Orishare customer sessions. - [Duolingo-style social app (frontend only)](https://docs.orishare.com/docs/recipes/duolingo-style-social-app): XP, levels, a weekly league, friends with nudges, friend streaks, friend quests, teams and push, for a Firebase, Supabase or React Native app with no server: publishable key, customer session and rules. - [Firebase app](https://docs.orishare.com/docs/recipes/firebase): One prompt: XP, levels, coins, streaks, badges, quests, leaderboards, leagues and referrals in a Firebase app, through Cloud Functions that hold the secret key. - [Friend streak with milestones](https://docs.orishare.com/docs/recipes/friend-streak-milestones): A daily streak two friends keep together, fed by a rule from app events, with milestone rewards and an at-risk reminder. - [Game economy](https://docs.orishare.com/docs/recipes/game-economy): Add a skin shop, consumables, energy, timed boosts, chests, a battle pass and server-validated match results on top of the game starter. - [Game setup](https://docs.orishare.com/docs/recipes/game-setup): The configuration every recipe applies: XP and 100 levels, coins, a daily streak with repair, badges with rarity, a starter quest, a weekly XP leaderboard, a weekly league, referrals, notifications and friends. Exact calls, caps, player screens and tests. - [Godot](https://docs.orishare.com/docs/recipes/godot): One prompt: XP, levels, coins, streaks, badges, quests, leaderboards, leagues and referrals in a Godot 4 game, with HTTPRequest and a customer session. - [Recipes](https://docs.orishare.com/docs/recipes): One-prompt integrations by stack for an AI agent: web games, Unity, Godot, React Native and Expo, Roblox, Firebase and Supabase. - [Push through your own OneSignal](https://docs.orishare.com/docs/recipes/push-through-onesignal): Send Orishare engagement messages (streak at risk, league promotion, friend nudges) as push notifications through your own OneSignal app. - [React Native and Expo](https://docs.orishare.com/docs/recipes/react-native): One prompt: XP, levels, coins, streaks, badges, quests, leaderboards, leagues, referrals and push in a React Native or Expo app. - [Roblox](https://docs.orishare.com/docs/recipes/roblox): One prompt: XP, levels, coins, streaks, badges, quests, leaderboards, leagues and referrals in a Roblox experience, from server scripts with HttpService. - [Supabase app](https://docs.orishare.com/docs/recipes/supabase): One prompt: XP, levels, coins, streaks, badges, quests, leaderboards, leagues and referrals in a Supabase app, through an Edge Function that holds the secret key. - [Unity](https://docs.orishare.com/docs/recipes/unity): One prompt: XP, levels, coins, streaks, badges, quests, leaderboards, leagues and referrals in a Unity game, with UnityWebRequest and a customer session. - [Web game](https://docs.orishare.com/docs/recipes/web-game): One prompt: XP, levels, coins, streaks, badges, quests, leaderboards, leagues and referrals in a browser game with a game server. What runs where, the code, and how to test it. - [Weekly league with item rewards](https://docs.orishare.com/docs/recipes/weekly-league-item-rewards): A three-tier weekly league scored by your backend, paying gems and items for top ranks and promotion, with promotion messages. - [Client configurations](https://docs.orishare.com/docs/api/client-configurations): Exact browser origins and bounded client admission settings. - [Portal configurations](https://docs.orishare.com/docs/api/portal-configurations): Versioned hosted widget configurations and their public render read. - [Assets](https://docs.orishare.com/docs/api/assets): Bounded immutable program art and public normalized images. - [Notifications](https://docs.orishare.com/docs/api/notifications): Message types, templates, quiet hours, caps, recipient consent and the delivery log; signed unsubscribe links. - [Leagues](https://docs.orishare.com/docs/api/leagues): Weekly cohorts on a tier ladder with promotion, demotion and rank rewards. - [Social](https://docs.orishare.com/docs/api/social): Display names and visibility customers show to other players. - [Teams](https://docs.orishare.com/docs/api/teams): Teams of players, their members, team quests and team boards. - [Friend quests](https://docs.orishare.com/docs/api/friend-quests): Shared goals for two friends and friend streaks, with paired rewards. - [Customer surface](https://docs.orishare.com/docs/api/customer-surface): Private customer projections and session-authorized commands. - [Customer merges](https://docs.orishare.com/docs/api/customer-merges): Permanent anonymous-to-known customer ownership links. - [Customer identity](https://docs.orishare.com/docs/api/customer-identity): Customer identity connections, bindings and authentication state. - [Customer sessions](https://docs.orishare.com/docs/api/customer-sessions): Customer proof exchange, session issuance, renewal and revocation. - [Account](https://docs.orishare.com/docs/api/account): Signup, tokens, invitations, memberships and ownership for people and agents. - [Management](https://docs.orishare.com/docs/api/management): Organizations, projects, environments, API keys and usage. - [Change_sets](https://docs.orishare.com/docs/api/change_sets): Configuration proposals: applied under the environment autonomy policy, or confirmed by a person in the dashboard; logged and undoable. - [Pending actions](https://docs.orishare.com/docs/api/pending-actions): One exact request an AI asked a person to approve after the production gate held it: approved or declined in the dashboard, run once, answer stored. - [Autonomy](https://docs.orishare.com/docs/api/autonomy): Per-environment autonomy policy: whether agent change sets apply on their own, within limits, or only after a person confirms. - [Agent_onboarding](https://docs.orishare.com/docs/api/agent_onboarding): Agent signup (a working project in one call, no browser) and the claim link a person uses to take ownership. - [Bulk_operations](https://docs.orishare.com/docs/api/bulk_operations): Frozen per-customer operations proposed as a change set, run item by item, retried and undone. - [Playbooks](https://docs.orishare.com/docs/api/playbooks): First-party playbook manifests, install/upgrade/uninstall previews as change sets, and installations with ownership drift. - [Assistant](https://docs.orishare.com/docs/api/assistant): The conversational admin assistant: conversations, turns admitted with 202 and polled, recorded tool calls. It reads and proposes; a person confirms every change in the dashboard. - [Events](https://docs.orishare.com/docs/api/events): Ingestion (202 async, 200 sync), event definitions, retries. - [Customers](https://docs.orishare.com/docs/api/customers): Customers, aliases, attributes and the aggregated state view. - [Ledger](https://docs.orishare.com/docs/api/ledger): Currencies, manual adjustments, entries and balances. - [Rules](https://docs.orishare.com/docs/api/rules): Rules, immutable versions, publish, pause, simulate. - [Campaigns](https://docs.orishare.com/docs/api/campaigns): Schedules, priorities, stacking groups, budgets, audiences. - [Programs](https://docs.orishare.com/docs/api/programs): Versioned program definitions, publication and activation. - [Streaks](https://docs.orishare.com/docs/api/streaks): Pinned streak programs, periods and freeze inventory. - [Badges](https://docs.orishare.com/docs/api/badges): Pinned achievements, ranks and recognition history. - [Quests](https://docs.orishare.com/docs/api/quests): Pinned graph quests, runs, progress and claims. - [Levels](https://docs.orishare.com/docs/api/levels): Native XP qualification, levels and prestige. - [Leaderboards](https://docs.orishare.com/docs/api/leaderboards): Leaderboard contributions, standings and prize settlement. - [Referrals](https://docs.orishare.com/docs/api/referrals): Referral share codes, settlement reviews and corrections. - [Reward commerce](https://docs.orishare.com/docs/api/reward-commerce): Reward catalogues, quotes, inventory and fulfillment. - [Seasons](https://docs.orishare.com/docs/api/seasons): Immutable season versions and settlement periods. - [Tiers](https://docs.orishare.com/docs/api/tiers): Tier programs, levels and per-customer tiers. - [Rewards](https://docs.orishare.com/docs/api/rewards): Rewards, issuances, redemption and cancellation. - [Challenges](https://docs.orishare.com/docs/api/challenges): Challenges, enrollment and progress. - [Segments](https://docs.orishare.com/docs/api/segments): Static membership and dynamic segments computed from attributes, balances, tiers and activity. - [Counters](https://docs.orishare.com/docs/api/counters): Historical counter definitions and backfills. - [Webhooks](https://docs.orishare.com/docs/api/webhooks): Endpoints, signed deliveries, replay. - [Audit](https://docs.orishare.com/docs/api/audit): Audit trail. - [Context](https://docs.orishare.com/docs/api/context): Project context for AI drafting and the UI. - [Config](https://docs.orishare.com/docs/api/config): Whole-environment export and atomic apply. - [Ai](https://docs.orishare.com/docs/api/ai): AI drafting: plain-English requests become validated rule documents for review; never published by the model. - [Support](https://docs.orishare.com/docs/api/support): Audited staff access. - [Pricing](https://docs.orishare.com/docs/api/pricing): Public offer and estimates, organization pricing, usage, statements and spend settings, and staff pricing authoring and proposals. - [Store credit](https://docs.orishare.com/docs/api/store-credit): Money-valued wallets, applying credit to orders (hold, capture, void, refund) and reconciliation. - [Connectors](https://docs.orishare.com/docs/api/connectors): Shopify, Stripe and Klaviyo installations, verified inbound webhooks, discount-code redemptions and profile sync. - [Imports](https://docs.orishare.com/docs/api/imports): Customer and balance imports from another loyalty program: chunked upload, dry run, run and reconciliation. - [Partner rewards](https://docs.orishare.com/docs/api/partner-rewards): Gift-card suppliers and brand partners: catalogue items, offer links, orders, reconciliation and settlement. - [Economy](https://docs.orishare.com/docs/api/economy): Items, shop offers and player inventories: grants, purchases, consumption, equipping and refunds. - [Experiments](https://docs.orishare.com/docs/api/experiments): Holdouts and A/B tests: weighted variants, targeted rules, campaigns and programs, and results with intervals and lift. - [Analytics](https://docs.orishare.com/docs/api/analytics): Retention cohorts, daily activity and the analytics build.