> ## 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.

# Group messages

> Lists messages in the linked number's GROUP conversations (newest first). Paginated via page/pageSize. Filter by date with startDate/endDate (ISO 8601, over createdAt). Meta numbers return 400 NOT_SUPPORTED_FOR_META (groups are PILOT_STATUS-only). The number's privacy (PII) mode applies: RELAY_ONLY → [] + notice:"PII_RELAY_ONLY"; STORE_X_DAYS clamps to the window max(startDate, now − retentionDays). Requires a number-scoped key.

**Requires a number-scoped key.**



## OpenAPI

````yaml openapi.json GET /v1/messages/group
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/messages/group:
    get:
      tags:
        - Conversations
      summary: Group messages
      description: >-
        Lists messages in the linked number's GROUP conversations (newest
        first). Paginated via page/pageSize. Filter by date with
        startDate/endDate (ISO 8601, over createdAt). Meta numbers return 400
        NOT_SUPPORTED_FOR_META (groups are PILOT_STATUS-only). The number's
        privacy (PII) mode applies: RELAY_ONLY → [] + notice:"PII_RELAY_ONLY";
        STORE_X_DAYS clamps to the window max(startDate, now − retentionDays).
        Requires a number-scoped key.


        **Requires a number-scoped key.**
      operationId: get_messages_group
      parameters:
        - name: startDate
          in: query
          required: false
          description: Start of the date range (filters by createdAt). 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 createdAt).
          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: Group messages
          content:
            application/json:
              example:
                messages:
                  - id: cm_01HZX...
                    conversationId: conv_01HZX...
                    groupId: 123456789-987654321@g.us
                    groupSubject: Pilot Status Group
                    direction: INBOUND
                    fromNumber: '5511988887777'
                    text: Bom dia, pessoal!
                    createdAt: '2026-06-27T10:00:00.000Z'
                total: 1
                page: 1
                pageSize: 30
                totalPages: 1
        '400':
          description: Meta number (not supported)
          content:
            application/json:
              example:
                error: Group messages are not supported for Meta Cloud API numbers
                code: NOT_SUPPORTED_FOR_META
        '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)

````