---
title: "Partially update goal"
method: PATCH
path: "/goals/{goalId}"
tags: ["Goal"]
---

# Partially update goal

`PATCH /goals/{goalId}`

Update several fields of a goal

## Path parameters

- `goalId` integer, required

## Request body

- GoalUpdateIO
  - `description` string — Description of the goal
  - `hasMultipleConversions` boolean — Does this goal have multiple conversions
  - `isMainGoal` boolean — Indicates if this is the main goal associated with this experiment
  - `name` string — Name of the goal
  - `params` union
    - AccessToPageGoalParams — Type of params depends on 'type' field. 'CLICK' - ClickTrackingGoalParams. 'SCROLL' - ScrollTrackingGoalParams. 'URL' - AccessToPageGoalParams. 'TIME_SPENT' - TimeSpentGoalParams. 'PAGE_VIEWS' - PageViewsGoalParams. For others types params aren't needed.
      - `matchString` string
      - `matchType` 'CONTAINS' | 'CORRESPONDS_EXACTLY' | 'REGULAR_EXPRESSION'
    - ClickTrackingGoalParams — Type of params depends on 'type' field. 'CLICK' - ClickTrackingGoalParams. 'SCROLL' - ScrollTrackingGoalParams. 'URL' - AccessToPageGoalParams. 'TIME_SPENT' - TimeSpentGoalParams. 'PAGE_VIEWS' - PageViewsGoalParams. For others types params aren't needed.
      - `customSelectors` TrackingSelector[] — Selection with a CSS selector. CSS selector to track the corresponding element
        - `id` integer
        - `mode` 'ID' | 'CLASS' | 'TAG' | 'TAG_CLASS' | 'CUSTOM' | 'AUTOGENERATED' | 'CONTENT' | 'CUSTOM_ATTRIBUTE'
        - `selector` string
      - `url` string — URL of the page on which you want to create your click tracker. Example: www.mozilla.org
    - PageViewsGoalParams — Type of params depends on 'type' field. 'CLICK' - ClickTrackingGoalParams. 'SCROLL' - ScrollTrackingGoalParams. 'URL' - AccessToPageGoalParams. 'TIME_SPENT' - TimeSpentGoalParams. 'PAGE_VIEWS' - PageViewsGoalParams. For others types params aren't needed.
      - `numberMatchType` 'MORE_THAN' | 'EQUALS' | 'LESS_THAN'
      - `numberOfVisitedPages` integer
    - ScrollTrackingGoalParams — Type of params depends on 'type' field. 'CLICK' - ClickTrackingGoalParams. 'SCROLL' - ScrollTrackingGoalParams. 'URL' - AccessToPageGoalParams. 'TIME_SPENT' - TimeSpentGoalParams. 'PAGE_VIEWS' - PageViewsGoalParams. For others types params aren't needed.
      - `type` 'ELEMENT' | 'PERCENTAGE' | 'PIXELS_HEIGHT' — When the user scrolls down to
      - `url` string
      - `value` number, double — Scroll tracking value
    - TimeSpentGoalParams — Type of params depends on 'type' field. 'CLICK' - ClickTrackingGoalParams. 'SCROLL' - ScrollTrackingGoalParams. 'URL' - AccessToPageGoalParams. 'TIME_SPENT' - TimeSpentGoalParams. 'PAGE_VIEWS' - PageViewsGoalParams. For others types params aren't needed.
      - `matchType` 'MORE_THAN' | 'EQUALS' | 'LESS_THAN'
      - `timeSeconds` integer
  - `tags` string[] — Tags being associated with this experiment
  - `trackingTools` string[] — Tracking tools being used in this experiment
  - `type` 'CLICK' | 'CUSTOM' | 'SCROLL' | 'PAGE_VIEWS' | 'URL' | 'TIME_SPENT' | 'RETENTION_RATE' | 'WAREHOUSE' | 'RATIO_METRICS' — Type of goal

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity
- `423` — Locked
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.net/kameleoon/apis/openapi-definition-for-automation-api.md) · [All operations](https://skmtc.net/kameleoon/apis/openapi-definition-for-automation-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kameleoon/openapi-definition-for-automation-api/versions/09f2abcea0b5/schema)
