> ## 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.

# List workflow emails

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

List all emails sent by a specific workflow across all executions. Returns up to 50 emails per page.




## OpenAPI

````yaml api-reference/openapi.yml get /workflows/{id}/emails
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:
  /workflows/{id}/emails:
    get:
      tags:
        - Automation Execution
      summary: List workflow emails
      description: >
        **Endpoint:** `v1/workflows/{id}/emails`


        List all emails sent by a specific workflow across all executions.
        Returns up to 50 emails per page.
      operationId: listWorkflowEmails
      parameters:
        - name: id
          in: path
          required: true
          description: Unique identifier of the workflow
          schema:
            type: string
          example: 0199f234-d327-7cd8-9dc5-4fd8e5e249df
        - name: cursor
          in: query
          required: false
          description: >
            Pagination cursor for fetching the next page of results. This is a
            base64-encoded string returned from the previous response.
          schema:
            type: string
            nullable: true
          example: >-
            eyJQSyI6IkVNIzAxOTVhOTI3IiwiU0siOiJFTSMwMTk1YzllMyIsIkdTSTRQSyI6IkVNI1dGSSMwMTk5ZjIzNCIsIkdTSTRTSyI6IkVNIzAxOTVjOWUzIn0=
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                success:
                  summary: Success response
                  value:
                    emails:
                      - email_id: 0195c9e3-5067-741d-be87-a4f75ef93372
                        subject: Welcome to Our Platform
                        recipient: user@example.com
                        created_at: 1742843423033
                        updated_at: 1742843424100
                        events:
                          - status: sent
                            timestamp: 1742843423033
                          - status: delivered
                            timestamp: 1742843424147
                        workflow_id: 0199f234-d327-7cd8-9dc5-4fd8e5e249df
                        execution_id: 0195c9e3-5067-741d-be87-a4f75ef93373
                      - email_id: 0195c413-3fe1-779d-804e-f5f9bd8cd523
                        subject: Getting Started Guide
                        recipient: customer@example.com
                        created_at: 1742751354368
                        updated_at: 1742751355200
                        events:
                          - status: sent
                            timestamp: 1742751354368
                          - status: delivered
                            timestamp: 1742751354893
                          - status: opened
                            timestamp: 1742751400123
                        workflow_id: 0199f234-d327-7cd8-9dc5-4fd8e5e249df
                        execution_id: 0195c413-3fe1-779d-804e-f5f9bd8cd524
                    count: 2
                    cursor: null
        '403':
          description: Forbidden (API key is missing or invalid)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              examples:
                serverError:
                  summary: Failed to get workflow emails
                  value:
                    error: Failed to get workflow emails
                    details: Error details
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}"

````