> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Campaign Goals

> Create and manage persisted conversion goals for a campaign

# Campaign Goals

Campaign goals are the persisted conversion signals shown on a campaign
report. A conversion is attributed when the subscriber was sent the campaign
within the goal's attribution window. When engagement exists, the most recent
click is preferred over the most recent open as the stronger last-touch signal.
Goals appear as named steps after sent, opened, and clicked.

Campaign goals currently support email campaigns only. SMS campaign IDs are
rejected because SMS delivery and attribution use a separate event pipeline.

## Endpoints

* `GET /api/v1/campaigns/{campaignId}/goals` lists goals.
* `POST /api/v1/campaigns/{campaignId}/goals` creates a goal.
* `PATCH /api/v1/campaigns/{campaignId}/goals/{goalId}` updates a goal.
* `DELETE /api/v1/campaigns/{campaignId}/goals/{goalId}` deletes a goal.

Event goals use `triggerType: "event"` and require `triggerEventName`.
Subscriber-attribute goals use `triggerType: "attribute_change"`, an
`attributePath`, and `attributeCondition` set to `changed`, `changed_to`, or
`changed_from_to`. The latter conditions also require the corresponding target
and previous values. Tag goals use `triggerType: "tag_added"` and require
`triggerTagName`.

```json theme={null}
{
  "name": "Recipient signed up",
  "triggerType": "event",
  "triggerEventName": "custom.signup",
  "attributionWindowHours": 168
}
```

For event goals, `eventPropertyName` and `eventPropertyLabel` can track a
numeric property such as revenue. `attributionWindowHours` accepts whole hours
from 1 to 720 and defaults to 168 hours for campaign goals. Both create and
update accept `isActive`, so you can create a goal disabled or pause tracking
later without deleting the goal.

Campaign goal names are unique within each campaign. The same name may be used
by another campaign or by a company-wide or sequence goal. Creating or renaming
a campaign goal to a duplicate name returns `409 Conflict`.

The dashboard attaches these from the campaign **⋯** menu. The CLI exposes
the same operations under `sequenzy campaigns goals`, and MCP clients can use
`list_campaign_goals`, `create_campaign_goal`, `update_campaign_goal`, and
`delete_campaign_goal`.
