Endpoints
GET /api/v1/campaigns/{campaignId}/goalslists goals.POST /api/v1/campaigns/{campaignId}/goalscreates a goal.PATCH /api/v1/campaigns/{campaignId}/goals/{goalId}updates a goal.DELETE /api/v1/campaigns/{campaignId}/goals/{goalId}deletes a goal.
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.
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.
Company-wide goals from Settings
GET /api/v1/campaigns/{campaignId}/goals returns two arrays:
goals: Goals created specifically for this campaign. Existing update and delete routes apply to these IDs.companyGoals: Company-wide goals created in Settings. They apply automatically across emails, including this campaign, so you do not select or copy them. They retainscope: "company",campaignId: null, their trigger, attribution window, and active state. Both arrays include inactive goals and are empty when no matching goals exist.
sequenzy campaigns goals and list_campaign_goals expose the same definitions. Restricted members cannot read company-wide Settings goals. Use the campaign metrics endpoint to inspect attributed campaign results.
Reads require a valid API key and existing campaign read permissions. Missing or invalid authentication returns 401; insufficient scopes or role returns 403; unknown or other-company campaigns return 404; SMS campaigns return 400. Transient database failures can return 503. Retry a failed read; listing goals has no write side effects.