---
title: "Create sequence goal"
method: POST
path: "/sequences/{sequenceId}/goals"
tags: ["Sequences"]
---

# Create sequence goal

`POST /sequences/{sequenceId}/goals`

Creates a conversion goal for an event or subscriber attribute change.

## Path parameters

- `sequenceId` string, required

## Request body

- object
  - `name` string, required
  - `description` string, nullable
  - `triggerType` 'event' | 'attribute_change'
  - `triggerEventName` 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`

Sequence goal created successfully

- object
  - `success` boolean
  - `goal` SequenceGoal
    - `id` string
    - `automationId` string
    - `name` string
    - `description` string, nullable
    - `triggerType` 'event' | 'attribute_change'
    - `triggerEventName` string
    - `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` — Sequence not found

---

[API](https://skmtc.net/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.net/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/versions/af1cf9620482/schema)
