---
title: "Update campaign goal"
method: PATCH
path: "/campaigns/{campaignId}/goals/{goalId}"
tags: ["Campaigns"]
---

# Update campaign goal

`PATCH /campaigns/{campaignId}/goals/{goalId}`

Replaces the editable configuration for an existing email-campaign goal. SMS campaigns are not supported.

## Path parameters

- `campaignId` string, required
- `goalId` string, required

## Request body

- CampaignGoalInput
  - `name` string
  - `description` string, nullable
  - `triggerType` 'event' | 'attribute_change' | 'tag_added'
  - `triggerEventName` string, nullable
  - `triggerTagName` string, nullable
  - `attributePath` string, nullable
  - `attributeCondition` 'changed' | 'changed_to' | 'changed_from_to', nullable
  - `attributeValue` string, nullable
  - `attributePreviousValue` string, nullable
  - `eventPropertyName` string, nullable
  - `eventPropertyLabel` string, nullable
  - `attributionWindowHours` integer
  - `isActive` boolean

## Response `200`

Campaign goal updated successfully

- object
  - `success` boolean
  - `goal` CampaignGoal
    - `id` string
    - `campaignId` string
    - `scope` 'campaign'
    - `name` string
    - `description` string, nullable
    - `triggerType` 'event' | 'attribute_change' | 'tag_added'
    - `triggerEventName` string
    - `triggerTagName` string, nullable
    - `attributePath` string, nullable
    - `attributeCondition` 'changed' | 'changed_to' | 'changed_from_to', nullable
    - `attributeValue` string, nullable
    - `attributePreviousValue` string, nullable
    - `eventPropertyName` string, nullable
    - `eventPropertyLabel` string, nullable
    - `attributionWindowHours` integer
    - `isActive` boolean

## Other responses

- `400` — Validation error
- `404` — Campaign goal not found
- `409` — A goal with this name already exists for the campaign

## Changes

- **2026-08-26** `11b6d27ba1de` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/campaigns/:campaignId/goals/:goalId/patch.md)

---

[API](https://skmtc.dev/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.dev/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/revisions/73f826277d9a/schema)
