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

# List Emails

> Allows you to search for emails in the system. You can filter the search using query parameters, and the search will return emails that match the specified criteria.



## OpenAPI

````yaml GET /public/emails
openapi: 3.0.3
info:
  title: RevyOps API
  version: 1.0.0
servers: []
security: []
paths:
  /public/emails:
    get:
      tags:
        - public
      description: >-
        Allows you to search for emails in the system. You can filter the search
        using query parameters, and the search will return emails that match the
        specified criteria.
      operationId: Search for emails
      parameters:
        - in: query
          name: campaign_id
          schema:
            type: string
          description: Filter emails by campaign ID
        - in: query
          name: contact_email
          schema:
            type: string
          description: Filter emails by contact email
        - in: query
          name: origin
          schema:
            type: string
          description: Filter emails by origin
        - in: query
          name: subject
          schema:
            type: string
          description: Filter emails by subject
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EmailModel'
          description: The list of emails was successfully retrieved.
        '403':
          description: Forbidden. Missing authentication credentials or invalid API key.
        '500':
          description: Internal Server Error. An unexpected error occurred on the server.
components:
  schemas:
    EmailModel:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        email_timestamp:
          type: string
          format: date-time
        contact_email:
          type: string
          format: email
        contact_id:
          type: integer
        agent_email:
          type: string
          format: email
        email_type:
          type: string
        subject:
          type: string
        body_text:
          type: string
        body_html:
          type: string
        campaign_id:
          type: string
        campaign_name:
          type: string
        interested:
          type: boolean
        origin:
          type: string
        custom_fields:
          type: array
          items:
            $ref: '#/components/schemas/EmailCustomFields'
      required:
        - email_type
        - id
        - origin
        - updated_time
    EmailCustomFields:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        updated_time:
          type: string
          format: date-time
          readOnly: true
        field_name:
          type: string
        field_value:
          type: string
          maxLength: 2500
      required:
        - field_name
        - field_value
        - id
        - updated_time

````