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

# Show the message one person gets at one email or LinkedIn step, with their fields and personalized lines filled in: subject, body, sender, recipient, merge fields still missing, warnings, and why the step would be skipped. Nothing is sent, prepared or charged

> Show the message one person gets at one email or LinkedIn step, with their fields and personalized lines filled in: subject, body, sender, recipient, merge fields still missing, warnings, and why the step would be skipped. Nothing is sent, prepared or charged.



## OpenAPI

````yaml /api-reference/openapi.json get /campaigns/{sequenceId}/preview
openapi: 3.1.0
info:
  title: Dench API
  version: 1.0.0
  description: >-
    Versioned Dench workspace API. The operation registry is shared with the
    Dench CLI parity layer, so every CLI command maps to an endpoint here.
servers:
  - url: https://www.dench.com/api/v1
security: []
tags:
  - name: agent-config
    description: Agent Config operations.
  - name: approvals
    description: Approvals operations.
  - name: apps
    description: Apps operations.
  - name: auth
    description: Auth operations.
  - name: billing
    description: Billing operations.
  - name: browser
    description: Browser operations.
  - name: campaigns
    description: Campaigns operations.
  - name: chat
    description: Chat operations.
  - name: crm
    description: Crm operations.
  - name: email
    description: Email operations.
  - name: files
    description: Files operations.
  - name: gateway
    description: Gateway operations.
  - name: lists
    description: Lists operations.
  - name: local
    description: Local operations.
  - name: meetings
    description: Meetings operations.
  - name: members
    description: Members operations.
  - name: memory
    description: Memory operations.
  - name: meta
    description: Meta operations.
  - name: notifications
    description: Notifications operations.
  - name: routines
    description: Routines operations.
  - name: settings
    description: Settings operations.
  - name: workspace
    description: Workspace operations.
paths:
  /campaigns/{sequenceId}/preview:
    get:
      tags:
        - campaigns
      summary: >-
        Show the message one person gets at one email or LinkedIn step, with
        their fields and personalized lines filled in: subject, body, sender,
        recipient, merge fields still missing, warnings, and why the step would
        be skipped. Nothing is sent, prepared or charged
      description: >-
        Show the message one person gets at one email or LinkedIn step, with
        their fields and personalized lines filled in: subject, body, sender,
        recipient, merge fields still missing, warnings, and why the step would
        be skipped. Nothing is sent, prepared or charged.
      operationId: campaigns_preview
      parameters:
        - name: sequenceId
          in: path
          required: true
          schema:
            type: string
        - name: enrollmentId
          in: query
          required: true
          schema:
            type: string
            description: The person to preview, from dench campaign people.
          description: The person to preview, from dench campaign people.
        - name: stepId
          in: query
          required: true
          schema:
            type: string
            description: >-
              An email or LinkedIn step, its _id from campaigns.get steps[]. A
              wait step sends nothing.
          description: >-
            An email or LinkedIn step, its _id from campaigns.get steps[]. A
            wait step sends nothing.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  channel:
                    type: string
                    enum:
                      - email
                      - linkedin
                  subject:
                    description: Email steps.
                    type: string
                  textBody:
                    description: 'Email steps: plain text.'
                    type: string
                  htmlBody:
                    description: 'Email steps: HTML.'
                    type: string
                  messageBody:
                    description: >-
                      LinkedIn steps: the note or message, or a line saying no
                      note or message is sent.
                    type: string
                  fromName:
                    description: The sending account.
                    type: string
                  fromEmail:
                    type: string
                  toName:
                    type: string
                  toEmail:
                    type: string
                  missingFields:
                    type: array
                    items:
                      type: string
                    description: >-
                      {{merge fields}} this person has no value for; fill them
                      with campaigns.people.setField.
                  warnings:
                    type: array
                    items:
                      type: string
                  skippedReason:
                    description: >-
                      Set when the person would skip this step, e.g. no email
                      address.
                    type: string
                  highlights:
                    type: array
                    items:
                      type: string
                  personalized:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                          description: The line's {{key}}.
                        label:
                          type: string
                        value:
                          type: string
                          description: >-
                            What this person gets: the written line, or the
                            fallback.
                        state:
                          type: string
                          enum:
                            - written
                            - edited
                            - writing
                            - paused
                            - fallback
                            - not_written
                          description: >-
                            written or edited: the line is final. fallback:
                            nothing specific was found, so the fallback is used.
                            writing, paused and not_written: the fallback shows
                            until the line is written.
                        source:
                          description: What the line was written from.
                          type: string
                          enum:
                            - company
                            - news
                            - signal
                            - profile
                            - fallback
                        maxChars:
                          type: number
                        rewriting:
                          description: A new line is being written over the current one.
                          type: string
                          enum:
                            - writing
                            - paused
                      required:
                        - key
                        - label
                        - value
                        - state
                        - maxChars
                      additionalProperties: {}
                required:
                  - channel
                  - toName
                  - missingFields
                  - warnings
                additionalProperties: {}
              example:
                channel: email
                subject: A quicker question, Grace
                textBody: >-
                  Hi Grace,


                  Your team at Acme is hiring senior engineers. We place them in
                  your time zone within two weeks.


                  Worth a chat?
                htmlBody: >-
                  <p>Hi Grace,</p><p>Your team at Acme is hiring senior
                  engineers. We place them in your time zone within two
                  weeks.</p><p>Worth a chat?</p>
                fromName: Ada Lovelace
                fromEmail: ada@example.com
                toName: Grace Hopper
                toEmail: grace@acme.com
                missingFields: []
                warnings: []
                personalized:
                  - key: companyHook
                    label: Company hook
                    value: Acme is hiring senior engineers.
                    state: written
                    source: company
                    maxChars: 160
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - DenchApiKey: []
        - AgentSession: []
components:
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Operation or resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  schemas:
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
            - code
          properties:
            message:
              type: string
            type:
              type: string
            code:
              type: string
            details: {}
  securitySchemes:
    DenchApiKey:
      type: http
      scheme: bearer
      bearerFormat: DENCH_API_KEY
      description: >-
        Workspace-scoped Dench API key from workspace settings. This is the same
        key used by DENCH_API_KEY in sandboxes.
    AgentSession:
      type: http
      scheme: bearer
      bearerFormat: dch_agent_*
      description: >-
        Agent session token created by `dench signin`. Gateway-backed routes
        exchange this token for the workspace gateway key.

````

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