Skip to content
Website API / Goals

Customise a goal

PUThttps://<your Reveata origin>/api/v1/websites/{website}/goals/{goalName}

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.

Try in playground

Request

Path parameters

websitestringrequired

Website id or domain, e.g. example.com

1–253 characters

goalNamestringrequired

Pattern: ^[a-z0-9][a-z0-9_:-]{0,63}$

Headers

Authorizationstringrequired

Bearer followed by a site key, an account token or an OAuth access token with the goals:write scope.

Content-Typestringrequired

Send the body as JSON.

One of: application/json

Body fields

displayNamestring | nulloptional

Up to 80 characters

descriptionstring | nulloptional

Up to 280 characters

colourstring | nulloptional

Pattern: ^#[0-9a-f]{6}$

hiddenbooleanoptional
kpibooleanoptional

Response

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

FieldTypeDescription
status"ok"
dataobject
data.idstring
data.siteIdstring
data.trackingIdstring
data.displayNamestring | null | null
data.descriptionstring | null | null
data.colourstring | null | null
data.hiddenboolean
data.kpiboolean
data.updatedAtstring (date-time)