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

# Download Sent Email Original

> Returns the original message of an email sent through the API as an `.eml` file (`message/rfc822`), with all of its headers (including the DKIM signature) and MIME parts exactly as it was sent. The file is named after the email's `Message-ID`. Replies sent through the API are emails too and work the same way.

The original is available for about 30 days after the email was sent. Download it within that time and it stays available after that. A `scheduled` email has no original until it goes out.



## OpenAPI

````yaml /openapi.yml get /api/v2/email/raw/
openapi: 3.1.1
info:
  title: DeliverymanAI API
  version: 2.0.0
  description: >-
    API documentation for DeliverymanAI. Send emails, track their delivery and
    engagement, read replies, verify addresses, manage your suppression list and
    receive webhook events.


    **Strongly recommended:** leave 5 to 10 minutes between emails sent from the
    same domain. Sending many emails from one domain in a short time can hurt
    your domain and IP reputation.


    **Rate limits:** emails from one sending domain go out at least a minimum
    interval apart. If you send sooner, the email is queued and `Send Email`
    returns `202`. Each endpoint also caps how many requests your account can
    make per minute. Over the cap you get `429` with a `Retry-After` header.
    Treat these limits as an upper bound and keep to the gap recommended above.
servers:
  - url: https://api.deliveryman.ai
    description: Deliveryman API Server
security: []
paths:
  /api/v2/email/raw/:
    get:
      tags:
        - Email
      summary: Download Sent Email Original
      description: >-
        Returns the original message of an email sent through the API as an
        `.eml` file (`message/rfc822`), with all of its headers (including the
        DKIM signature) and MIME parts exactly as it was sent. The file is named
        after the email's `Message-ID`. Replies sent through the API are emails
        too and work the same way.


        The original is available for about 30 days after the email was sent.
        Download it within that time and it stays available after that. A
        `scheduled` email has no original until it goes out.
      operationId: v2_download_sent_email_original
      parameters:
        - in: query
          name: message_id
          schema:
            maxLength: 40
            minLength: 1
            title: Message Id
            type: string
          description: The `message_id` returned by `Send Email`.
          required: true
      responses:
        '200':
          content:
            message/rfc822:
              schema:
                type: string
                format: binary
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
          description: Email or Original Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: bash
          label: curl
          source: >-
            curl
            "https://api.deliveryman.ai/api/v2/email/raw/?message_id=em_070162768f253c26c8e644de"
            \
              -H "X-Api-Key: YOUR_API_KEY"
components:
  schemas:
    MessageResponse:
      type: object
      description: A message describing the result of the request, or what went wrong.
      properties:
        message:
          type: string
          description: Human readable description of the result or error.
      required:
        - message
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Your API key, sent as the value of the `X-Api-Key` header. In the
        dashboard, go to Integrations and open Deliveryman API Keys to create
        one.

````

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