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

# List Messages

> Retrieve the message log for your organization, newest first. Offset-paginated.



## OpenAPI

````yaml GET /messages
openapi: 3.1.0
info:
  title: RevRing Voice AI API
  description: >-
    RevRing Voice AI platform API for managing AI voice agents, phone calls, SIP
    trunks, and analytics. Build intelligent voice applications that can handle
    inbound and outbound phone calls with AI-powered conversational agents.
  version: 1.0.0
  contact:
    name: RevRing Support
    url: https://revring.ai
servers:
  - url: https://api.revring.ai/v1
    description: Production API
security:
  - apiKeyAuth: []
tags:
  - name: Messaging Connections
    description: Connect messaging providers so agents can send text messages
  - name: Messages
    description: Send text messages and read your message log
  - name: Conversations
    description: List and clear managed conversation threads
  - name: SIP Trunks
    description: Manage SIP trunks for connecting agents to the phone network
  - name: Agents
    description: Manage AI voice agents and their configuration
  - name: Agent Folders
    description: Organize agents into folders for dashboard navigation
  - name: Calls
    description: Manage and query phone calls
  - name: Analytics
    description: Get analytics and metrics about your calls
  - name: Knowledge Bases
    description: >-
      Manage knowledge bases and sources for agent retrieval-augmented
      generation
  - name: Test Suites
    description: Manage test suites, test cases, and test runs for agent evaluation
  - name: Voices
    description: Browse the voices available to your organization for agent speech
paths:
  /messages:
    get:
      tags:
        - Messages
      summary: List Messages
      description: >-
        Retrieve the message log for your organization, newest first.
        Offset-paginated.
      operationId: listMessages
      parameters:
        - name: agentId
          in: query
          required: false
          schema:
            type: string
        - name: folderId
          in: query
          required: false
          description: >-
            Filter by the agent's folder. A folder id, or 'none' for agents with
            no folder.
          schema:
            type: string
        - name: callId
          in: query
          required: false
          schema:
            type: string
        - name: direction
          in: query
          required: false
          schema:
            type: string
            enum:
              - INBOUND
              - OUTBOUND
        - name: status
          in: query
          required: false
          schema:
            type: string
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: pageSize
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
      responses:
        '200':
          description: Message log page
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Message'
                  page:
                    type: integer
                  pageSize:
                    type: integer
                  total:
                    type: integer
                  hasNextPage:
                    type: boolean
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/BillingInactiveError'
components:
  schemas:
    Message:
      type: object
      description: A logged text message (sent or received).
      properties:
        id:
          type: string
        agentId:
          type: string
          nullable: true
        agentName:
          type: string
          nullable: true
          description: The agent that sent or received this message
        messagingConnectionId:
          type: string
          nullable: true
        callId:
          type: string
          nullable: true
        conversationId:
          type: string
          nullable: true
        direction:
          type: string
          enum:
            - INBOUND
            - OUTBOUND
        channel:
          type: string
          enum:
            - sms
        fromNumber:
          type: string
        toNumber:
          type: string
        body:
          type: string
        status:
          type: string
          description: queued | sent | delivered | failed | received
        providerMessageId:
          type: string
          nullable: true
        generatedByLlm:
          type: boolean
        errorMessage:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
  responses:
    UnauthorizedError:
      description: Authentication required or API key invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: unauthorized
    BillingInactiveError:
      description: Subscription inactive or billing issue
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: billing_inactive
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Generate API keys from the RevRing
        dashboard.

````