Hatched documentation
Drop a buddy into your product in under 10 minutes. Server-only SDK, scoped browser tokens, auto-retries, idempotency built in.
Hatched is the motivation layer for B2B products. Events go in, buddies grow. The Octalysis Planner scores eight motivational drives live; the Mission Anchor, Hatch Ceremony, and LEAGUES seasons are the surfaces your workspace runs on. These docs are organised by task — pick the one that matches your mode.
Thirty-second taste
import { HatchedClient } from '@hatched/sdk-js';
const hatched = new HatchedClient({
apiKey: process.env.HATCHED_API_KEY!,
});
// 1. create a buddy (Greenwave Learning Co. — a new instructional designer)
const egg = await hatched.eggs.create({ userId: 'user_designer_priya' });
await hatched.eggs.updateStatus(egg.eggId, 'ready');
const op = await hatched.eggs.hatch(egg.eggId);
const finished = await hatched.operations.wait(op.operationId);
// 2. teach the buddy about your product
await hatched.events.send({
eventId: 'lesson_module_review_user_designer_priya_2026_05_03',
userId: 'user_designer_priya',
type: 'lesson_completed',
properties: { score: 94 },
});
// 3. mint a browser token and embed the widget
const session = await hatched.widgetSessions.create({
buddyId: finished.result.buddyId,
userId: 'user_designer_priya',
scopes: ['read', 'events:track'],
ttlSeconds: 900,
});Full walkthrough: Getting started.
Pick your track
- Concepts — buddies, skills, coins, streaks, badges, paths, marketplace, evolution, rule engine, auth model.
- Guides — getting started, SDK quickstart, web + React Native widgets, events, webhooks, Next.js / Express / edge runtimes, troubleshooting.
- Reference — HTTP endpoints, the JavaScript and React Native SDK surfaces, widget props, webhook payloads, error codes, rate limits, changelog.
- Billing — plans, credits, Stripe billing portal, 402 handling, and credit top-ups.
Building with an AI assistant?
These docs are machine-readable. Drop our AGENTS.md
into your repo, point your assistant at /llms-full.txt, and
grab any page as Markdown with the buttons under its title — full walkthrough in
Use Hatched with AI coding assistants.
Popular pages
- Getting started (10 min)
- Widget integration
- React Native integration
- Handle webhooks
- Auth model — secret vs publishable keys
- Use Hatched with AI coding assistants
- Error codes
- Troubleshooting
What's new
Always see the latest SDK release notes at Changelog — mirrored from the package itself, produced on every merge.