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

# List conversations

> List inbox threads, most recently active first. A conversation groups every message with one contact across channels, which is what you need to build an inbox: `GET /v1/messages` returns a flat log with no thread to hang it on.

Use `senderId` to scope the list to a single number, and `channel` to keep only threads that have carried that channel.



## OpenAPI

````yaml /openapi.json get /v1/conversations
openapi: 3.0.3
info:
  title: Zavu Unified Messaging Layer API
  version: 0.2.0
  description: >
    Unified multi-channel messaging API for Zavu.


    Supported channels:

    - **SMS**: Simple text messages

    - **WhatsApp**: Rich messaging with media, buttons, lists, CTA URL buttons,
    location requests, and templates

    - **Telegram**: Bot messaging with text, media, and interactive elements

    - **Email**: Transactional emails via Amazon SES


    Design goals:

    - Simple `send()` entrypoint for developers

    - Project-level authentication via Bearer token

    - Support for all WhatsApp message types (text, image, video, audio,
    document, sticker, location, contact, buttons, list, cta_url,
    location_request, reaction, template)

    - If a non-text message type is sent, WhatsApp channel is used automatically

    - 24-hour WhatsApp conversation window enforcement

    - Universal `to` field accepts phone numbers (E.164), email addresses, or
    numeric chat IDs (Telegram/Instagram/Messenger)
servers:
  - url: https://api.zavu.dev
security:
  - bearerAuth: []
paths:
  /v1/conversations:
    get:
      tags:
        - Conversations
      summary: List conversations
      description: >-
        List inbox threads, most recently active first. A conversation groups
        every message with one contact across channels, which is what you need
        to build an inbox: `GET /v1/messages` returns a flat log with no thread
        to hang it on.


        Use `senderId` to scope the list to a single number, and `channel` to
        keep only threads that have carried that channel.
      operationId: listConversations
      parameters:
        - name: channel
          in: query
          description: Keep only threads that have carried this channel.
          schema:
            type: string
            enum:
              - sms
              - sms_oneway
              - whatsapp
              - email
              - telegram
              - instagram
              - messenger
              - voice
        - name: senderId
          in: query
          description: Keep only threads last handled by this sender.
          schema:
            type: string
        - name: limit
          in: query
          schema:
            type: integer
            default: 50
            maximum: 100
        - name: cursor
          in: query
          description: >-
            Opaque cursor from a previous response's `nextCursor`. Do not
            construct it.
          schema:
            type: string
      responses:
        '200':
          description: List of conversations.
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Conversation'
                  nextCursor:
                    type: string
                    nullable: true
        '400':
          description: Invalid query parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Conversation:
      type: object
      description: >-
        An inbox thread with one contact. A conversation groups every message
        exchanged with that contact across channels, so a contact who writes on
        WhatsApp and later by email stays in one thread.
      required:
        - id
        - contactIdentifier
        - channels
        - lastMessage
        - messageCount
        - unreadCount
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          example: js723987cyghwqxxaxcf590qd18axd95
        contactId:
          type: string
          description: >-
            ID of the contact this thread belongs to. Absent on group threads
            and on threads whose contact has not been resolved yet.
        contactIdentifier:
          type: string
          description: >-
            The key this thread is filed under: a phone number in E.164, a
            WhatsApp business-scoped user ID (BSUID), a numeric chat ID
            (Telegram/Instagram/Messenger), or a group JID. It is not always a
            phone number, so do not parse it as one.
          example: '+56912345678'
        email:
          type: string
          description: Email address of the thread, when the contact was reached by email.
        channels:
          type: array
          items:
            type: string
          description: Every channel this thread has carried messages on.
          example:
            - whatsapp
            - sms
        lastMessage:
          type: object
          description: >-
            Denormalized preview of the most recent message, so a thread list
            needs no extra fetch.
          required:
            - id
            - text
            - channel
            - direction
            - at
          properties:
            id:
              type: string
            text:
              type: string
              description: >-
                Text or caption. Empty when the last message carried no text
                (e.g. media).
            channel:
              $ref: '#/components/schemas/Channel'
            direction:
              type: string
              enum:
                - inbound
                - outbound
            at:
              type: string
              format: date-time
        senderId:
          type: string
          description: >-
            Sender that last handled this thread. Use it as the `Zavu-Sender`
            header when replying so the answer leaves from the same number the
            contact knows.
        messageCount:
          type: integer
        unreadCount:
          type: integer
          description: >-
            Inbound messages not yet marked read. Reset with POST
            /v1/conversations/{conversationId}/read.
        whatsapp:
          type: object
          description: WhatsApp identity, present when the contact adopted a username.
          properties:
            bsuid:
              type: string
              description: Business-scoped user ID. Can be used as `to` when sending.
            username:
              type: string
        group:
          type: object
          description: >-
            Present when the thread is a group chat rather than a one-to-one
            conversation.
          required:
            - id
          properties:
            id:
              type: string
            subject:
              type: string
            participantCount:
              type: integer
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: invalid_request
        message:
          type: string
          example: Phone number is invalid
        details:
          type: object
          additionalProperties: true
    Channel:
      type: string
      description: Delivery channel. Use 'auto' for intelligent routing.
      enum:
        - auto
        - sms
        - sms_oneway
        - whatsapp
        - telegram
        - email
        - instagram
        - messenger
        - voice
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````