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

# List conversations

> Lists the linked number's conversations, ordered by last activity (lastMessageAt desc). Paginated via page/pageSize. Filter by date with startDate/endDate (ISO 8601, over lastMessageAt). The number's privacy (PII) mode affects the response: RELAY_ONLY returns [] + notice:"PII_RELAY_ONLY"; STORE_X_DAYS clamps to the window max(startDate, now − retentionDays). Requires a number-scoped key. Contact identity: `from` is the E.164 phone (with `+`) when known — it may be null for contacts using a WhatsApp username; `userId` is the durable BSUID (stable contact id) and `username` the public handle when visible.

**Requires a number-scoped key.**



## OpenAPI

````yaml openapi.json GET /v1/conversations
openapi: 3.1.0
info:
  title: Pilot Status API
  version: 1.0.0
  license:
    name: Pilot Status Terms of Service
    url: https://pilotstatus.com.br/terms
  description: >-
    Public REST API for Pilot Status. Authenticate with the `x-api-key: ps_...`
    header (or `x-api-key-id`). Base URL: https://pilotstatus.com.br
servers:
  - url: https://pilotstatus.com.br
security:
  - apiKey: []
  - apiKeyId: []
paths:
  /v1/conversations:
    get:
      tags:
        - Conversations
      summary: List conversations
      description: >-
        Lists the linked number's conversations, ordered by last activity
        (lastMessageAt desc). Paginated via page/pageSize. Filter by date with
        startDate/endDate (ISO 8601, over lastMessageAt). The number's privacy
        (PII) mode affects the response: RELAY_ONLY returns [] +
        notice:"PII_RELAY_ONLY"; STORE_X_DAYS clamps to the window
        max(startDate, now − retentionDays). Requires a number-scoped key.
        Contact identity: `from` is the E.164 phone (with `+`) when known — it
        may be null for contacts using a WhatsApp username; `userId` is the
        durable BSUID (stable contact id) and `username` the public handle when
        visible.


        **Requires a number-scoped key.**
      operationId: get_conversations
      parameters:
        - name: startDate
          in: query
          required: false
          description: >-
            Start of the date range (filters by lastMessageAt). Must be ≤
            endDate.
          schema:
            type: string
            description: (string (ISO 8601))
          example: '2026-06-01T00:00:00Z'
        - name: endDate
          in: query
          required: false
          description: End of the date range (filters by lastMessageAt).
          schema:
            type: string
            description: (string (ISO 8601))
          example: '2026-06-27T23:59:59Z'
        - name: page
          in: query
          required: false
          description: Page (default 1).
          schema:
            type: string
            description: (integer (≥1))
          example: '1'
        - name: pageSize
          in: query
          required: false
          description: Items per page (default 30, max 100).
          schema:
            type: string
            description: (integer (1–100))
          example: '30'
      responses:
        '200':
          description: List conversations
          content:
            application/json:
              example:
                conversations:
                  - id: conv_01HZX...
                    from: '+5511988887777'
                    fromName: Ana
                    userId: BR.13491208655302741918
                    username: ana
                    type: DIRECT
                    unreadCount: 2
                    lastMessageAt: '2026-06-27T10:00:00.000Z'
                    lastMessagePreview: Olá! Sua entrega chegou.
                total: 1
                page: 1
                pageSize: 30
                totalPages: 1
        '400':
          description: Invalid date range
          content:
            application/json:
              example:
                error: startDate must be before or equal to endDate
                code: INVALID_DATE_RANGE
        '401':
          description: Missing or invalid `x-api-key` / `x-api-key-id` header
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Unauthorized
        '403':
          description: Tenant-scoped key used on a number-scoped endpoint
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Tenant-scoped keys cannot call number endpoints
                code: TENANT_SCOPE_NOT_ALLOWED
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Too many requests
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your ps_ API key
    apiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: API key id (alternative to x-api-key)

````