Documentation
POST /api/growth/edit
Edit a growth artifact in natural language.
| Request | POST /api/growth/edit |
|---|---|
| Authentication | Session cookie required |
| Handler | backend/growth_editor.py |
What it does
Runs the growth editor against a platform's artifact. It refuses rather than half-succeeding: `invalid_editor_response` when the editor returned no safe editable fields, and `timeout` when it ran out of time — both say explicitly that nothing was changed.
Authentication
Session cookie required. Send the ff_session cookie. Without one the engine treats the caller as a new visitor with no holds and no claims, and returns a new cookie to use from then on.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ff_session | cookie | string | Optional | The session identifier. Omit it on the first call and store the value the response sets; every later call must send the same one or the engine treats the caller as a new visitor with no holds and no claims. |
platform | body | string | Required | The platform the artifact belongs to. Refused as `invalid_platform` when unknown. |
message | body | string | Required | The edit, in the founder's words. |
current | body | object | Required | The artifact as the client currently holds it, so the editor edits what the founder is looking at. |
product_id | body | string | Optional | The product. Defaults to the session's resolved one. |
Request
The cookie jar carries the session between calls. Angle-bracketed values are the parameter types from the table above.
curl -s -b cookies.txt -c cookies.txt \
-X POST -H 'Content-Type: application/json' \
-d '{"platform":"<string>","message":"<string>","current":"<object>","product_id":"<string>"}' \
"https://flowfinds.ai/api/growth/edit"const res = await fetch("https://flowfinds.ai/api/growth/edit", {
method: "POST",
credentials: "include",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"platform": "<string>",
"message": "<string>",
"current": "<object>",
"product_id": "<string>"
}),
});
const data = await res.json();import requests
s = requests.Session()
r = s.post("https://flowfinds.ai/api/growth/edit", json={
"platform": "<string>",
"message": "<string>",
"current": "<object>",
"product_id": "<string>"
})
data = r.json()Recorded example
curl -s -b cookies.txt -c cookies.txt \
-X POST -H 'Content-Type: application/json' \
-d '{"platform":"…","message":"…","current":{ }}' \
"$FLOWFINDS_ORIGIN/api/growth/edit"Responses
200 — The edit was applied. The response conforms to the growth editor's output schema.
200 — Refused.
| Field | Type | Description |
|---|---|---|
status | string | `refused`, `failed` or `timeout`. |
reason | string | `invalid_editor_response` among others. |
explanation | string | What happened, and that nothing was changed. |
Errors
| Status | Reason | When |
|---|---|---|
400 | — | A field failed validation. |
401 | — | The session has no account. |
409 | — | There is no artifact to edit. |
429 | — | The editor usage meter refused. |
500 | — | The editor raised. |
503 | cli_unavailable | The editor process is not installed on this machine. |
Related
GET /api/ad— The ad artifact for the session's product, with its pass criteria.POST /api/ad/edit— Override the ad copy, or reset it to the generated version.GET /api/ads-manager— The campaign book.POST /api/ads-manager— Save the campaign book.GET /api/adbalance— The advertising balance, its ledger and any pending top-ups.POST /api/adbalance— Start a balance top-up.GET /api/adbalance/confirm— Retired. Balance confirmation is no longer client-driven.POST /api/organic/research— Research an organic campaign for named platforms.
Back to the API reference index, or read the cookbook for recipes that compose this endpoint with others.