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

# List collection case messages

> Retrieve the emails sent and received on a collection case, oldest first.



## OpenAPI

````yaml get /v1/collections/cases/{id}/messages
openapi: 3.1.0
info:
  title: Hyperline API
  version: 0.0.0
servers:
  - url: https://api.hyperline.co
  - url: https://sandbox.api.hyperline.co
security: []
paths:
  /v1/collections/cases/{id}/messages:
    get:
      tags:
        - Collections > Cases
      summary: List collection case messages
      description: >-
        Retrieve the emails sent and received on a collection case, oldest
        first.
      operationId: listCollectionCaseMessages
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionCaseMessageList'
        '403':
          description: Collections is not enabled on the account
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '404':
          description: Case not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - bearer: []
components:
  schemas:
    CollectionCaseMessageList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CollectionCaseMessage'
          description: Messages of the case, oldest first.
      required:
        - data
    CollectionCaseMessage:
      type: object
      properties:
        id:
          type: string
          description: ID of the case activity the message is logged on.
        direction:
          type: string
          enum:
            - outbound
            - inbound
          description: '`outbound` for an email we sent, `inbound` for a reply.'
        actor_type:
          type: string
          enum:
            - agent
            - user
            - customer
            - system
          description: Who made the change.
        actor_id:
          type:
            - string
            - 'null'
          description: >-
            ID of the actor: the user ID for a user, the agent or sender ID for
            the agent, the email address for a customer.
        email_id:
          type:
            - string
            - 'null'
          description: ID of the sent email. `null` on an inbound message.
        from:
          type:
            - string
            - 'null'
          description: Sender email address.
        from_name:
          type:
            - string
            - 'null'
          description: Sender name.
        to:
          type: array
          items:
            type: string
          description: Recipient email addresses.
        cc:
          type: array
          items:
            type: string
          description: Copied email addresses.
        subject:
          type:
            - string
            - 'null'
          description: Subject of the email.
        text:
          type:
            - string
            - 'null'
          description: Text of the email, without the quoted history.
        invoice_ids:
          type: array
          items:
            type: string
          description: IDs of the invoices the email is about.
        attachment_file_ids:
          type: array
          items:
            type: string
          description: IDs of the attached files.
        flags:
          type: array
          items:
            type: string
            enum:
              - auto_reply
              - bounce
              - contact_gone
              - auth_failed
              - teammate
          description: >-
            What was detected in an inbound email: out of office, promise to
            pay, dispute…
        sender:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
              description: ID of the sender profile.
            display_name:
              type: string
              description: Display name of the sender profile.
          required:
            - id
            - display_name
          description: Sender profile an outbound email was sent as.
        created_at:
          type: string
          format: date-time
          description: Date of the message.
          example: '2024-12-20T16:04:11Z'
      required:
        - id
        - direction
        - actor_type
        - actor_id
        - email_id
        - from
        - from_name
        - to
        - cc
        - subject
        - text
        - invoice_ids
        - attachment_file_ids
        - flags
        - sender
        - created_at
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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