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) · headerrequiredPath parameters
funnel_idstringrequiredFunnel ID.
min length 1
Request body
requiredapplication/jsonnamestringFunnel display name.
min length 1
conversion_windowobjectHow long a visitor has to complete the funnel after entering the first step.
Show propertiesHide properties
valueintegerrequiredLength of the conversion window.
min 1
unitstringrequiredUnit for the conversion window length.
Allowed:
secondsminuteshoursdaysweeksmonthsstepsobject[]Ordered funnel steps. At least two steps are required. Each step needs a name and at least one filter.
min items 2
Show propertiesHide properties
Array of
objectnamestringrequiredDisplay name for this funnel step.
min length 1
filtersobject[]requiredAt least one filter that defines when this step is reached.
min items 1
Show propertiesHide properties
Array of
objectfilter_typestringrequiredDimension to match: country, device, browser, os, page, event, hostname, referrer, or utm_*.
Allowed:
countrydevicebrowserospageeventhostnamereferrerutm_sourceutm_mediumutm_campaignutm_termutm_contentoperatorstringrequiredMatch operator: is, is_not, contains, or not_contains.
Allowed:
isis_notcontainsnot_containsvaluesstring[]requiredValues to match against the chosen dimension.
Responses
200Updated funnel.
idstringrequiredproject_idstringrequiredenv_idstringrequiredAllowed:
productiondevelopmentnamestringrequiredconversion_windowobjectrequiredShow propertiesHide properties
valueintegerrequiredLength of the conversion window.
min 1
unitstringrequiredUnit for the conversion window length.
Allowed:
secondsminuteshoursdaysweeksmonthsstepsobject[]requiredShow propertiesHide properties
Array of
objectnamestringrequiredDisplay name for this funnel step.
min length 1
filtersobject[]requiredAt least one filter that defines when this step is reached.
min items 1
Show propertiesHide properties
Array of
objectfilter_typestringrequiredDimension to match: country, device, browser, os, page, event, hostname, referrer, or utm_*.
Allowed:
countrydevicebrowserospageeventhostnamereferrerutm_sourceutm_mediumutm_campaignutm_termutm_contentoperatorstringrequiredMatch operator: is, is_not, contains, or not_contains.
Allowed:
isis_notcontainsnot_containsvaluesstring[]requiredValues to match against the chosen dimension.
created_atnumberrequired400Invalid request.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequired401Missing or invalid API key.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequired403Forbidden.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequired404Resource not found.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequired500Unexpected error.
errorobjectrequiredShow propertiesHide properties
codestringrequiredmessagestringrequiredRequest
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"
}'const response = await fetch("https://api.clics.dev/v1/funnels/funnel_1", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "Updated checkout"
})
});import requests
response = requests.patch(
"https://api.clics.dev/v1/funnels/funnel_1",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"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
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}