Change a goal
PATCH/ v1/ projects/ {project}/ goals/ {goal}
Absent fields stay as they are.
Path parameters
project
The project's id (
prj_…).goal
The goal's id.
Body
name
kind
A page visit or a custom event.
pageeventpage_path
Starts with /, no spaces; * matches anything.
event_name
conditions
One test on an event property, such as plan is pro.
Show 3 fieldsHide fields
property
operator
isis_notcontainsstarts_withvalue
Responses
The AnalyticsGoal.
id
A prefixed ULID; the prefix names the kind (
prj_… a project, org_… an organization).project_id
A prefixed ULID; the prefix names the kind (
prj_… a project, org_… an organization).name
kind
A page visit or a custom event.
pageeventpage_path
With kind page: /signup, /docs/*.
event_name
With kind event.
conditions
With kind event, tests on its properties; empty for a page.
Show 3 fieldsHide fields
property
operator
isis_notcontainsstarts_withvalue
created_at
A time in UTC, ISO 8601.
updated_at
A time in UTC, ISO 8601.
Example response
1{2"id": "id_01JD8Q2M4W9XK3T7B5",3"project_id": "prj_01JD8Q2M4W9XK3T7B5",4"name": "Production",5"kind": "page",6"page_path": "string",7"event_name": "string",8"conditions": [9{10"property": "plan",11"operator": "is",12"value": "pro"13}14],15"created_at": "2026-11-21T09:30:00Z",16"updated_at": "2026-11-21T09:30:00Z"17}
Errors
Every error has the same shape: error.code, a message for people and details.
| Status | Code |
|---|---|
validation_error | |
not_found | |
goal_name_taken |