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

# List chats for a business

> Paginated list of conversations. Requires either a Bearer JWT for a user with access to the business, or HTTP Basic credentials scoped to the business's slug, plus the `business-id` context implied by the path.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/chats/{business_id}
openapi: 3.1.0
info:
  title: iZap API
  version: v1
  description: Public REST API for the iZap WhatsApp business messaging platform.
  contact:
    name: iZap API Support
    email: suporte@izap.ai
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.izap.ai
    description: Production
  - url: https://api-staging.izap.ai
    description: Staging
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Login and token refresh.
  - name: OAuth
    description: OAuth 2.1 / PKCE authorization for third-party and MCP clients.
  - name: Businesses
    description: Business profile, hours, menus, and chatbot configuration.
  - name: Chats
    description: Conversations, messages, and template sends.
  - name: Scheduling
    description: Customers, services, providers, and bookings (Trinks-backed).
  - name: WhatsApp Templates
    description: Manage and sync WhatsApp message templates.
  - name: Transmissions
    description: Bulk WhatsApp template broadcasts.
  - name: Me
    description: The authenticated user's own profile and active business.
paths:
  /api/v1/chats/{business_id}:
    get:
      tags:
        - Chats
      summary: List chats for a business
      description: >-
        Paginated list of conversations. Requires either a Bearer JWT for a user
        with access to the business, or HTTP Basic credentials scoped to the
        business's slug, plus the `business-id` context implied by the path.
      operationId: listChats
      parameters:
        - name: business_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: kind
          in: query
          required: false
          schema:
            type: string
            enum:
              - trainer
              - real
              - all
            default: trainer
          description: >-
            'real' returns customer conversations created from WhatsApp;
            'trainer' returns AI Trainer sandbox chats.
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 30
        - name: messages_per_chat
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 1
      responses:
        '200':
          description: Paginated chat list.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChatList'
              example:
                chats:
                  - id: c1a2b3c4-1234-4a5b-9c8d-abcdef123456
                    business_id: 6a1f2e2e-1c34-4e2a-9c3e-1234567890ab
                    kind: real
                    timestamp: '2026-07-01T12:00:00Z'
                    last_message:
                      content: Oi, tudo bem?
                      status: delivered
                      timestamp: '2026-07-01T12:00:00Z'
                pagination:
                  page: 1
                  page_size: 30
                  total_count: 1
        '401':
          description: Missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                detail: Not authenticated
components:
  schemas:
    ChatList:
      type: object
      properties:
        chats:
          type: array
          items:
            $ref: '#/components/schemas/Chat'
        pagination:
          type: object
          properties:
            page:
              type: integer
            page_size:
              type: integer
            total_count:
              type: integer
    Error:
      type: object
      properties:
        detail:
          type: string
    Chat:
      type: object
      properties:
        id:
          type: string
          format: uuid
        business_id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
            - trainer
            - real
        timestamp:
          type: string
          format: date-time
        last_message:
          type: object
          additionalProperties: true
          nullable: true
        consumer:
          type: object
          additionalProperties: true
          nullable: true
      additionalProperties: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token obtained from POST /api/v1/auth/jwt/login, the OAuth
        token endpoint, or a business-scoped API token. Some
        Business/Chat/Template/Scheduling endpoints alternatively accept HTTP
        Basic credentials scoped to the business slug.

````