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

# List email threads

> Get a paginated list of email threads filtered by label



## OpenAPI

````yaml /openapi.json get /v1/threads
openapi: 3.0.3
info:
  title: Emailr API
  version: 1.0.0
servers:
  - url: https://api.emailr.dev
    description: Production
security: []
tags:
  - name: emails
    description: Email sending and management
  - name: contacts
    description: Contact management
  - name: templates
    description: Email template management
  - name: domains
    description: Domain verification and management
  - name: webhooks
    description: Webhook configuration
  - name: broadcasts
    description: Broadcast campaign management
  - name: segments
    description: Contact segmentation
paths:
  /v1/threads:
    get:
      tags:
        - threads
      summary: List email threads
      description: Get a paginated list of email threads filtered by label
      operationId: listThreads
      parameters:
        - schema:
            type: string
            default: inbox
            example: inbox
          required: false
          name: label
          in: query
        - schema:
            type: string
            default: '1'
          required: false
          name: page
          in: query
        - schema:
            type: string
            default: '30'
          required: false
          name: limit
          in: query
        - schema:
            type: string
          required: false
          name: search
          in: query
        - schema:
            type: string
            format: uuid
            description: Filter threads by inbox ID
            example: 550e8400-e29b-41d4-a716-446655440000
          required: false
          name: inbox_id
          in: query
        - schema:
            type: string
            description: Filter threads containing emails with this tag
            example: important
          required: false
          name: tag
          in: query
        - schema:
            type: string
            description: Filter threads involving this contact email
            example: steve@example.com
          required: false
          name: contact
          in: query
      responses:
        '200':
          description: Thread list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThreadListResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    ThreadListResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Thread'
        pagination:
          type: object
          properties:
            page:
              type: number
            limit:
              type: number
            total:
              type: number
            pages:
              type: number
          required:
            - page
            - limit
            - total
            - pages
      required:
        - data
        - pagination
    Error:
      type: object
      properties:
        error:
          type: string
          example: An error occurred
        code:
          type: string
          example: VALIDATION_ERROR
        details: {}
      required:
        - error
    Thread:
      type: object
      properties:
        thread_id:
          type: string
          format: uuid
        subject:
          type: string
          nullable: true
        latest_email_id:
          type: string
          format: uuid
        from_email:
          type: string
        to_email:
          type: string
        preview:
          type: string
          nullable: true
        labels:
          type: array
          items:
            type: string
        message_count:
          type: number
        participants:
          type: array
          items:
            type: string
        has_attachments:
          type: boolean
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - thread_id
        - subject
        - latest_email_id
        - from_email
        - to_email
        - preview
        - labels
        - message_count
        - participants
        - has_attachments
        - created_at
        - updated_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API key authentication. Use your API key as the bearer token.

````