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

# Get email

> **Endpoint:** `v1/emails/{id}`

Retrieve the status and details of a specific email




## OpenAPI

````yaml api-reference/openapi.yml get /emails/{id}
openapi: 3.1.0
info:
  title: Send Email API
  description: >
    Send transactional emails through MailDiver.


    ### Base URL

    All API endpoints are prefixed with `api.` subdomain:

    ```

    https://api.maildiver.com

    ```


    For the self-hosted version, if your domain is `example.com`:

    ```

    https://api.example.com

    ```


    ### Endpoint

    ```

    v1/emails

    ```


    ### Authentication

    All API requests require authentication using your API key in the
    Authorization header:

    ```

    Authorization: Bearer your-api-key

    ```
  version: 1.0.0
  license:
    name: MIT
servers:
  - url: https://api.maildiver.com/v1
    description: Production server
    variables:
      domain:
        default: yourdomain.com
        description: Your domain (without the api. prefix)
security:
  - bearerAuth: []
paths:
  /emails/{id}:
    get:
      tags:
        - Email
      summary: Get email
      description: |
        **Endpoint:** `v1/emails/{id}`

        Retrieve the status and details of a specific email
      operationId: getEmail
      parameters:
        - name: id
          in: path
          required: true
          description: Unique identifier of the email
          schema:
            type: string
          example: 0195b357-d03d-754e-8ccd-8254807df021
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                id: 0195c9e3-5067-741d-be87-a4f75ef93372
                type: transactional
                to:
                  - recipient@company.com
                subject: 'Your Order Confirmation #12345'
                template_id: null
                domain_id: 0195b357-d03d-754e-8ccd-8254807df021
                html: >-
                  <!DOCTYPE html><html><body><h1>Order
                  Confirmation</h1>...</body></html>
                text: 'Order Confirmation\n\nThank you for your order #12345...'
                from: Support Team <support@company.com>
                email_sent_timestamp: 1709225600000
                last_event:
                  link: https://company.com/order/12345
                  recipient: recipient@company.com
                  user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
                  status: clicked
                  timestamp: 1709225720000
                  ip: 192.0.2.1
                recipient_statuses:
                  - recipient: recipient@company.com
                    events:
                      - status: sent
                        timestamp: 1742139519852
                      - status: delivered
                        timestamp: 1742139520744
                      - status: opened
                        timestamp: 1742139523114
                        ip: 192.0.2.2
                        user_agent: Amazon CloudFront
                      - status: clicked
                        timestamp: 1742139613070
                        ip: 192.0.2.1
                        user_agent: Amazon CloudFront
        '403':
          description: Forbidden (API key is missing or invalid)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Email not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error description
      description: |
        Error response with message.

        ### Common Errors

        #### 400 Bad Request
        Validation errors return only the error message:
        ```json
        {
          "message": "from field is required"
        }
        ```

        Common validation messages:
        - `"from field is required"`
        - `"to field is required"`
        - `"subject field is required"`
        - `"html content size (42MB) exceeds maximum of 40MB"`
        - `"Too many recipients: 51. Maximum allowed is 50"`
        - `"Invalid email format in from field"`
        - `"template_id cannot be used together with html"`

        #### 403 Forbidden
        Authentication errors include both message and code:
        ```json
        {
          "message": "Invalid API key",
          "code": "invalid_api_key"
        }
        ```
        ```json
        {
          "message": "Invalid authorization header",
          "code": "invalid_authorization_header"
        }
        ```

        #### 404 Not Found
        ```json
        {
          "message": "Template 'welcome-email' not found"
        }
        ```
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with format "Bearer {your-api-key}"

````