THE PROPOSAL MACHINE: A GUIDE FOR AGENTS Version 2026-11-29. This page is public. It holds no key and no address of anyone's work. WHAT IT IS The Proposal Machine is a web app for interior designers. It turns a designer's calculation from the PRICING QUEEN calculator into a designed price proposal: her brand, her template, her photos, her texts, a check before print, and a PDF she sends to her client. The proposals are in Hebrew, right to left, written by the designer to her client, in female forms. An agent key lets an AI agent work in ONE designer's account, on her behalf. She makes the key in the machine; it is shown to her once. She can revoke it at any moment, and it stops at once. Everything an agent writes is marked in the proposal's notebook with the key's name. HOW TO CALL - The base address is the machine's own address (the one the designer gives you). - Every call: the header Authorization: Bearer pmk_<43 characters> - Every POST also: the header Origin: https:// (no path) and Content-Type: application/json, with a JSON body ({} when there is nothing to say). Without them the answer is 403 "origin". - Keep every body under 4.5 MB. Shrink a photo before you send it. - Answers are JSON: { "ok": true, ... } or { "ok": false, "error": "" }. - 401 "signin": no key, or a key she revoked. - 503 "busy": another tab of hers is saving; try again in a few seconds (a write waits up to 30 seconds). BEFORE ANYTHING: HER YES TO THE TERMS The designer agrees to the terms herself, in her browser. An agent never agrees for her. Until she has, every call answers 403 "consent". GET /api/consent answers { ok, version, agreed }. If "agreed" is false, ask her to sign in to the machine once in her browser and agree. THE STEPS OF A PROPOSAL 1. A calculation arrives. From the calculator's button (she presses it), or dropped in by you: POST /api/rooms/drop { "name": "", "text": "" } The text is the file the calculator exports (format "pq-proposal-data", at most 3 MB). Answers { ok: true, key }, or "not-calc" (not a calculation), "invalid" (refused by the machine's rules, for example a calculation with no template chosen), "taken" (already waiting or open). 2. See what waits and what exists: GET /api/rooms her waiting calculations (each with its key) and her proposals (each with its id) 3. Open a waiting calculation as a proposal: POST /api/rooms/open { "key": "", "client": "" } Optional: "template": "t" (one of her templates; left out = her default). Answers { ok: true, id }. "book" (409) = her brand ("my brand") is not set up yet: she does that herself, in her browser. 4. Read a proposal: GET /api/projects/ { ok, view }: its state, its project file, its notes GET /p//proposal.html its pages (also cover.html, whole.html) GET /api/copybox/texts?project= the texts she may change, each with what prints now 5. Change it: POST /api/copybox/keep { "project": "", "id": "", "text": "" } a text onto the page, at once (the notebook keeps what was there) POST /api/projects//save { "set": [ { "path": "...", "value": ... } ] } 1 to 4 changes at once; a path into view.project; one the machine does not know = "field" POST /api/projects//notes { "text": "..." } her meeting notes POST /api/projects//stop { "stop": "client" | "offer" | "design" | "photos" } a step confirmed POST /api/projects//undo {} and /redo {} 6. Photos: GET /api/photos//frames the frames of the last build POST /api/photos//autofill {} the plan for the empty frames (no photo twice) POST /api/photos//set { "frames": [ { "frame", "src", "crop", "print" } ] } POST /api/photos//clear { "frame": ... } GET /api/photos/library her library; POST /api/photos/library/add { "name", "data" } POST /api/photos//library/add { "name", "data" } (data = base64 or a data URL, under 4.5 MB) 7. Check, then print: POST /api/projects//check the lines to fix before print POST /api/projects//print the PDF; GET /p//proposal.pdf gives it (a short signed address) A printed proposal is frozen ("ready"): changes answer "frozen". Sending it is hers. 8. Her assistant (optional): POST /api/copybox/rewrite { "project", "id", "ask" } a new wording, as a draft POST /api/copybox/shorten { "project", "id" } the same, shorter POST /api/copybox/summary { "project", "notes" } the meeting's summary, two paragraphs Each counts toward her monthly cap. Over it the answer is "none". An agent that writes well can write the text itself and put it on the page with /api/copybox/keep. HOW TO WRITE HER TEXTS - Hebrew, female forms, her own voice: the designer writes to her client. - Sizes never shrink. A text that does not fit is written shorter, never set smaller. - Prices and hours come from her calculation. Never write a number that is not in it. WHAT AN AGENT MAY NEVER DO (refused: 403 "agent") - Send a proposal, mark it as sent, approve it or take an approval back. - Delete, duplicate, or restore a proposal; empty or use the bin; dismiss a waiting calculation. - Anything in "my brand" (/api/mybrand/...) or in her templates (/api/templates/...). - Her agent keys (/api/agent-keys...), even to read them. - Agree to the terms for her (POST /api/consent). - Any other write that is not listed in THE STEPS above. Every read of hers is allowed, except her keys. RULES - One designer, one key. Work only on what she asked. Never share the key or put it in a file. - Tell her what you changed. Her notebook shows it too, under your key's name. - If an answer surprises you, stop and ask her. Do not try another way around a refusal.