Customise a goal
Sets the display name, description, colour, visibility or #1 KPI flag of a goal. Needs the editor role.
Related: Goals report and Goals over time in Goals.
Request
Path parameters
websitestringrequiredWebsite id or domain, e.g. example.com
1–253 characters
goalNamestringrequiredPattern: ^[a-z0-9][a-z0-9_:-]{0,63}$
Headers
AuthorizationstringrequiredBearer followed by a site key, an account token or an OAuth access token with the goals:write scope.
Content-TypestringrequiredSend the body as JSON.
One of: application/json
Body fields
displayNamestring | nulloptionalUp to 80 characters
descriptionstring | nulloptionalUp to 280 characters
colourstring | nulloptionalPattern: ^#[0-9a-f]{6}$
hiddenbooleanoptionalkpibooleanoptionalResponse
Display settings.
{
"status": "string",
"data": {
"id": "string",
"siteId": "string",
"trackingId": "string",
"displayName": "string",
"description": "string",
"colour": "string",
"hidden": true,
"kpi": true,
"updatedAt": "2026-01-01T00:00:00.000Z"
}
}Response fields
| Field | Type | Description |
|---|---|---|
| status | "ok" | |
| data | object | |
| data.id | string | |
| data.siteId | string | |
| data.trackingId | string | |
| data.displayName | string | null | null | |
| data.description | string | null | null | |
| data.colour | string | null | null | |
| data.hidden | boolean | |
| data.kpi | boolean | |
| data.updatedAt | string (date-time) |