# Minicle Public API v1 & Remote MCP (minicle.app) Universal AI mini-app free library and curated affiliate recommendation hub usable in any AI app via 1-click prompt copy, first-party shortlinks, REST API, or Remote MCP. ## Base URL, Remote MCP, Auth & CORS - REST Base URL: `https://api.minicle.app/public/v1` - Remote MCP Endpoint: `POST https://api.minicle.app/mcp` (Stateless Streamable HTTP, Tier-0 keyless, IPv6 /64 rate-limited) - Categories (6): `life` (생활·루틴), `parenting` (임신·육아), `tools` (도구·계산기), `money` (가계부·절약), `travel` (여행·나들이), `work` (업무·크리에이터). - Usage Modes (4): `solo` (혼자), `couple` (연인·커플), `family` (가족·육아), `group` (친구·스터디·모임) — 100 templates total (82 pure free + 18 optional contextual-match; solo & shared with user-owned room governance). - Tier 0 (Keyless Public Read): `/llms.txt`, `/openapi.json`, `/templates`, `/templates/{slug}/html`, `/install/{code}`, `/install/u/{boardSlug}`, `/rooms/challenge`, `POST /rooms`, `GET /rooms/{roomCode}`, `POST /rooms/{roomCode}/join`, `/recommendations/match`, `/snapshots/{slug}`, `/snapshots/{slug}/version`, `/shopping/*`, `/travel/search`, `/boards/{slug}`, `GET /submissions`, `/events/click`, `/events/share`, `/shopping/requests`, and `POST /mcp` require NO API key (IPv6 /64 rate-limited). - User-Owned Rooms (Q41-A, Zero PII): Unlisted invite-only rooms (`https://minicle.app/r/{roomCode}`) use SHA-256 hashed `mnc_host_*` / `mnc_mem_*` Bearer tokens kept strictly in per-user isolated SQLite (NEVER hardcoded in HTML) and store zero email, phone, real name, device ID, or IP columns. - Tier 1 (Authenticated / Optional Personalization): `POST /submissions` and `/me/*` accept `Authorization: Bearer {TOKEN_OR_API_KEY}` (store only in localStorage; never hardcode keys in mini-app prompts or code). - CORS: wildcard `*` with `credentials: false` (Bearer-only, never send cookies; exposes `ETag` and allows `If-None-Match`). ## Sandbox Mini-App Best Practices (v2.1) - **Static `` Baking (Q26)**: Many AI mini-app sandboxes block JS-generated external links (`innerHTML`, `window.open`). On initial build, fetch `GET /snapshots/{slug}` (`<= 16 KB`) and bake top verbatim `buyUrl` links + permanent `https://minicle.app/m/{slug}` and `/k/{presetSlug}` catalog links directly into the initial HTML under the top `[광고]` disclosure. - **Backend Proxy & Compact JSON**: When direct browser `fetch()` is blocked, call `api.minicle.app` through the mini-app built-in backend (`/api/...`, e.g. Python Flask + `requests`, `timeout=5`, `compact=true`, `limit=5`) to stay well inside 10s / 192KB sandbox limits. - **Chat Bridge + Copy Fallback**: For ad-hoc dynamic search cards inside strict sandboxes, provide a chat bridge button (`prompt:`) to send `[광고]` + verbatim `buyUrl` into chat alongside a selectable copy box. - **Zero External CDN & Share-Ready State**: Use built-in fonts (`Pretendard`, `JetBrains Mono`, or system fonts) and inline CSS text/badge cards (no external CDN scripts/fonts/images, no `alert`/`confirm`/`prompt`). Never request personal email/calendar/note permissions; prefer synced state or per-user SQLite (`localStorage` fallback) so shared mini-apps work cleanly for every invited user. - **Native Full-Bleed Mobile Layout (Q47-A Universal Policy)**: Applies to ALL official templates, community UGC, curated boards, and future channels. Use `viewport-fit=cover` + `env(safe-area-inset-bottom)` on an open `100dvh` canvas (clean neutral light canvas for light themes, dark canvas for dark themes; NEVER wrap the entire app in a fixed 390px outer card or double padding). Place a slim 19-20px title + 1-line subtitle header directly on the canvas (zero preview skin-name meta pills), group items in 1-tier white section cards, and use 14px body text with 40px+ touch targets. - **Design Kit for Custom User Apps (`/public/v1/design-kit/css` & `get_design_kit`)**: Users building their own mini-apps can fetch any of 16 WCAG-AA themes and 21 zero-CDN inline SVG mascots (including official `mochi-ring`) in <= 4 KB to apply Minicle visual polish instantly. - **Modifiable-by-Design & Permission Graceful Degradation**: Evolve user SQLite tables non-destructively (`CREATE TABLE IF NOT EXISTS`, `ALTER TABLE ... ADD COLUMN` — never `DROP` user records), ship working sample defaults with 1-click delete/reset, never request `personal_connections` on shared (`couple`/`family`/`group`) mini-apps, explain optional permissions (`location`, `photo_upload`, `file_export`, `scheduled_refresh`) before prompting with manual fallback when denied, and strip room tokens (`mnc_host_*`, `mnc_mem_*`, `RECO-*`) and personal info before staging community drafts. - **Conversational Diff Refresh (Q27)**: Let the user choose, change, or pause any refresh schedule in chat. Always probe `GET /snapshots/{slug}/version` (`< 200 bytes`, `ETag`/`304`) first, skip HTML edits when `versionHash` matches, and update only the static link block when changed without erasing user state. ## 2-Track FTC Compliance Policy - Track A (Pure free utility mini-apps, `hasAffiliateLinks: false`): No affiliate links and no `[광고]` disclosure banner needed. - Track B (Affiliate-linked checklists, product search, curated boards, `hasAffiliateLinks: true`): 1. Always display `meta.disclosure` (or `item.disclosure`) verbatim at the TOP of the screen or first line of chat before scrolling. 2. Open `item.buyUrl` directly with `target="_blank" rel="noopener noreferrer sponsored"` without shortening or altering the URL. 3. Send click telemetry asynchronously via `POST /events/click` (`navigator.sendBeacon` or `fetch` with `keepalive: true`) so navigation is never blocked. 4. Never fabricate prices (`priceKrw === null` displays `"가격 확인"`) or fake images. 5. When search returns `items.length === 0`, show `"이 키워드 특가 요청하기"` posting to `POST /shopping/requests`, and if `fallbackRecommendations` is non-empty, render them in a clearly separated `"같은 카테고리 오늘 인기 추천"` section keeping the top `[광고]` disclosure visible. ## Remote MCP Tools (9 tools at POST https://api.minicle.app/mcp) - `search_miniapps(q, category, usageMode, limit)` [affiliateDisclosure: false] — Search 100 official Minicle templates (82 pure free + 18 optional contextual-match; solo & shared; 21 mascots) and approved community AI mini-apps by keyword, category (6 official + other), free tags, or usageMode (solo, couple, family, group) - `get_miniapp_prompt(slug)` [affiliateDisclosure: false] — Fetch the ready-to-paste prompt and hasAffiliateLinks metadata for an official template or approved community mini-app - `search_curated_items(q, vertical, category, program, maxPrice, limit)` [affiliateDisclosure: true] — Search curated affiliate shopping, parenting/pregnancy essentials, or travel items with mandatory top FTC [광고] disclosure and Q13-A fallbackRecommendations - `get_curated_board(slug)` [affiliateDisclosure: true] — Fetch live curated items and mandatory top FTC [광고] disclosure for an approved community curated_board mini-app - `request_keyword(keyword, templateSlug, targetPriceKrw)` [affiliateDisclosure: false] — Submit an unmet keyword demand request when search_curated_items returns 0 exact matches - `get_static_snapshot(slug, keywords)` [affiliateDisclosure: true] — Fetch an ultra-compact (<= 16 KB) static-link snapshot with deterministic versionHash, verbatim buyUrl links, and /k/{presetSlug} catalog URLs for initial HTML baking and diff refreshes - `match_contextual_offers(templateSlug, needs, maxPrice, excludeIds, limit)` [affiliateDisclosure: true] — Dynamically match strictly relevant optional affiliate offers for a mini-app template and user needs with refresh rotation (excludeIds) and zero disclosure when hasRelevantOffers is false - `stage_miniapp_draft(title, tagline, category, usageMode, promptText, presetKeywords, tags, requiredPermissions, sourceTemplateSlug, creatorHandle)` [affiliateDisclosure: false] — Stage a user-created or customized mini-app draft from any AI chat conversation after safety, room-token, and PII screening, returning a 1-click browser claim link (minicle.app/submit?draft=DRFT-XXXXXX) without requiring passwords or API keys in chat - `get_design_kit(themeId, mascotId, includeCss)` [affiliateDisclosure: false] — Fetch Minicle Design Kit tokens (16 WCAG-AA themes x 21 zero-CDN inline SVG mascots including official mochi-ring), compact Q47-A native full-bleed CSS, and Modifiable-by-Design rules for building custom user mini-apps ## REST Endpoints (47 operations) - `GET /llms.txt` [auth: none, status: live] — Plain-text integration guide for AI mini-apps, agents, and Remote MCP clients - `GET /openapi.json` [auth: none, status: live] — OpenAPI 3.1.0 machine-readable specification with x-mcp discovery metadata - `GET /templates?category&usageMode&tag&channel` [auth: none, status: live] — List 100 free Minicle AI mini-app templates across 6 everyday categories and 4 usage modes (82 pure utility + 18 optional contextual-match; solo & shared) with shortId, visualStyle, purposeGroup, tags, itemCategories, 16 themes, 21 mascots, permissions, and HTML preview URLs - `GET /design-kit` [auth: none, status: live] — Fetch Minicle Design Kit metadata (16 WCAG-AA themes, 21 zero-CDN SVG mascots including mochi-ring, Q47-A layout summary, and Modifiable-by-Design rules) for user-created mini-apps - `GET /design-kit/css?theme&mascot&format` [auth: none, status: live] — Fetch a ready-to-paste compact (<= 4 KB) CSS token block, Q47-A native full-bleed base classes, and inline SVG mascot snippet for applying Minicle style to any custom AI mini-app - `GET /install/{code}?format&roomCode&theme&mascot` [auth: none, status: live] — Resolve a first-party short code (k01 / k017b) or template slug directly into an Inverted-Pyramid Install Manifest (markdown or json) without redirect hops - `GET /install/u/{boardSlug}?format` [auth: none, status: live] — Serve an Inverted-Pyramid Install Manifest (markdown or json) for an approved community curated_board mini-app - `GET /templates/{slug}/html?theme&mascot&mode` [auth: none, status: live] — Render a native full-bleed responsive HTML5 mini-app (preview & embed modes, <= 16 KB, zero CDN, CSP-hardened preview mode) with selectable theme skin and inline-SVG mascot - `POST /templates/{slug}/copy` [auth: none, status: live] — Record an official template prompt copy (non-monetary popularity counter) - `GET /recommendations/match?templateSlug&needs&maxPrice&excludeIds&limit&channel` [auth: none, status: live] — Keyless Tier-0 contextual offer matching for optional recommendation drawers with strict relevance gating, excludeIds refresh rotation, and conditional top [광고] disclosure only when relevant items exist - `GET /snapshots/{slug}?keywords&limit` [auth: none, status: live] — Keyless Tier-0 ultra-compact (<= 16 KB) static-link snapshot with deterministic versionHash, ETag/304, verbatim buyUrl links, and permanent /k/{presetSlug} catalog URLs for sandboxed AI mini-apps - `GET /snapshots/{slug}/version?keywords` [auth: none, status: live] — Keyless Tier-0 ultra-tiny (< 200 bytes) versionHash probe with ETag/304 for low-cost scheduled static-link diff checks - `GET /shopping/search?q&category&program&maxPrice&compact&cursor&limit` [auth: none, status: live] — Keyless Tier-0 search across curated affiliate shopping and parenting essentials with mandatory top disclosure, optional compact=true projection (<= 16 KB), and separated fallbackRecommendations when 0 results match - `GET /shopping/deals?category&program&compact&cursor&limit` [auth: none, status: live] — Keyless Tier-0 curated hot deals feed across approved affiliate programs (supports compact=true) - `GET /travel/search?q&destination&maxPrice&compact&cursor&limit` [auth: none, status: live] — Keyless Tier-0 search across curated Trip.com travel, hotel, and ticket items with mandatory top disclosure, compact=true support, and fallbackRecommendations - `GET /boards/{slug}?compact` [auth: none, status: live] — Keyless Tier-0 live product feed for an approved community curated_board mini-app (supports compact=true) - `GET /submissions?category&tag&sort&cursor&limit` [auth: none, status: live] — List approved public UGC mini-apps filtered by category (6 core + other) or free tag, sorted by popular (copies + likes) or latest - `POST /submissions` [auth: bearer, status: live] — Submit a logged-in UGC prompt_recipe or 10-second curated_board for automated safety filtering and admin moderation (Q14-A, Q18-A) - `POST /submissions/{slug}/copy` [auth: none, status: live] — Increment prompt copy count for an approved UGC mini-app - `POST /submissions/{slug}/like` [auth: none, status: live] — Toggle non-monetary like counter for an approved UGC mini-app - `POST /events/click` [auth: none, status: live] — Non-blocking outbound affiliate click telemetry (sendBeacon / keepalive, zero PII) - `POST /events/share` [auth: none, status: live] — Non-blocking mobile/desktop library share telemetry (web_share, clipboard, manual_fallback) - `POST /shopping/requests` [auth: none, status: live] — Submit an unmet shopping, parenting, or travel keyword request from an empty mini-app state - `POST /partners/inquiries` [auth: none, status: live] — Submit a store/brand AI mini-app build or 0%-commission outlink listing pre-registration inquiry (IPv6 /64 rate-limited, honeypot-protected, admin-only readable) - `GET /rooms/challenge` [auth: none, status: live] — Issue a 3-second HMAC-SHA256 arithmetic challenge token for bot-safe room create, join, and check-in without CAPTCHA or PII - `POST /rooms` [auth: none, status: live] — Create an unlisted invite-only user-owned room (returns one-time Host token and recovery code; SHA-256 hashed at rest, zero PII) - `GET /rooms/{roomCode}` [auth: none, status: live] — Fetch unlisted room snapshot, mascot roster, KST check-in status, cheer counts, and 2-line room invite prompt - `PATCH /rooms/{roomCode}` [auth: bearer, status: live] — Update room settings (title, noticeText, KST check-in window, restPassesPerWeek, isRecruiting, joinMode, maxMembers) with strict Host/Co-Host role checks - `DELETE /rooms/{roomCode}` [auth: bearer, status: live] — Delete a user-owned room immediately (Host only) - `POST /rooms/{roomCode}/join` [auth: none, status: live] — Join an unlisted room by 7-char roomCode (returns 409 ROOM_FULL when full or recruiting closed; zero PII) - `POST /rooms/{roomCode}/rotate-code` [auth: bearer, status: live] — Rotate the 7-char room invite code immediately (Host or Co-Host) - `POST /rooms/{roomCode}/recover` [auth: optional-bearer, status: live] — Recover Host ownership using one-time recovery code or allow Co-Host claim after 14 days of Host inactivity - `PATCH /rooms/{roomCode}/members/{memberId}/role` [auth: bearer, status: live] — Promote/demote Co-Host (free tier max 1 -> 409 COHOST_LIMIT) or transfer Host ownership (Host only) - `POST /rooms/{roomCode}/members/{memberId}/approve` [auth: bearer, status: live] — Approve a pending member in approval join mode (Host or Co-Host) - `DELETE /rooms/{roomCode}/members/{memberId}` [auth: bearer, status: live] — Kick member/cohost per role hierarchy or leave self from the room - `POST /rooms/{roomCode}/checkins` [auth: bearer, status: live] — Record an idempotent daily KST check-in or weekly rest pass for the authenticated room member - `POST /rooms/{roomCode}/cheers` [auth: bearer, status: live] — Send a preset 5-emoji cheer (fire, clap, coffee, clover, moon) to a room member - `POST /submissions/draft` [auth: none, status: live] — Stage a 24-hour conversational mini-app submission draft after safety and PII screening, returning a 1-click /submit?draft=DRFT-XXXXXX claim link (rate-limited per IPv6 /64) - `GET /submissions/draft/{draftCode}` [auth: none, status: live] — Retrieve an unclaimed, unexpired conversational mini-app draft for 1-click /submit prefill - `GET /leaderboard?period&category&limit` [auth: none, status: live] — List non-purchase community maker rankings and tier badges computed purely from copies, likes, and shares (zero affiliate click/purchase linkage) - `GET /me/submissions` [auth: bearer, status: live] — List authenticated maker submissions and review statuses - `GET /me/watchlist` [auth: bearer, status: live] — Tier-1 optional Bearer-authenticated keyword watchlist sync across chat and mini-apps - `PUT /me/watchlist` [auth: bearer, status: live] — Tier-1 optional Bearer-authenticated keyword watchlist update - `GET /me/api-keys` [auth: bearer, status: live] — List active Tier-1 Bearer API key prefixes for authenticated member - `POST /me/api-keys` [auth: bearer, status: live] — Create a new free Tier-1 Bearer API key (secret displayed once, SHA-256 hashed at rest) - `DELETE /me/api-keys/{id}` [auth: bearer, status: live] — Revoke a Tier-1 Bearer API key immediately - `DELETE /me/account` [auth: bearer, status: live] — Instant account withdrawal (Q15-A): purge PII/watchlists/API keys immediately and anonymize or delete approved UGC per request