> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Conditional Block Stats

> Retrieve per-block if/else and show/hide branch splits, engagement rates, and conversions for conditional blocks inside an email.

Returns per-block branch splits (`if`/`else` for conditional groups, `shown`/`hidden` for per-block display rules), delivery, open, click, unsubscribe, bounce, complaint, and goal conversion metrics for conditional blocks inside an email.

The same breakdown is available for all three email sources (canonical `/api/v1/metrics/...` paths require `analytics:read`; resource aliases require the resource's read scope):

* **Campaigns**: `GET /api/v1/metrics/campaigns/{campaignId}/conditional-blocks` (alias: `GET /api/v1/campaigns/{campaignId}/conditional-blocks`, scope `campaigns:read`)
* **Sequence overview (all email steps)**: `GET /api/v1/metrics/sequences/{sequenceId}/conditional-blocks` (alias: `GET /api/v1/sequences/{sequenceId}/conditional-blocks`, scope `sequences:read`)
* **Sequence email or A/B steps**: `GET /api/v1/metrics/sequences/{sequenceId}/steps/{nodeId}/conditional-blocks` (alias: `GET /api/v1/sequences/{sequenceId}/steps/{nodeId}/conditional-blocks`, scope `sequences:read`)
* **Transactional emails**: `GET /api/v1/metrics/transactional/{idOrSlug}/conditional-blocks` (alias: `GET /api/v1/transactional/{idOrSlug}/conditional-blocks`, scope `transactional:read`)

## Path Parameters

**campaignId** `string` *required*

Campaign ID (for campaign routes). Sequence step routes take `sequenceId` and
`nodeId`; transactional routes take `idOrSlug`.

## Query Parameters

**abTestVariantId** `string`

Optional A/B test variant ID for campaign or sequence A/B step sends.

**goalId** `string`

Optional goal ID (or `default-revenue`) to filter attributed conversions and
`trackedValue`. Omit to return deduplicated conversions across all goals.

**period** `string`

Send window (`1h`, `24h`, `7d`, `30d`, `90d`, or `all`). Defaults to `all` for
campaigns and `30d` for sequence steps and transactional emails. Ignored when
`start` and `end` are provided.

**start** `string`

ISO 8601 start of send window. Must be used with `end`.

**end** `string`

ISO 8601 end of send window. Must be used with `start` (max 90 days).

**includeMachineEngagement** `boolean` (default: false)

Include machine-classified scanner and privacy-proxy opens and clicks.

## Response highlights

* `conditionGroups`: Sibling conditional blocks that share the exact same condition rule are collapsed into one group (for example, a heading, paragraph, and button gated by the same setup-state rule appear as one row with `blockCount: 3`, `representativeBlockId`, `ctaLabel`, `snippetLines`, and `previewVersionIndex`). The raw per-block array stays available in `blocks`.
* `baseline` and branch deltas: Each branch includes `openRateDeltaPts`, `clickRateDeltaPts`, and `conversionRateDeltaPts` (percentage-point difference against the email's recorded-send average, null below 5 sends), plus `topClickedLink` (normalized URL and unique send clicks).
* `alerts`: Automatic warnings when a rule never matched in 50+ sends (`never_matched`), an `is empty` fallback fired on 35%+ of 50+ sends (`empty_state_spike`), an if/else group sent 90%+ of sends to Otherwise (`lopsided_else`), or 10%+ of sends failed closed (`fail_closed_spike`).

## Coverage and caveats

* `totalSends`, `recordedSends`, `untrackedSends`, and `trackingSince` tell you
  whether earlier sends predate conditional block tracking. Manually retried
  sends are also counted in `untrackedSends` because branch decisions are
  captured during the original send.
* `skippedSends` counts sends where a nested conditional block was not evaluated
  because its outer branch did not match.
* `notInVersionSends` counts recorded sends that did not include the block (for
  example, another A/B variant, localization, or a block added later).
* `failClosedSends` counts sends where server-evaluated subscriber rules could
  not be checked at send time and fell back to **Otherwise**.
* Blocks removed from the email after sending still appear with `inEmail: false`.
  Conditional blocks inside a `repeat` block are listed with `insideRepeat: true`
  and `tracked: false`.

## Errors

* `400`: Invalid `period`, date range, `includeMachineEngagement` flag, or a
  non-email sequence step.
* `401`: Missing or invalid API key.
* `404`: The campaign, sequence step, A/B variant, or transactional email does
  not exist or is hidden from your role.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.