Skip to main content

Base URL and authentication

Every endpoint takes Authorization: Bearer <YOUR_API_KEY> (details) and a site_id. With an API key, site_id is the site’s snippet key, the ttid_… value your install snippet carries as data-site. For what a funnel is and how the numbers behave, read Funnels first. This page is the wire format.

The step object

Every step is one of two shapes, discriminated by kind. A pageview step:
A goal step:
negate lives on the step, not inside the matcher, so both kinds express it the same way. On a pageview step it composes with the operator: not_contains plus negate: true is a double negative and is applied as written.

GET /v1/funnels

List every funnel on the site, oldest first, each with its steps in position order.

POST /v1/funnels

201 returns { "funnel": { … } } in the list shape above.

PATCH /v1/funnels/:id

Accepts the same fields as create, all optional. steps replaces the entire list rather than merging into it, so send every step you want to keep.
200 returns { "funnel": { … } }. An id belonging to another site is 404.

DELETE /v1/funnels/:id

204 with no body. The steps go with it. Unlike a goal, a funnel is a definition you wrote, so deleting it deletes it.

GET /v1/funnels/:id/results

Run the funnel and return the counts.
The range may not span more than 730 days, the retention of the visitor step records a funnel reads, and from may not be after to. Either is a 422 naming the field. filters must be JSON-encoded as a whole (?filters=%7B%22country_code%22%3A%22US%22%7D), not as bracketed keys. Malformed JSON is a 422 rather than a silently ignored filter. It is validated today; the date range is what currently narrows the run.
top_countries never names a country with too few visitors to report. The set of named countries is decided once for the whole run, so a country appears at every step or at none: step counts fall monotonically, and naming one at step 1 but not step 4 would reveal its step-4 count by subtraction.

Errors

Rate limits are per credential: 120 requests per minute for reads, including results, and 60 for writes. A second ceiling of 600 requests per minute applies per IP address.

Next