---
title: "Create campaign goal"
method: POST
path: "/campaigns/{campaignId}/goals"
tags: ["Campaigns"]
---

# Create campaign goal

`POST /campaigns/{campaignId}/goals`

Creates an event, subscriber-attribute, or tag-applied conversion goal on one email campaign. SMS campaigns are not supported. The attribution window defaults to 168 hours when omitted.

## Path parameters

- `campaignId` string, required

## Request body

- object
  - `name` string, required
  - `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 created 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 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/post.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)
