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

# List Messages

> List messages with filtering and pagination.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/messages
openapi: 3.1.0
info:
  title: wazzapi Public API
  description: >-
    Public API surface for external API-key clients. Only stable /api/v1
    endpoints are included.


    ## Webhook deliveries

    This reference also includes the webhook requests Wazzapi sends to your
    endpoint for incoming messages, message status updates, and device status
    changes. See the `Incoming webhooks` section in the sidebar for headers,
    payload fields, and concrete examples.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Incoming webhooks
    description: >-
      POST deliveries that Wazzapi sends to your webhook endpoint after you
      subscribe to supported events. Verify the signature against the raw body
      and return a 2xx response quickly.
paths:
  /api/v1/messages:
    get:
      tags:
        - messages
      summary: List Messages
      description: List messages with filtering and pagination.
      operationId: list_messages_api_v1_messages_get
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            default: 50
            title: Limit
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
            title: Offset
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Status
        - name: direction
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Direction
        - name: whatsapp_account_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Whatsapp Account Id
        - name: campaign_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Campaign Id
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Search
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
            default: created_at
            title: Sort By
        - name: sort_order
          in: query
          required: false
          schema:
            type: string
            default: desc
            title: Sort Order
        - name: Authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageListResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MessageListResponse:
      properties:
        messages:
          items:
            $ref: '#/components/schemas/MessageItem'
          type: array
          title: Messages
        total_count:
          type: integer
          title: Total Count
        has_more:
          type: boolean
          title: Has More
        current_page:
          type: integer
          title: Current Page
        total_pages:
          type: integer
          title: Total Pages
      type: object
      required:
        - messages
        - total_count
        - has_more
        - current_page
        - total_pages
      title: MessageListResponse
      description: Response for listing messages.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MessageItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        phone_number:
          type: string
          title: Phone Number
        chat_type:
          type: string
          title: Chat Type
          default: individual
        group_jid:
          anyOf:
            - type: string
            - type: 'null'
          title: Group Jid
        group_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Group Name
        content:
          type: string
          title: Content
        message_type:
          type: string
          title: Message Type
          default: text
        media_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Media Type
        media_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Media Url
        status:
          type: string
          title: Status
        direction:
          type: string
          title: Direction
        failure_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Reason
        retry_count:
          type: integer
          title: Retry Count
        contact_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Contact Id
        contact_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Name
        whatsapp_account_id:
          type: string
          format: uuid
          title: Whatsapp Account Id
        campaign_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Campaign Id
        batch_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Batch Id
        scheduled_for:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Scheduled For
        created_at:
          type: string
          format: date-time
          title: Created At
        queued_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Queued At
        sent_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Sent At
        delivered_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Delivered At
        read_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Read At
        failed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Failed At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - phone_number
        - content
        - status
        - direction
        - retry_count
        - whatsapp_account_id
        - created_at
        - updated_at
      title: MessageItem
      description: Message list item.
    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

````