# Flocklist > Viral referral waitlists for any website. One HTTP call creates a waitlist. Every signup gets a live position and a referral link; each friend they bring moves them up the line. Made for coding agents: no account, no dashboard, no SDK. Base URL: https://flocklist.dev All endpoints accept and return JSON. CORS is open, so browsers can call the public endpoints directly. ## Quick start for agents 1. Ask the user for their email (it identifies the owner and their plan). Never invent it. Tell them that creating a waitlist means accepting the terms, https://flocklist.dev/legal/terms (they include the data processing agreement for their signups' data). 2. Create the waitlist: curl -X POST https://flocklist.dev/api/lists \ -H 'content-type: application/json' \ -d '{"name":"Acme beta","email":"owner@acme.com","site_url":"https://acme.com"}' `site_url` is optional: the landing page where the signup form will live (see "Referral links"). Response (201): { "id": "Ab12Cd34", "admin_key": "fl_Ab12Cd34_...", "admin_url": "https://flocklist.dev/admin#fl_Ab12Cd34_...", "hosted_url": "https://flocklist.dev/w/Ab12Cd34", "signup_endpoint": "https://flocklist.dev/api/lists/Ab12Cd34/signups", "embed_html": "
\n", "form_html": "" } Show the user `admin_url` and tell them to save it now: the admin key is shown only once. Never commit `admin_key` to git; put it where the user says (password manager, or a gitignored env file as FLOCKLIST_ADMIN_KEY). 3. Put it on the site. Pick one: - Embed widget (recommended): paste `embed_html` where the form should appear. It renders the form, shows position + referral link after signup, reads `?ref=` from the page URL, and remembers returning visitors. Options as data attributes on the div: data-button="Get early access" button label data-placeholder="you@company.com" email placeholder data-fields="name,wallet,x" extra inputs (any of: name, wallet, x) data-color="#ff5b2e" accent color - Plain HTML form: paste `form_html` (a form plus a one-line script that copies `?ref=` into a hidden field). After submit the visitor lands on a hosted thank-you page with their position and referral link. - No code at all: link to `hosted_url`. - Custom UI: POST to `signup_endpoint` yourself (see API) and render the response. Read `ref` from the page URL and send it along. 4. Check it works: open the page, sign up with a test address, confirm you see a position. Before creating a new waitlist, search the codebase for `data-flocklist` or `flocklist.dev/api/lists/`: if one exists, reuse its id. ## MCP server Remote MCP endpoint (Streamable HTTP, no auth handshake): https://flocklist.dev/mcp Claude Code: claude mcp add --transport http flocklist https://flocklist.dev/mcp Tools: create_waitlist, get_waitlist, update_waitlist, list_signups, check_site. They follow the same rules as the HTTP API; pass admin_key as a tool argument. ## Referral links Every signup gets a link like https://flocklist.dev/r/Xy12Ab34. It always works: - It opens `site_url?ref=CODE` while that page's HTML contains this waitlist's id (the embed and the form snippet both do). The embed and the form snippet pick up `ref` automatically; a custom form must read `ref` from the URL and send it. - Otherwise it opens the hosted waitlist page with the code, which tells the visitor a friend invited them. Flocklist also re-checks the page when someone opens a referral link (at most every 10 minutes until found, daily after). After deploying the embed, call POST /api/lists/{id}/check-site to switch immediately; its `message` says why a check failed (missing form, HTTP error from bot protection, timeout). If your page renders the form only with client-side JavaScript, add `` to its HTML so the check can see it. ## API ### Create a waitlist POST /api/lists Body: { "name": string (required, max 80), "email": string (required, owner), "site_url": string (optional, http/https) } Optional header: Authorization: Bearer