Skip to main content
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.
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.

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 retain scope: "company", campaignId: null, their trigger, attribution window, and active state. Both arrays include inactive goals and are empty when no matching goals exist.
Company-wide custom goals credit an email after a qualifying open or click within their configured window. Campaign-specific goals can also credit a send without an open or click. Creating a campaign goal with the same trigger creates separate tracking; it does not attach the Settings goal. Manage company-wide goals in Settings. The dashboard lists company-wide goals separately, and 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.