# Boomin Full Agent Context Boomin lets customers build creator-program and marketing-distribution infrastructure without rebuilding email OTP, Instagram OAuth, creator approval queues, referral attribution, analytics plumbing, and scoped automation tokens. ## Package ```bash npm install boominjs npx boominjs init ``` `npx boominjs init` opens a browser login/signup flow, lets the developer select or create a Boomin organization and creator program, ensures a Creator Connect config exists, appends localhost origins, and writes `.env.local`: ```env VITE_BOOMIN_PUBLIC_KEY=pk_live_... VITE_BOOMIN_PROGRAM_ID=... VITE_BOOMIN_API_BASE=https://api.boomin.ai/v1/connect ``` ## Browser SDK ```js import Boomin from "boominjs"; Boomin.init({ publicKey: import.meta.env.VITE_BOOMIN_PUBLIC_KEY, programId: import.meta.env.VITE_BOOMIN_PROGRAM_ID, apiBase: import.meta.env.VITE_BOOMIN_API_BASE, redirectUri: window.location.origin + window.location.pathname, }); await Boomin.requestOtp({ email: "creator@example.com", name: "Creator" }); await Boomin.verifyOtp({ email: "creator@example.com", code: "123456" }); await Boomin.connectInstagram({ requireCreator: true }); ``` After redirect: ```js const result = Boomin.consumeRedirectResult(); if (result?.sessionId) { const status = await Boomin.getConnectStatus(result.sessionId); } ``` ## Public vs private credentials Public Creator Connect key: - Prefix: `pk_live_...` - Browser-safe. - Starts OTP and Instagram Creator Connect flows. - Restricted by allowed origins and redirect origins. Private platform token: - Prefix: `sk_boomin_live_...` - Server/agent only. - Scoped. - Revocable. - Has request audit logs. - Create endpoints are limited to 150 creates/hour per org + token + resource family. ## Platform token commands ```bash npx boominjs scopes npx boominjs scopes --json npx boominjs scopes explain units:create npx boominjs token create --name "Unit Agent" --scopes org:read,units:read,units:create,units:delete npx boominjs token list --json npx boominjs token revoke npx boominjs token rotate npx boominjs platform smoke --read-only --token sk_boomin_live_... npx boominjs platform smoke --write --cleanup --token sk_boomin_live_... npx boominjs platform smoke --all-scopes --cleanup --json ``` `platform smoke --all-scopes` creates a temporary all-scope token if no platform token is supplied, executes all registered V1 scopes through `POST /scopes_exec` on `https://cloud.boomin.ai/api:xX_v8KtJ`, cleans up created smoke objects when `--cleanup` is present, and revokes the temporary token. ## V1 scopes Setup: - `org:read` - `connect_config:read` - `connect_config:write` Programs: - `programs:read` - `programs:create` - `programs:update` - `programs:delete` - `program_members:read` - `program_members:approve` - `program_resources:read` - `program_resources:write` - `campaigns:read` - `campaigns:write` - `benefits:read` - `benefits:write` - `webhooks:read` - `webhooks:write` Content: - `series:read` - `series:create` - `series:update` - `series:delete` - `units:read` - `units:create` - `units:update` - `units:delete` - `units:publish` UI and assets: - `pages:read` - `pages:write` - `pages:delete` - `canvas:read` - `canvas:write` - `canvas:delete` - `files:read` - `files:write` - `files:delete` Automation and data: - `agents:read` - `agents:write` - `agents:run` - `workflows:read` - `workflows:write` - `workflows:run` - `contacts:read` - `segments:read` - `segments:write` - `events:read` - `events:write` Commerce: - `commerce:read` - `commerce:write` ## OpenAPI Creator Connect: - Docs: https://developers.boomin.ai/api/connect/ - Spec: https://developers.boomin.ai/openapi/connect.yaml Platform API: - Docs: https://developers.boomin.ai/api/platform/ - Spec: https://developers.boomin.ai/openapi/platform.yaml ## Product model Programs are durable. Campaigns are activation pushes inside a program. Program membership owns approval status, referral code, connection status, and billable creator state. Campaigns, benefits, requirements, and webhooks build on top of program membership.