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

# Get an email submission

> Retrieve a single email submission from the Terminal49 API, including parsed sender metadata, attached documents, and reference linking results.



## OpenAPI

````yaml get /email_submissions/{id}
openapi: 3.0.0
info:
  title: Terminal49 API Reference
  version: 0.2.0
  contact:
    name: Terminal49 API support
    url: https://www.terminal49.com
    email: support@terminal49.com
  description: >-
    The Terminal 49 API offers a convenient way to programmatically track your
    shipments from origin to destination.


    Please enter your API key into the "Variables" tab before using these
    endpoints within Postman.
  x-label: Beta
  termsOfService: https://www.terminal49.com/terms
servers:
  - url: https://api.terminal49.com/v2
    description: Production
security:
  - authorization: []
tags:
  - name: Containers
  - name: Custom Field Definitions
  - name: Custom Field Options
  - name: Custom Fields
  - name: Shipments
  - name: Locations
  - name: Events
  - name: Tracking Requests
  - name: Webhooks
  - name: Webhook Notifications
  - name: Ports
  - name: Metro Areas
  - name: Terminals
  - name: Routing (Paid)
  - name: Documents
  - name: Email Submissions
  - name: Document Schemas
  - name: Search
paths:
  /email_submissions/{id}:
    get:
      tags:
        - Email Submissions
      summary: Get an email submission
      operationId: get-email_submissions-id
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: include
          schema:
            type: string
          description: >-
            Allowed: account, user, documents,
            documents.last_document_representation. Defaults to documents +
            documents.last_document_representation.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/email_submission'
                  included:
                    type: array
                    items:
                      anyOf:
                        - $ref: '#/components/schemas/account'
                        - a0f53b84-89e9-4a9b-95d3-8604b3ae1c08
                        - $ref: '#/components/schemas/email_submission_document'
                        - $ref: '#/components/schemas/document_representation'
                  links:
                    $ref: '#/components/schemas/link-self'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/error'
              examples:
                email_submission_not_found:
                  summary: Email submission not found
                  value:
                    errors:
                      - status: '404'
                        title: Not Found
                        detail: Couldn't find EmailSubmission
components:
  schemas:
    email_submission:
      title: Email Submission
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - email_submission
        attributes:
          type: object
          properties:
            subject:
              type: string
              description: Email subject line.
            body:
              type: string
              nullable: true
              description: Email body content captured from the inbound message.
            from:
              type: array
              items:
                type: string
              description: Sender email addresses.
            to:
              type: array
              items:
                type: string
              description: Primary recipient email addresses.
            cc:
              type: array
              items:
                type: string
              description: CC recipient email addresses.
            sent_at:
              type: string
              format: date-time
              nullable: true
              description: Timestamp from the inbound email header.
            message_id:
              type: string
              nullable: true
              description: Message-ID header value.
            in_reply_to:
              type: string
              nullable: true
              description: In-Reply-To header value.
            references:
              type: array
              items:
                type: string
              description: References header values.
            content_type:
              type: string
              nullable: true
              description: Top-level MIME content type of the inbound email.
            documents_count:
              type: integer
              description: Number of non-discarded documents created from this email.
            created_at:
              type: string
              format: date-time
              description: When the email submission record was created.
            updated_at:
              type: string
              format: date-time
              description: When the email submission record was last updated.
        relationships:
          type: object
          properties:
            account:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    type:
                      type: string
                      enum:
                        - account
            user:
              type: object
              properties:
                data:
                  type: object
                  nullable: true
                  properties:
                    id:
                      type: string
                      format: uuid
                    type:
                      type: string
                      enum:
                        - user
            documents:
              type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      type:
                        type: string
                        enum:
                          - document
        links:
          type: object
          properties:
            self:
              type: string
      required:
        - id
        - type
    account:
      title: Account model
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - account
        attributes:
          type: object
          required:
            - company_name
          properties:
            company_name:
              type: string
      required:
        - id
        - type
        - attributes
      x-examples: {}
    email_submission_document:
      title: Email Submission Document
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - document
        attributes:
          type: object
          properties:
            name:
              type: string
            source:
              type: string
              enum:
                - upload
                - api
                - email
                - split_document
            document_type:
              type: string
            created_at:
              type: string
              format: date-time
            updated_at:
              type: string
              format: date-time
        relationships:
          type: object
          properties:
            last_document_representation:
              type: object
              properties:
                data:
                  type: object
                  nullable: true
                  properties:
                    id:
                      type: string
                      format: uuid
                    type:
                      type: string
                      enum:
                        - document_representation
      required:
        - id
        - type
    document_representation:
      title: Document Representation
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - document_representation
        attributes:
          type: object
          properties:
            schema_version:
              type: string
            payload:
              type: object
              additionalProperties: true
            created_at:
              type: string
              format: date-time
            updated_at:
              type: string
              format: date-time
      required:
        - id
        - type
    link-self:
      title: link
      type: object
      properties:
        self:
          type: string
          format: uri
    error:
      title: Error model
      type: object
      properties:
        detail:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        source:
          type: object
          nullable: true
          properties:
            pointer:
              type: string
              nullable: true
            parameter:
              type: string
              nullable: true
        code:
          type: string
          nullable: true
        status:
          type: string
          nullable: true
        meta:
          type: object
          nullable: true
          additionalProperties: true
      required:
        - title
  securitySchemes:
    authorization:
      name: Authorization
      type: apiKey
      in: header
      description: >-
        Use a Terminal49 API key in the `Authorization` header with the `Token`
        prefix.


        `Authorization: Token YOUR_API_KEY`

````