概览

Create funnel

POST/api/v1/create_funnel
Features

Define an ORDERED route through the docs, as a list of goal names. Order is the whole point: a visit counts as reaching step N only if it hit steps 1..N in sequence, so a reader who lands on step 3 first is not counted. Two rules the validator enforces and you should follow when proposing one: start BROAD (most docs readers arrive deep from search or an AI answer, and a narrow step 1 excludes the majority of traffic before measuring anything), and end on a REAL OUTCOME (a funnel ending on a scroll measures attention, not results). window_hours bounds how long after step 1 a later step still counts; omit it to use the visit itself, which is the honest default for docs.

Price — $0.00001 per call (twice what serving it costs us), charged to the workspace balance, the same as over MCP.

Also reachable by name at POST /api/v1/tools/create_funnel.

Input4
Authorizationheaderrequired
Your API key, sent as Authorization: Bearer dbk_YOUR_API_KEY.Sent from your browser straight to the API — never to Docsbook, never stored.
keystring · body
Machine name, e.g. 'evaluation'.
stepsstring[] · body
Goal names, in order. Between 2 and 8. Create the goals first with create_goal.
labelstring · body
Human label. Defaults to the key.
window_hoursnumber · body
Conversion window in hours. Clamped to what the plan retains — a window longer than your history can never complete.
Output3
okboolean
Whether the tool itself succeeded. A tool that ran and refused — an exhausted balance, a plan restriction, a bad argument — answers 200 with ok: false: the call was made and billed, and that refusal is its answer.
resultobject
The tool's own JSON answer, already parsed — not a string to parse a second time.
Show child attributes3
workspace_idnumber
funnelobject
issuesobject[]
duration_msinteger
Server-side wall time for the call.
Responses
200The tool ran. Read ok to see whether it succeeded.
401Missing or invalid API key.
Example input
curl -X POST 'https://docsbook.io/api/v1/create_funnel' \
  -H 'Authorization: Bearer dbk_YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example output
{
  "ok": true,
  "result": {
    "workspace_id": 0,
    "funnel": {},
    "issues": []
  },
  "duration_ms": 0
}

更新于

此页面对您有帮助吗?