Skip to content
Clics privacy-friendly cookieless web analytics documentation
Esc
navigateopen⌘Jpreview

Update a conversion funnel via the Clics REST API

Copy page

Update a conversion funnel via the Clics REST API

Partially update an existing funnel. Unspecified fields are preserved.

PATCH/v1/funnels/{funnel_id}
Authorization
AuthorizationBearer token (API key) · headerrequired
Path parameters
funnel_idstringrequired
Funnel ID.
min length 1
Request body
requiredapplication/json
namestring
Funnel display name.
min length 1
conversion_windowobject
How long a visitor has to complete the funnel after entering the first step.
Show properties
valueintegerrequired
Length of the conversion window.
min 1
unitstringrequired
Unit for the conversion window length.
Allowed:secondsminuteshoursdaysweeksmonths
stepsobject[]
Ordered funnel steps. At least two steps are required. Each step needs a name and at least one filter.
min items 2
Show properties
Array of object
namestringrequired
Display name for this funnel step.
min length 1
filtersobject[]required
At least one filter that defines when this step is reached.
min items 1
Show properties
Array of object
filter_typestringrequired
Dimension to match: country, device, browser, os, page, event, hostname, referrer, or utm_*.
Allowed:countrydevicebrowserospageeventhostnamereferrerutm_sourceutm_mediumutm_campaignutm_termutm_content
operatorstringrequired
Match operator: is, is_not, contains, or not_contains.
Allowed:isis_notcontainsnot_contains
valuesstring[]required
Values to match against the chosen dimension.
Responses
200Updated funnel.
idstringrequired
project_idstringrequired
env_idstringrequired
Allowed:productiondevelopment
namestringrequired
conversion_windowobjectrequired
Show properties
valueintegerrequired
Length of the conversion window.
min 1
unitstringrequired
Unit for the conversion window length.
Allowed:secondsminuteshoursdaysweeksmonths
stepsobject[]required
Show properties
Array of object
namestringrequired
Display name for this funnel step.
min length 1
filtersobject[]required
At least one filter that defines when this step is reached.
min items 1
Show properties
Array of object
filter_typestringrequired
Dimension to match: country, device, browser, os, page, event, hostname, referrer, or utm_*.
Allowed:countrydevicebrowserospageeventhostnamereferrerutm_sourceutm_mediumutm_campaignutm_termutm_content
operatorstringrequired
Match operator: is, is_not, contains, or not_contains.
Allowed:isis_notcontainsnot_contains
valuesstring[]required
Values to match against the chosen dimension.
created_atnumberrequired
400Invalid request.
errorobjectrequired
Show properties
codestringrequired
messagestringrequired
401Missing or invalid API key.
errorobjectrequired
Show properties
codestringrequired
messagestringrequired
403Forbidden.
errorobjectrequired
Show properties
codestringrequired
messagestringrequired
404Resource not found.
errorobjectrequired
Show properties
codestringrequired
messagestringrequired
500Unexpected error.
errorobjectrequired
Show properties
codestringrequired
messagestringrequired
Request
curl -X PATCH "https://api.clics.dev/v1/funnels/funnel_1" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Updated checkout"
}'
Response
{
  "id": "string",
  "project_id": "string",
  "env_id": "production",
  "name": "string",
  "conversion_window": {
    "value": 7,
    "unit": "days"
  },
  "steps": [
    {
      "name": "Cart",
      "filters": [
        {
          "filter_type": "page",
          "operator": "is",
          "values": [
            "/cart"
          ]
        }
      ]
    }
  ],
  "created_at": 0
}