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

# PreviewEmailAPI renders the final email at phone and desktop widths without


> sending it. The email service scopes template resolution to the caller org.




## OpenAPI

````yaml /api/openapi.json post /v1/email/preview
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, experiments, and bounded outreach.
    Authenticate with a Bearer API key (erdo_api_...) or scoped token
    (erdo_token_...).
  version: '2026-11-21'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/email/preview:
    post:
      summary: >
        PreviewEmailAPI renders the final email at phone and desktop widths
        without
      description: >
        sending it. The email service scopes template resolution to the caller
        org.
      operationId: POST:mcp.PreviewEmailAPI
      requestBody:
        content:
          application/json:
            schema:
              properties:
                body:
                  type: array
                  items:
                    additionalProperties: {}
                    type: object
                  nullable: true
                data:
                  type: object
                  additionalProperties: {}
                  nullable: true
                html_content:
                  type: string
                plain_text:
                  type: string
                preheader:
                  type: string
                subject:
                  type: string
                template_slug:
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  images:
                    items:
                      $ref: '#/components/schemas/mcp.PreviewEmailAPIImage'
                    type: array
                  plain_text:
                    type: string
                  subject:
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    mcp.PreviewEmailAPIImage:
      properties:
        png_base64:
          type: string
        width:
          format: int64
          type: integer
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````

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