---
title: "Render a step for one contact"
method: GET
path: "/sequences/{sequence_id}/steps/{step_id}/preview/"
tags: ["sequences"]
---

# Render a step for one contact

`GET /sequences/{sequence_id}/steps/{step_id}/preview/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/sequences/{sequence_id}/steps/{step_id}/preview/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Render one step exactly as one contact would receive it. On an agent-written step this shows the sample already saved for that contact and step when there is one; otherwise the agent writes the contact's whole sequence as a free preview, the way the real first send does, answers with this step and saves the others as samples. With `fresh` it writes the contact's whole sequence again instead of showing what was saved; a thread marked Looks good still shows the words that will send. With `write` false it writes nothing: it shows what is saved, and with nothing saved answers `written` false, as the Builder does when a contact is picked. Each step it writes counts against the workspace's daily preview allowance. Without `mailbox_id`, the sender's variables are filled in as the sequence's first sender's, the sender a preview writes as. With `mix` above 0, a typed step's rotations pick another combination of their versions, to read the email the way other contacts get it; 0 is the contact's own.

## Path parameters

- `sequence_id` string, uuid, required
- `step_id` string, uuid, required

## Query parameters

- `record_id` string, uuid, required
- `mailbox_id` string, uuid, nullable
- `fresh` boolean: Write this contact's messages again rather than show the ones already saved, as when someone asks for the emails to be written again.
- `write` boolean: False shows only what is already written for this contact and never writes or spends a preview; with nothing written the answer has `written` false.
- `mix` integer: 0 shows each rotation's version as this contact gets it; another number picks another combination, as other contacts get it.

## Response `200`

Successful Response

- RenderedMessageReadSchema
  - `agent_written` boolean: The agent wrote this for the contact. A preview is one draft; the real send is written fresh, unless `approved`.
  - `approved` boolean: The words were marked Looks good, with the contact's thread on the AI writing tab or as this one email from the Builder, and still stand, so they are what sends. They stop standing, and the agent writes the step fresh, once the agent's writing or the contact's row changes.
  - `body` string, required
  - `closing` EmailClosingReadSchema: What a send adds below an email's words: the sender's signature, then the opt-out footer.
    - `opt_out_footer` string, nullable, required: The sequence's opt-out footer, last of all, as the email carries it: its unsubscribe link written `[unsubscribe here](url)` in a formatted sequence and as the bare URL in a plain-text one. In a preview the link unsubscribes nobody. Null when the sequence has no footer.
    - `signature` string, nullable, required: The signature the email ends with, its sender variables filled in as the send fills them: the mailbox about to send, or else the first sender, the sender a preview writes as. Null when the sender has none.
  - `in_thread` boolean, required
  - `is_sample` boolean
  - `message_id` string, uuid, nullable: The agent's message these words are, on an agent-written step: the sample on screen, or the one marked Looks good. The looks-good route takes it back as `message_id`, so a mark lands only on the words that were read.
  - `missing_columns` string[], required
  - `pinned` boolean: The words are pinned for this contact by a person (their own edit) or by the approval queue, and send exactly as they are. A thread marked Looks good is `approved` instead.
  - `sample_created_at` string, date-time, nullable
  - `sample_version` integer, nullable
  - `sent` SentStepEmailReadSchema: The email a step got out to one contact, as it went.
    - `body` string, nullable, required: The email's words as they were sent, without the signature and opt-out footer the send added below them.
    - `email_html` string, nullable: The email's HTML part exactly as it was handed to Gmail: the words, the sender's signature and the opt-out footer, every line, blank line and space as the contact got them. Null for a send from before the send kept its email.
    - `sent_at` string, date-time, required
    - `subject` string, nullable, required
  - `spam_findings` SpamFindingReadSchema[]: The spam check and the placeholder scan, run on the agent's words for this contact. Always empty for a written step, whose text the composer's own check covers. Advice, never a refusal.
    - `code` string, required
    - `detail` string, required: The evidence: "3 in the message. One is safest, two at most."
    - `excerpt` string, nullable
    - `excerpts` string[]: Every piece of text the finding is about; excerpt is the first.
    - `message` string, required: Title and detail as one sentence, for a single line.
    - `severity` string, required: warning (likely hurts) or info (worth knowing).
    - `title` string, required: The problem, named: "Too many links".
  - `subject` string, required
  - `waiting_for_approval` boolean: This contact's message at this step waits for a person's approval on its Tasks card, where its words are changed, approved or rejected. Set by the preview route; false once the card is decided, or when the step never asked.
  - `written` boolean: False only when the preview was asked to write nothing and nothing is written for this contact at this step yet: subject and body are empty.

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found.
- `409`: The audience is not configured yet.
- `422`: Invalid request made to the API.
- `429`: Today's free agent-written previews are spent.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
