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

# List conversations

> Retrieve a paginated list of WhatsApp conversations for the authenticated merchant.



## OpenAPI

````yaml /openapi.json get /v1/conversations
openapi: 3.1.0
info:
  title: YV Business API
  description: >-
    Public API for YaVendio merchants to access orders, product catalog,
    conversations, contacts and company profile, and to send WhatsApp template
    messages.


    ## Authentication


    All endpoints require a valid API key sent via the `X-API-Key` header. API
    keys are created and managed from the [YaVendio Dashboard](https://ya.onl)
    under **Settings → API Keys**.


    Use the **Authorize** button above to set your key for all requests.


    Every endpoint declares the scope it requires (e.g. `orders:read`,
    `products:write`, `conversations:read`, `contacts:read`, `company:read`,
    `outbound:send`, `outbound:read`), listed on its reference page. Keys
    created from the dashboard today carry no scopes and therefore have full
    access; a key that has scopes but lacks the one an endpoint requires gets
    `403 Forbidden`.


    ## Rate Limiting


    Requests are rate-limited per merchant. Every response includes
    `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset`
    headers. Check these headers to know your current limit and remaining quota.
    When the limit is exceeded, the API responds with `429 Too Many Requests`
    and adds a `Retry-After` header.


    ## Pagination


    List endpoints support pagination via `page` and `limit` query parameters.
    Responses include a `pagination` object with `total_pages`, `total_items`,
    and `has_more` fields. Maximum `limit` is 100.
  version: 1.14.2
servers:
  - url: https://api.ya.onl
security: []
tags:
  - name: Orders
    description: Retrieve merchant orders and their details.
  - name: Products
    description: CRUD operations on merchant products.
  - name: Product Variants
    description: Manage variants of a product.
  - name: Product Options
    description: Manage product options.
  - name: Product Option Values
    description: Manage individual option values.
  - name: Product Media
    description: Manage media files attached to product variants.
  - name: Categories
    description: CRUD operations on merchant categories (tags).
  - name: Product Categories
    description: Assign and remove categories from products.
  - name: Catalogs
    description: Retrieve merchant catalogs.
  - name: Webhooks
    description: Manage webhook subscriptions for real-time order events.
  - name: Conversations
    description: Read WhatsApp conversations and their messages.
  - name: Contacts
    description: Retrieve campaign contacts.
  - name: Company
    description: Retrieve the merchant's company profile.
  - name: Templates
    description: >-
      List the WhatsApp templates approved for the merchant, with the variables
      each one expects.
  - name: Template Messages
    description: >-
      Send approved WhatsApp templates to customers and follow their delivery
      status.
paths:
  /v1/conversations:
    get:
      tags:
        - Conversations
      summary: List conversations
      description: >-
        Retrieve a paginated list of WhatsApp conversations for the
        authenticated merchant.
      operationId: get_conversations_v1_conversations_get
      parameters:
        - name: sale_status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                enum:
                  - positive
                  - negative
              - type: 'null'
            description: Filter by sale outcome of the conversation
            title: Sale Status
          description: Filter by sale outcome of the conversation
        - name: page
          in: query
          required: false
          schema:
            type: integer
            exclusiveMinimum: 0
            default: 1
            title: Page
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            exclusiveMinimum: 0
            default: 25
            title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_ConversationResponse_'
          headers:
            X-RateLimit-Limit:
              description: Maximum number of requests allowed in the current window
              schema:
                type: integer
                example: 100
            X-RateLimit-Remaining:
              description: Number of requests remaining in the current window
              schema:
                type: integer
                example: 87
            X-RateLimit-Reset:
              description: Unix timestamp when the rate limit window resets
              schema:
                type: integer
                example: 1710288000
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '403':
          description: API key lacks the `conversations:read` scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
          headers:
            X-RateLimit-Limit:
              description: Maximum number of requests allowed in the current window
              schema:
                type: integer
                example: 100
            X-RateLimit-Remaining:
              description: Number of requests remaining in the current window
              schema:
                type: integer
                example: 87
            X-RateLimit-Reset:
              description: Unix timestamp when the rate limit window resets
              schema:
                type: integer
                example: 1710288000
            Retry-After:
              description: Seconds to wait before making another request
              schema:
                type: integer
                example: 30
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PaginatedResponse_ConversationResponse_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ConversationResponse'
          type: array
          title: Data
          description: List of items for the current page
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
          description: Pagination metadata
      type: object
      required:
        - data
        - pagination
      title: PaginatedResponse[ConversationResponse]
    APIErrorResponse:
      properties:
        type:
          type: string
          title: Type
          description: Error type identifier, e.g. 'UnauthorizedError'
        detail:
          type: string
          title: Detail
          description: Human-readable error message
      type: object
      required:
        - type
        - detail
      title: APIErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ConversationResponse:
      properties:
        id:
          type: string
          title: Id
          description: Unique conversation identifier
        customer:
          $ref: '#/components/schemas/ConversationCustomer'
          description: Customer information
        contact_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Id
          description: Identifier of the linked contact, if any
        last_message_preview:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Message Preview
          description: Text preview of the most recent message
        last_message_direction:
          anyOf:
            - type: string
              enum:
                - inbound
                - outbound
            - type: 'null'
          title: Last Message Direction
          description: Direction of the most recent message
        unread_count:
          type: integer
          title: Unread Count
          description: Number of unread messages in the conversation
          default: 0
        unread:
          type: boolean
          title: Unread
          description: Whether the conversation has unread messages
          default: false
        paused:
          type: boolean
          title: Paused
          description: Whether the AI assistant is paused for this conversation
          default: false
        sale_status:
          anyOf:
            - type: string
              enum:
                - positive
                - negative
            - type: 'null'
          title: Sale Status
          description: Sale outcome of the conversation (null if not marked)
        tags:
          items:
            $ref: '#/components/schemas/ConversationTag'
          type: array
          title: Tags
          description: Tags applied to the conversation
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: When the conversation started (merchant's local timezone)
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
          description: When the conversation was last active (merchant's local timezone)
      type: object
      required:
        - id
        - customer
      title: ConversationResponse
    PaginationResponse:
      properties:
        page:
          type: integer
          title: Page
          description: Current page number
          examples:
            - 1
        limit:
          type: integer
          title: Limit
          description: Items per page
          examples:
            - 25
        total_pages:
          type: integer
          title: Total Pages
          description: Total number of pages
          examples:
            - 4
        total_items:
          type: integer
          title: Total Items
          description: Total number of items across all pages
          examples:
            - 100
        has_more:
          type: boolean
          title: Has More
          description: Whether there are more pages after the current one
          examples:
            - true
      type: object
      required:
        - page
        - limit
        - total_pages
        - total_items
        - has_more
      title: PaginationResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ConversationCustomer:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Customer display name
        phone_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Phone Number
          description: Customer phone number
      type: object
      title: ConversationCustomer
    ConversationTag:
      properties:
        id:
          type: integer
          title: Id
          description: Unique tag identifier
        name:
          type: string
          title: Name
          description: Tag name
      type: object
      required:
        - id
        - name
      title: ConversationTag
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Merchant API key for authentication
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.