> ## 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.

# Render Sequence Step HTML

> Render one sequence email step to email-ready HTML

Render a single sequence email step to the exact email-safe HTML that would be sent. Use this to show a visual preview of a step inside your own dashboard or email builder.

The render applies everything the send path applies: your email theme and font, company branding and footer, localization, block visibility conditions, product recommendation blocks, and merge tags.

<Note>
  This endpoint is read-only. It requires the `sequences:read` scope and never
  sends or enrolls anyone. It uses `POST` only so personalization input can
  travel in a request body.
</Note>

## Request

<ParamField path="sequenceId" type="string" required>
  Sequence ID.
</ParamField>

<ParamField path="nodeId" type="string" required>
  Email step node ID. Get it from [Get Sequence](/api-reference/sequences/get).
</ParamField>

<ParamField body="subscriberId" type="string">
  Personalize as this stored subscriber. Use this or `subscriber`, not both.
  Because the rendered HTML then carries that subscriber's details, this field
  also requires the `subscribers:read` scope.
</ParamField>

<ParamField body="subscriber" type="object">
  Personalize as an ad-hoc contact that does not need to exist in your account.
  Accepts `email` (required), `firstName`, `lastName`, and `customAttributes`.
  Use this or `subscriberId`, not both.
</ParamField>

<ParamField body="variables" type="object">
  Extra merge variables layered over the contact's attributes.
</ParamField>

<ParamField body="locale" type="string">
  Force a localization locale instead of deriving it from the contact.
</ParamField>

<ParamField body="variantId" type="string">
  Render a specific A/B test variant. Required when the step is an A/B test
  step.
</ParamField>

<ParamField body="tracking" type="boolean" default="false">
  Apply your company's auto-UTM link decoration, as a real send would. Defaults
  to `false` so the preview shows your own clean URLs.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/sequences/seq_abc123/nodes/node_1/render" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "subscriberId": "sub_abc123" }'
```

## What is not in the HTML

Per-send click-redirect wrapping, the open tracking pixel, and unsubscribe click tracking are applied at send time against a real email send record, so they are never present in the returned HTML. The `tracking` flag controls auto-UTM decoration only.

Discount codes minted per enrollment are also absent, because a preview has no enrollment to mint against.

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "html": "<!DOCTYPE html><html>...</html>",
    "subject": "Day 1: getting started",
    "previewText": "Your first steps",
    "locale": "en",
    "personalized": true,
    "trackingApplied": false,
    "entity": {
      "type": "sequence_step",
      "id": "node_1",
      "variantId": null
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Sequence step is not an email step"
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Unauthorized"
  }
  ```

  ```json 403 theme={null}
  {
    "error": "API key is missing required scope: subscribers:read"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Sequence step not found"
  }
  ```
</ResponseExample>
