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

# Get an email message

> Retrieve an email message, including its compiled LMX content.



## OpenAPI

````yaml /openapi.json get /v1/email-messages/{emailMessageId}
openapi: 3.1.0
info:
  title: Loops OpenAPI Spec
  description: This is the OpenAPI Spec for the [Loops API](https://loops.so/docs/api).
  version: 1.20.0
servers:
  - url: https://app.loops.so/api
security: []
tags:
  - name: API key
  - name: Audience segments
    description: View audience segments
  - name: Campaigns
    description: Create and manage email campaigns
  - name: Campaign groups
    description: Organize campaigns into groups
  - name: Components
    description: View email components
  - name: Configuration
    description: View configuration settings
  - name: Contacts
    description: Manage contacts in your audience
  - name: Contact properties
    description: Manage contact properties
  - name: Email messages
    description: Manage email message content for campaigns
  - name: Events
    description: Trigger workflows with events
  - name: Event patterns
    description: View workflow event patterns
  - name: Mailing lists
    description: View mailing lists
  - name: Themes
    description: View email themes
  - name: Transactional emails
    description: Create, manage, and send transactional emails
  - name: Transactional groups
    description: Organize transactional emails into groups
  - name: Uploads
    description: Upload image assets
  - name: Workflows
    description: View and mutate workflow graphs
  - name: Workflow nodes
    description: View and mutate workflow nodes
paths:
  /v1/email-messages/{emailMessageId}:
    parameters:
      - name: emailMessageId
        in: path
        required: true
        description: The ID of the email message.
        schema:
          type: string
    get:
      tags:
        - Email messages
      summary: Get an email message
      description: Retrieve an email message, including its compiled LMX content.
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailMessageResponse'
        '400':
          description: Invalid `emailMessageId` or no sending domain configured.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailMessageFailureResponse'
        '401':
          description: Invalid API key or content API not enabled for this team.
        '404':
          description: Email message not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailMessageFailureResponse'
        '405':
          description: Wrong HTTP request method.
        '409':
          description: Email message uses MJML format or content cannot be parsed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailMessageFailureResponse'
      security:
        - apiKey: []
components:
  schemas:
    EmailMessageResponse:
      type: object
      properties:
        id:
          type: string
          description: The ID of the email message.
        campaignId:
          type: string
          description: >-
            The campaign this email message belongs to. Present only when the
            message belongs to a campaign (mutually exclusive with
            `transactionalId`).
        transactionalId:
          type: string
          description: >-
            The transactional email this email message belongs to. Present only
            when the message belongs to a transactional email (mutually
            exclusive with `campaignId`).
        subject:
          type: string
          description: The email subject.
        previewText:
          type: string
          description: The email preview text.
        fromName:
          type: string
          description: The email sender name.
        fromEmail:
          type: string
          description: The email sender email address.
        replyToEmail:
          type: string
          description: The email reply-to address.
        ccEmail:
          type: string
          description: The email CC address. Only present when set.
        bccEmail:
          type: string
          description: The email BCC address. Only present when set.
        languageCode:
          type: string
          description: Only present when set.
        emailFormat:
          type: string
          enum:
            - styled
            - plain
          description: The rendering format of the email.
        lmx:
          type: string
          description: The email body serialized as LMX.
        contentRevisionId:
          type:
            - string
            - 'null'
          description: >-
            The current content revision. Pass this as `expectedRevisionId` on
            your next update.
        updatedAt:
          type: string
          format: date-time
        contactPropertiesFallbacks:
          type: object
          description: Fallback values for contact properties. Only present when set.
          additionalProperties:
            type: string
        eventPropertiesFallbacks:
          type: object
          description: Fallback values for event properties. Only present when set.
          additionalProperties:
            type: string
        dataVariablesFallbacks:
          type: object
          description: Fallback values for data variables. Only present when set.
          additionalProperties:
            type: string
        warnings:
          type: array
          description: >-
            Non-fatal issues raised while compiling the submitted LMX. Only
            present on update responses when warnings were produced.
          items:
            type: object
            properties:
              rule:
                type: string
              severity:
                type: string
                enum:
                  - warning
              message:
                type: string
              path:
                type: string
            required:
              - rule
              - severity
              - message
      required:
        - id
        - subject
        - previewText
        - fromName
        - fromEmail
        - replyToEmail
        - emailFormat
        - lmx
        - contentRevisionId
        - updatedAt
    EmailMessageFailureResponse:
      type: object
      properties:
        message:
          type: string
      required:
        - message
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

## Related topics

- [Email messages](/docs/cli/email-messages.md)
- [API Introduction](/docs/api-reference/intro.md)
- [Workflows API examples](/docs/api-reference/examples/workflows.md)
- [Get a transactional email](/docs/api-reference/get-transactional-email.md)
- [Run Guardian checks on an email message](/docs/api-reference/run-guardian-checks.md)
