v93

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01218121759.7 KB
Sequences

Generate sequence (deprecated)

Deprecated compatibility alias that creates and persists a disabled contact_added sequence draft from a goal. Use POST /sequences for new integrations.

post/generate/sequence

Request body

goalstring required

Sequence goal or desired subscriber journey.

namestring

Optional sequence name. Defaults to the normalized goal.

listIdstring

Optional list ID that scopes the contact_added trigger.

emailCountnumber

Number of emails to generate. Defaults to 5. Maximum is 10.

durationDaysnumber

Duration used to space suggested delays. Defaults to 14.

Example request

{
  "goal": "Onboard a new workspace admin",
  "name": "Workspace onboarding",
  "emailCount": 3,
  "durationDays": 7
}

Response

Disabled sequence draft created successfully

successboolean
messagestring
warningsstring[]

Non-blocking advisories about the blocks that were written. The write succeeded. Present when a field was not part of the block schema and was discarded, or when a supported field does not control what its name suggests for that block type - for example styles.backgroundColor on a button colors the band behind the button while the fill comes from buttonColor. Each message names the offending path and the fields that block does accept. A sequence email step update also reports the blocks the step's existing Style > Format added back on top of the submitted blocks, because the response echoes node config rather than the stored blocks. Absent when there is nothing to report.

eventTrackingCodestring

Code snippet returned for custom event triggers.

requiredEventsstring[]
deprecatedtrue
deprecationMessagestring

Example response

{
  "success": true,
  "message": "Sequence created with 2 emails and 1 discount action. Use POST /api/v1/sequences/{id}/enable to activate.",
  "sequence": {
    "id": "seq_abc123",
    "name": "Welcome Sequence",
    "trigger": "trigger_list",
    "emailCount": 2,
    "discountCount": 1,
    "subscriberUpdateCount": 1,
    "nodeCount": 5,
    "enrichmentStatus": "processing",
    "stopCondition": {
      "value": "saas.purchase"
    },
    "sendingWindow": {
      "enabled": true,
      "timezone": "Europe/Kiev",
      "startTime": "08:00",
      "endTime": "20:00",
      "days": [
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday"
      ]
    }
  },
  "warnings": [
    "blocks[0].styles.color is not a supported field and was ignored. Button label color comes from the block-level `buttonTextColor` field. Supported styles fields: backgroundColor, backgroundOpacity, bleed, borderColor, borderRadius, borderWidth, paddingBottom, paddingLeft, paddingRight, paddingTop, textAlign, textColor."
  ],
  "eventTracking": {
    "endpoint": "https://api.sequenzy.com/api/v1/subscribers/events",
    "method": "POST",
    "docsUrl": "https://docs.sequenzy.com/api-reference/subscribers/events/trigger",
    "integrationGuide": {
      "tool": "get_integration_guide",
      "arguments": {
        "use_case": "event_tracking"
      }
    },
    "payloadContract": {
      "propertyFilters": [
        {
          "path": "lineItems[].providerProductId",
          "operator": "equals"
        }
      ]
    },
    "examplePayload": {
      "email": "user@example.com",
      "event": "trial.started",
      "properties": {
        "trial_id": "<trial_id>"
      }
    },
    "examplePayloadMatchesFilters": true
  },
  "deprecationMessage": "POST /api/v1/generate/sequence is deprecated. Use POST /api/v1/sequences with goal-based creation."
}