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

Update a conversion goal on a Clics project via REST

Copy page

Update a conversion goal on a Clics project via REST

Update an existing goal.

PATCH/v1/goals/{goal_id}
Authorization
AuthorizationBearer token (API key) · headerrequired
Path parameters
goal_idstringrequired
Goal ID.
min length 1
Request body
requiredapplication/json
display_namestring
min length 1
goal_typestring
Allowed:pageeventoutboundscroll_depth
ruleobject
Show properties
page_pathstring
min length 1
event_namestring
min length 1
outbound_urlstring<uri>
scroll_depth_thresholdinteger
min 1 · max 100
Responses
200Updated goal.
idstringrequired
project_idstringrequired
env_idstringrequired
Allowed:productiondevelopment
display_namestringrequired
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/goals/goal_1" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "rule": {
    "page_path": "/thank-you"
  }
}'
Response
{
  "id": "string",
  "project_id": "string",
  "env_id": "production",
  "display_name": "string"
}