Documentation

POST /api/growth/edit

Edit a growth artifact in natural language.

RequestPOST /api/growth/edit
AuthenticationSession cookie required
Handlerbackend/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

ParameterInTypeRequiredDescription
ff_sessioncookiestringOptionalThe 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.
platformbodystringRequiredThe platform the artifact belongs to. Refused as `invalid_platform` when unknown.
messagebodystringRequiredThe edit, in the founder's words.
currentbodyobjectRequiredThe artifact as the client currently holds it, so the editor edits what the founder is looking at.
product_idbodystringOptionalThe 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

200The edit was applied. The response conforms to the growth editor's output schema.

200Refused.

FieldTypeDescription
statusstring`refused`, `failed` or `timeout`.
reasonstring`invalid_editor_response` among others.
explanationstringWhat happened, and that nothing was changed.

Errors

StatusReasonWhen
400A field failed validation.
401The session has no account.
409There is no artifact to edit.
429The editor usage meter refused.
500The editor raised.
503cli_unavailableThe editor process is not installed on this machine.

Related

Back to the API reference index, or read the cookbook for recipes that compose this endpoint with others.