Skip to content

Funnels API ​

All paths are relative to https://your-site.com/api/v1. Send Authorization: Bearer <token> and Accept: application/json; see authentication and errors.

MethodPathWhat it does
GET/sites/{site}/funnels/pagesPage addresses for page steps
POST/sites/{site}/funnels/previewCounts for unsaved steps
GET/sites/{site}/funnelsThe site's funnels (newest first)
POST/sites/{site}/funnelsCreates a funnel (recordings:write)
GET/sites/{site}/funnels/{funnel}One funnel
PATCH/sites/{site}/funnels/{funnel}Renames a funnel or replaces its steps (recordings:write)
DELETE/sites/{site}/funnels/{funnel}Deletes a funnel (recordings:write)
GET/sites/{site}/funnels/{funnel}/reportSessions reaching each step, conversion and drop-off
GET/sites/{site}/funnels/{funnel}/sessionsThe latest 50 sessions that reached a step, or dropped out right after it

GET /sites/{site}/funnels/pages ​

Page addresses for page steps

The site's most visited addresses of the last 30 days containing q (at most 20), with how many sessions viewed them.

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
qquerystring

Responses ​

  • 200 — OK
  • 404 — Missing, or another account's.
Response fields
FieldTypeRequiredDescription
dataobject[]
data[].urlstring
data[].sessionsinteger
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/funnels/pages" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /sites/{site}/funnels/preview ​

Counts for unsaved steps

Sessions reaching each step in the last 30 days, without saving anything (the builder's live numbers).

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes

Request body ​

application/json, required

FieldTypeRequiredDescription
stepsobject[]yesAt most 10 items.

Responses ​

  • 200 — One count per step.
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject
data.sessionsinteger[]
bash
curl -X POST "https://your-site.com/api/v1/sites/{site}/funnels/preview" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"steps":[{}]}'

GET /sites/{site}/funnels ​

The site's funnels (newest first)

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes

Responses ​

  • 200 — Funnels.
  • 404 — Missing, or another account's.
Response fields
FieldTypeRequiredDescription
dataobject[]
data[].idinteger
data[].site_idinteger
data[].namestring
data[].stepsobject[]
data[].steps[].typestringyesOne of: page, click, typed, tag.
data[].steps[].opstringPage and click steps. pattern: * matches anything. One of: is, contains, begins, pattern.
data[].steps[].valuestring, nullablePage steps: the URL text. Click steps: the element text or selector. Typed steps: the field name. Tag steps: the value the tag must have (null = any).
data[].steps[].keystringTag steps.
data[].steps[].labelstring, nullableOptional display name.
data[].created_atstring (date-time), nullable
data[].updated_atstring (date-time), nullable
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/funnels" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

POST /sites/{site}/funnels ​

Creates a funnel (recordings:write)

403 when the account's plan allows no more funnels (plan feature funnels.count).

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes

Request body ​

application/json, required

FieldTypeRequiredDescription
namestringAt most 120 characters.
stepsobject[]At most 10 items.
steps[].typestringyesOne of: page, click, typed, tag.
steps[].opstringPage and click steps. pattern: * matches anything. One of: is, contains, begins, pattern.
steps[].valuestring, nullablePage steps: the URL text. Click steps: the element text or selector. Typed steps: the field name. Tag steps: the value the tag must have (null = any).
steps[].keystringTag steps.
steps[].labelstring, nullableOptional display name.

Responses ​

  • 201 — The funnel.
  • 403 — Not allowed (not an administrator, or outside the token's abilities).
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject
data.idinteger
data.site_idinteger
data.namestring
data.stepsobject[]
data.steps[].typestringyesOne of: page, click, typed, tag.
data.steps[].opstringPage and click steps. pattern: * matches anything. One of: is, contains, begins, pattern.
data.steps[].valuestring, nullablePage steps: the URL text. Click steps: the element text or selector. Typed steps: the field name. Tag steps: the value the tag must have (null = any).
data.steps[].keystringTag steps.
data.steps[].labelstring, nullableOptional display name.
data.created_atstring (date-time), nullable
data.updated_atstring (date-time), nullable
bash
curl -X POST "https://your-site.com/api/v1/sites/{site}/funnels" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"text","steps":[{"type":"page"}]}'

GET /sites/{site}/funnels/{funnel} ​

One funnel

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
funnelpathintegeryes

Responses ​

  • 200 — The funnel.
  • 404 — Missing, or another account's.
Response fields
FieldTypeRequiredDescription
dataobject
data.idinteger
data.site_idinteger
data.namestring
data.stepsobject[]
data.steps[].typestringyesOne of: page, click, typed, tag.
data.steps[].opstringPage and click steps. pattern: * matches anything. One of: is, contains, begins, pattern.
data.steps[].valuestring, nullablePage steps: the URL text. Click steps: the element text or selector. Typed steps: the field name. Tag steps: the value the tag must have (null = any).
data.steps[].keystringTag steps.
data.steps[].labelstring, nullableOptional display name.
data.created_atstring (date-time), nullable
data.updated_atstring (date-time), nullable
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/funnels/{funnel}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

PATCH /sites/{site}/funnels/{funnel} ​

Renames a funnel or replaces its steps (recordings:write)

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
funnelpathintegeryes

Request body ​

application/json, required

FieldTypeRequiredDescription
namestringAt most 120 characters.
stepsobject[]At most 10 items.
steps[].typestringyesOne of: page, click, typed, tag.
steps[].opstringPage and click steps. pattern: * matches anything. One of: is, contains, begins, pattern.
steps[].valuestring, nullablePage steps: the URL text. Click steps: the element text or selector. Typed steps: the field name. Tag steps: the value the tag must have (null = any).
steps[].keystringTag steps.
steps[].labelstring, nullableOptional display name.

Responses ​

  • 200 — The funnel.
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject
data.idinteger
data.site_idinteger
data.namestring
data.stepsobject[]
data.steps[].typestringyesOne of: page, click, typed, tag.
data.steps[].opstringPage and click steps. pattern: * matches anything. One of: is, contains, begins, pattern.
data.steps[].valuestring, nullablePage steps: the URL text. Click steps: the element text or selector. Typed steps: the field name. Tag steps: the value the tag must have (null = any).
data.steps[].keystringTag steps.
data.steps[].labelstring, nullableOptional display name.
data.created_atstring (date-time), nullable
data.updated_atstring (date-time), nullable
bash
curl -X PATCH "https://your-site.com/api/v1/sites/{site}/funnels/{funnel}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"text","steps":[{"type":"page"}]}'

DELETE /sites/{site}/funnels/{funnel} ​

Deletes a funnel (recordings:write)

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
funnelpathintegeryes

Responses ​

  • 204 — Deleted.
  • 404 — Missing, or another account's.
bash
curl -X DELETE "https://your-site.com/api/v1/sites/{site}/funnels/{funnel}" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

GET /sites/{site}/funnels/{funnel}/report ​

Sessions reaching each step, conversion and drop-off

A session reaches step 1 at its first matching event in the period (default: the last 30 days) and segment, and step k at its first matching event after reaching step k−1, in the same session. Per step: sessions, share (% of step 1), conversion (% of the step before), dropped (reached it but not the next step).

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
funnelpathintegeryes
fromquerystring (date)
toquerystring (date)
devicequerystringOne of: desktop, mobile, tablet.
sourcequerystringOne of: direct, search, social, email, paid, referral.
visitorquerystringOne of: new, returning.

Responses ​

  • 200 — The report.
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject
data.funnelobject
data.funnel.idinteger
data.funnel.site_idinteger
data.funnel.namestring
data.funnel.stepsobject[]
data.funnel.created_atstring (date-time), nullable
data.funnel.updated_atstring (date-time), nullable
data.periodobject
data.period.fromstring (date)
data.period.tostring (date)
data.conversionnumber% of step 1 that reached the last step.
data.stepsobject[]
data.steps[].stepobjectA page the visitor viewed (type: page with op and value), an element they clicked (type: click with op and value: its text or CSS selector), a form field they typed in (type: typed with value: the field name contains; never what was typed) or a session tag (type: tag with key and optionally value).
data.steps[].sessionsinteger
data.steps[].sharenumber
data.steps[].conversionnumber
data.steps[].droppedinteger
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/funnels/{funnel}/report" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

GET /sites/{site}/funnels/{funnel}/sessions ​

The latest 50 sessions that reached a step, or dropped out right after it

Parameters ​

NameInTypeRequiredDescription
sitepathintegeryes
funnelpathintegeryes
stepqueryintegeryesMinimum 1.
outcomequerystringOne of: reached, dropped. Default "reached".
fromquerystring (date)
toquerystring (date)
devicequerystringOne of: desktop, mobile, tablet.
sourcequerystringOne of: direct, search, social, email, paid, referral.
visitorquerystringOne of: new, returning.

Responses ​

  • 200 — Session ids (replay at GET /sites/{site}/sessions/{session}) and when they reached the step.
  • 404 — Missing, or another account's.
  • 422 — Validation failed.
Response fields
FieldTypeRequiredDescription
dataobject[]
data[].sessionstring (uuid)
data[].at_msinteger
bash
curl -X GET "https://your-site.com/api/v1/sites/{site}/funnels/{funnel}/sessions" \
  -H "Authorization: Bearer $REPLORA_TOKEN" \
  -H "Accept: application/json"

Replora: see what your visitors see.