Documentation · API reference
PATCH/api/v1/goals/{id}

Change a goal

Rename, pause, or change the definition. A changed definition is a new version.

What to send

GoalUpdate Change a goal. A new `spec` makes a new version; conversions already counted keep the version they were counted under.

name
string or null
note
string or nullWhy the definition changed, shown beside the version.
paused
boolean or null
spec
object or null

The answer

Status 200

GoalView

created_at
stringneeded
id
stringneeded
name
stringneeded
paused
booleanneeded
site_id
stringneeded
spec
objectneeded
summary
stringneeded`event install-copy`, `page /thanks*`.
version
integerneededThe version in force. Each conversion records the one it was counted under (EV-06).

Asking

With your token from Settings
curl -X PATCH https://tidekeeper.eu/api/v1/goals/{id} \
    -H "Authorization: Bearer $TIDEKEEPER_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{}'
With your token from Settings
const answer = await fetch("https://tidekeeper.eu/api/v1/goals/{id}", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.TIDEKEEPER_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
}).then((r) => r.json());