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

# List EcoMailbox

> List MyEcoMailBox rows for the authenticated consumer profile across owned accounts. Search matches sender company name, `unread=true` maps to the Only Show Unread toggle, and the response includes `meta.state.eco_mailbox` so the frontend can render the sidebar unread badge.



## OpenAPI

````yaml /api/consumer.openapi.yaml get /e-letters
openapi: 3.1.0
info:
  title: YouNegotiate Consumer API
  version: '2.0'
  description: >-
    Stateless API endpoints for consumer portal authentication and account
    access.
servers:
  - url: https://api.consumer.younegotiate.com
    description: Production
security: []
tags:
  - name: System
    description: Public consumer domain system and health endpoints.
  - name: Authentication
    description: >-
      Consumer identity matching, contact capture, OTP verification, token
      creation, and logout endpoints.
  - name: Profile - My ecoAddress
    description: Consumer profile tab for signed-in identity / ecoAddress context.
  - name: Profile - Communication Controls
    description: >-
      Consumer profile tab for communication permissions, email/mobile changes,
      and email/mobile verification.
  - name: Profile - My Billing Details
    description: >-
      Consumer profile tab for billing name and billing address details used for
      payment verification.
  - name: Profile - Personalize My Portal
    description: Consumer profile tab for portal colors and profile image personalization.
  - name: Accounts
    description: Consumer-owned account list and account detail endpoints.
  - name: Bill Pay Wallet
    description: >-
      Consumer Bill Pay Wallet saved payment profiles and scheduled payment
      method update endpoints.
  - name: Upcoming Payments
    description: >-
      Consumer My Bill Pay Calendar upcoming-payment rows and calendar display
      data.
  - name: Calendar Sync
    description: >-
      Consumer Google and Microsoft calendar connection, OAuth callback, and
      live-update endpoints.
  - name: Gift Registry
    description: >-
      Consumer Bill Pay Gift Registry account list, shared registry, and Helping
      Hand link endpoints.
  - name: EcoMailbox
    description: Consumer MyEcoMailBox list endpoints and unread sidebar badge state.
  - name: Notice Responses
    description: >-
      Consumer My Account notice-response wizard endpoints for sender details
      and account details.
paths:
  /e-letters:
    get:
      tags:
        - EcoMailbox
      summary: List EcoMailbox
      description: >-
        List MyEcoMailBox rows for the authenticated consumer profile across
        owned accounts. Search matches sender company name, `unread=true` maps
        to the Only Show Unread toggle, and the response includes
        `meta.state.eco_mailbox` so the frontend can render the sidebar unread
        badge.
      operationId: consumerListELetters
      parameters:
        - name: search
          in: query
          required: false
          description: Search sender company name.
          schema:
            type: string
            maxLength: 255
        - name: unread
          in: query
          required: false
          description: When true, only unread EcoMailbox rows are returned.
          schema:
            type: boolean
            example: true
        - name: sort
          in: query
          required: false
          description: Sort column.
          schema:
            type: string
            enum:
              - created_at
              - company_name
            default: created_at
        - name: direction
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
      responses:
        '200':
          description: EcoMailbox rows returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerELetterListResponse'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '409':
          $ref: '#/components/responses/ProfileIncomplete'
        '422':
          $ref: '#/components/responses/ValidationError'
      security:
        - bearerAuth: []
components:
  schemas:
    ConsumerELetterListResponse:
      type: object
      required:
        - data
        - meta
        - pagination
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ConsumerELetter'
        meta:
          type: object
          required:
            - state
          properties:
            state:
              $ref: '#/components/schemas/ConsumerSidebarState'
        pagination:
          $ref: '#/components/schemas/Pagination'
    ConsumerELetter:
      type: object
      required:
        - id
        - sender_label
        - read_by_consumer
        - unread
        - enabled
        - actions
      properties:
        id:
          type: integer
        e_letter:
          $ref: '#/components/schemas/ConsumerELetterMessage'
        sender:
          $ref: '#/components/schemas/ConsumerELetterSender'
        sender_label:
          type: string
          enum:
            - CFPB Notice
            - Demand Notice
          example: Demand Notice
        sent_at:
          type: string
          format: date-time
          nullable: true
        delivered_at:
          type: string
          format: date-time
          nullable: true
        read_by_consumer:
          type: boolean
        unread:
          type: boolean
        enabled:
          type: boolean
        account:
          $ref: '#/components/schemas/ConsumerELetterAccount'
        actions:
          $ref: '#/components/schemas/ConsumerELetterActions'
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
    ConsumerSidebarState:
      type: object
      required:
        - eco_mailbox
      properties:
        eco_mailbox:
          $ref: '#/components/schemas/ConsumerEcoMailboxState'
    Pagination:
      type: object
      required:
        - current_page
        - from
        - last_page
        - per_page
        - to
        - total
      properties:
        current_page:
          type: integer
        from:
          type:
            - integer
            - 'null'
        last_page:
          type: integer
        per_page:
          type: integer
        to:
          type:
            - integer
            - 'null'
        total:
          type: integer
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ProfileIncompleteResponse:
      type: object
      required:
        - code
        - message
        - required_steps
      properties:
        code:
          type: string
          example: profile_incomplete
        message:
          type: string
          example: Please complete your communication profile before viewing accounts.
        required_steps:
          type: array
          items:
            type: string
          example:
            - profile_communication
    ValidationErrorResponse:
      type: object
      required:
        - message
        - errors
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    ConsumerELetterMessage:
      type: object
      required:
        - id
        - type
      properties:
        id:
          type: integer
        type:
          type: object
          required:
            - value
            - label
          properties:
            value:
              type: string
              enum:
                - normal
                - cfpb_with_qr
                - cfpb_without_qr
            label:
              type: string
              example: Normal
    ConsumerELetterSender:
      type: object
      required:
        - company_id
        - company_name
      properties:
        company_id:
          type: integer
        company_name:
          type: string
        subclient_id:
          type: integer
          nullable: true
    ConsumerELetterAccount:
      type: object
      properties:
        id:
          type: integer
        account_name:
          type: string
          nullable: true
        account_number:
          type: string
          nullable: true
        member_account_number:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/ConsumerAccountStatus'
    ConsumerELetterActions:
      type: object
      required:
        - can_open
        - can_download
        - can_delete
        - can_view_offer
      properties:
        can_open:
          type: boolean
        can_download:
          type: boolean
        can_delete:
          type: boolean
        can_view_offer:
          type: boolean
          description: >-
            True when the related account is in a View My Offer state: joined,
            uploaded, or renegotiate.
    ConsumerEcoMailboxState:
      type: object
      required:
        - unread_count
        - display_count
        - has_unread
      properties:
        unread_count:
          type: integer
          minimum: 0
          example: 12
        display_count:
          type: string
          description: Sidebar badge text. Values above 99 are returned as `99+`.
          example: '12'
        has_unread:
          type: boolean
          example: true
    ConsumerAccountStatus:
      type: object
      required:
        - value
        - label
      properties:
        value:
          type:
            - string
            - 'null'
          example: payment_accepted
        label:
          type:
            - string
            - 'null'
          example: Payment Plan
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    ProfileIncomplete:
      description: >-
        The authenticated consumer profile must complete communication setup
        before My Account can be shown.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProfileIncompleteResponse'
    ValidationError:
      description: Request validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum token

````