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

# List business emails

> Lists messages in threads linked to this business, including received emails and sent replies. A linked thread may also contain third-party notifications. Results are ordered by `received_at` descending, then message ID descending. The public API does not support searching email content. List results include attachment metadata, not download URLs.



## OpenAPI

````yaml get /v1/businesses/{businessId}/support-emails
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/support-emails:
    get:
      tags: []
      summary: List business emails
      description: >-
        Lists messages in threads linked to this business, including received
        emails and sent replies. A linked thread may also contain third-party
        notifications. Results are ordered by `received_at` descending, then
        message ID descending. The public API does not support searching email
        content. List results include attachment metadata, not download URLs.
      operationId: business.support-emails.list
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business whose emails to list.
          required: true
          schema:
            type: string
            format: uuid
        - name: received_at_start
          in: query
          description: >-
            Include messages received at or after this RFC 3339 instant.
            Inclusive start of the UTC time range.
          schema:
            type: string
            format: date-time
        - name: received_at_end
          in: query
          description: >-
            Exclude messages received at or after this RFC 3339 instant.
            Exclusive end of the UTC time range. Must be later than
            `received_at_start` when both are given.
          schema:
            type: string
            format: date-time
        - name: has_attachments
          in: query
          description: >-
            Filter to messages with at least one stored attachment (`true`) or
            none (`false`). Omit to include both.
          schema:
            type: boolean
        - name: direction
          in: query
          description: Filter to received emails or sent replies. Omit to include both.
          schema:
            type: string
            enum:
              - RECEIVED
              - SENT
        - name: limit
          in: query
          description: Maximum messages per page. Defaults to 100.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 100
        - name: cursor
          in: query
          description: >-
            Opaque cursor from the previous response's `meta.pagination.cursor`.
            Repeat the same filters on subsequent pages.
          schema:
            type: string
        - name: sort_by
          in: query
          description: >-
            The sort field. Only `received_at` is supported; this is the
            default.
          schema:
            type: string
            enum:
              - received_at
            default: received_at
        - name: sort_order
          in: query
          description: Order by `received_at`, then message ID. Defaults to `DESC`.
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: DESC
      responses:
        '200':
          description: Business emails retrieved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/ApiSupportEmailMessage'
                  meta:
                    $ref: '#/components/schemas/SupportEmailListMetadata'
                required:
                  - data
                  - meta
        '400':
          description: >-
            Invalid filters or pagination parameters, or an unsupported search
            parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: Business not found or inaccessible.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ApiSupportEmailMessage:
      type: object
      description: A message in a thread linked to the business.
      properties:
        id:
          type: string
          format: uuid
          description: The message UUID. Use this ID to fetch the full message.
        thread_id:
          type: string
          format: uuid
          description: The linked thread UUID.
        mailbox_id:
          type: string
          format: uuid
          description: The support mailbox UUID.
        gmail_message_id:
          type: string
          description: The source Gmail message ID.
        gmail_thread_id:
          type: string
          description: The source Gmail thread ID.
        business_id:
          type: string
          format: uuid
          description: The business linked to the thread.
        direction:
          type: string
          enum:
            - RECEIVED
            - SENT
          description: Whether the message was received or sent.
        from_address:
          type: string
          format: email
          description: The sender's email address.
        subject:
          type: string
          description: The message subject.
        snippet:
          type: string
          description: A short preview, not the full body.
        received_at:
          type: string
          format: date-time
          description: The message timestamp used for ordering and date filters.
        participants:
          type: array
          items:
            $ref: '#/components/schemas/ApiSupportEmailParticipant'
          description: Email addresses and their roles.
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/ApiSupportEmailAttachment'
          description: Stored attachment metadata; list results omit download URLs.
      required:
        - id
        - thread_id
        - mailbox_id
        - gmail_message_id
        - gmail_thread_id
        - business_id
        - direction
        - from_address
        - subject
        - snippet
        - received_at
    SupportEmailListMetadata:
      type: object
      description: >-
        Pagination metadata for the business email list. Total count is not
        available.
      properties:
        pagination:
          $ref: '#/components/schemas/SupportEmailPaginationMetadata'
      required:
        - pagination
    ApiError:
      type: object
      description: An error object returned in API error responses.
      properties:
        type:
          $ref: '#/components/schemas/ApiErrorType'
          description: >-
            A fixed category for the error, helpful for categorizing and
            processing errors.
        description:
          type: string
          description: A human-readable error description.
        error_enum:
          $ref: '#/components/schemas/ApiEnumErrorType'
          description: >-
            A stable, machine-readable identifier for programmatically handling
            specific error conditions. Only present for 4xx client errors—not
            included for 5xx server errors. Use this instead of parsing the
            description field, as enum values remain stable across API versions.
          nullable: true
        meta:
          type: object
          description: Optional additional information about the error.
          nullable: true
      required:
        - type
        - description
    ApiSupportEmailParticipant:
      type: object
      properties:
        email_address:
          type: string
          format: email
          description: The participant's email address.
        role:
          type: string
          enum:
            - FROM
            - TO
            - CC
            - BCC
            - REPLY_TO
          description: The participant's role in this message.
      required:
        - email_address
        - role
    ApiSupportEmailAttachment:
      type: object
      description: >-
        An attachment stored with the email. Download URLs are provided only on
        the single-message endpoint.
      properties:
        id:
          type: string
          format: uuid
          description: The attachment UUID.
        filename:
          type: string
          description: The original filename.
        mime_type:
          type: string
          description: The attachment MIME type.
        size_bytes:
          type: integer
          format: int32
          description: The attachment size in bytes.
        url:
          type: string
          format: uri
          description: >-
            Temporary presigned S3 download URL, valid for 24 hours. Omitted
            from list results.
      required:
        - id
        - filename
        - mime_type
        - size_bytes
    SupportEmailPaginationMetadata:
      type: object
      description: >-
        Cursor-based pagination for business emails, ordered by receive time and
        message ID.
      properties:
        sort_by:
          type: string
          enum:
            - received_at
          description: The sort field.
        sort_order:
          type: string
          enum:
            - ASC
            - DESC
          description: The sort direction.
        cursor:
          type: string
          nullable: true
          description: >-
            Opaque cursor to send as the `cursor` query parameter for the next
            page. Null when there are no more pages.
        has_more:
          type: boolean
          description: Whether another page is available.
      required:
        - sort_by
        - sort_order
        - cursor
        - has_more
    ApiErrorType:
      type: string
      enum:
        - ResourceArchived
        - AuthFailure
        - Plaid
        - Stripe
        - InvalidState
        - ResourceNotFound
        - InvalidParameters
        - JsonSerialization
        - Unknown
        - BadRequest
        - PaginationCursor
        - Conflict
        - LedgerOperationFailed
      example: InvalidParameters
    ApiEnumErrorType:
      type: string
      description: >-
        Stable enum values for programmatic error handling. Only present in 4xx
        error responses.
      enum:
        - AccessCodeInvalid
        - BalanceSheetDoesNotBalance
        - BalanceSheetMissingAccount
        - BankStatementAccountDetectionError
        - BankStatementParsingError
        - BankStatementParserError
        - BankStatementValidationError
        - BillStateError
        - BulkCategorizeFailure
        - BulkMatchFailure
        - BusinessTaskAlreadyCompleted
        - BusinessTaskDeleted
        - CalendlyOAuthError
        - CallBookingError
        - CantUpdateTransactionInCustomerPayout
        - CantUpdateTransactionInVendorPayout
        - CheckPayrollConfigNotFound
        - CheckPayrollServiceNotFound
        - ClerkUserAlreadyExists
        - ConflictingQueryParams
        - CustomAccountAlreadyExists
        - CustomTransactionCsvParsingError
        - CustomTransactionUploadFailure
        - CustomerPayoutInputFormatError
        - DoesNotMatchExistingEntity
        - EmptyBatchRequest
        - ExpenseParserError
        - ExternalAccountBalanceReconciliationError
        - ExternalIdConflict
        - InvalidCategory
        - InvalidEffectiveDate
        - InvalidLedgerOperation
        - InvalidMonthlyAverageRange
        - InvalidMultiPartRequest
        - InvalidPaginationCursor
        - InvalidPayload
        - InvoiceDeleted
        - InvoiceNotFound
        - InvoiceReferenceMismatch
        - InvoiceStateError
        - ManualRateLimit
        - MultipleTagKeyFiltersUnsupported
        - NoCognitoUserFound
        - NoOpeningBalanceFound
        - NotYetReconciled
        - OnePasswordApiError
        - OnePasswordItemNotFound
        - OnePasswordVaultNotFound
        - OpenAICategorizationError
        - PaymentLinkInvalid
        - PayrollStateError
        - PeriodIsClosed
        - PeriodNotClosed
        - PhoneNumberAlreadyRegistered
        - PlaidApiError
        - PlaidConnectionBroken
        - PlaidCreateLinkTokenError
        - PlaidCredentialsNotConfigured
        - PlaidExchangePublicTokenError
        - PlaidGetInstitutionByIdError
        - PlaidGetItemError
        - PlaidInvalidEnvironment
        - PlaidItemAlreadyExists
        - PlaidItemNotFound
        - PlaidProcessorApiError
        - PlaidUnlinkItemError
        - QueryParamFormat
        - QueryParamMissing
        - QuickbooksBrokenConnection
        - QuickbooksConnectionAlreadyExists
        - QuickbooksConnectionAlreadySyncing
        - QuickbooksConnectionMissing
        - QuickbooksConnectionNotActivated
        - QuickbooksInvalidRequest
        - QuickbooksInvalidState
        - QuickbooksNoMatchingAccount
        - QuickbooksNonPostingAccountType
        - QuickbooksNotConfigured
        - QuickbooksOAuthCallbackInvalid
        - QuickbooksOAuthError
        - QuickbooksTokenExpired
        - ReadOnlyBusiness
        - ResourceArchived
        - ScheduleCNotConfigured
        - SmsNotEnabled
        - SpecifiedBadRequest
        - SpecifiedIdNotFound
        - SplitTransactionError
        - StepEvaluationBadRequest
        - StripeConnectAccountIdNotFound
        - StripeCredentialsNotConfigured
        - StripeGetBalanceForConnectAccountFailure
        - StripeRedirectOrRefreshUrlNotConfigured
        - TagFilterNotFound
        - UnexpectedQueryParam
        - UnitAccountsInUse
        - WrongAnswerType
      example: InvalidPayload
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````