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

# List messages in a WhatsApp conversation

> Paginated transcript for a single conversation, oldest-first.

Use it to fetch the rest of a conversation that *List WhatsApp
conversations* truncated (`has_more_messages=true`). Tool-execution rows
are excluded; media exposes metadata only. Each message names its sender
in `sender`, and `participants` returns the conversation's full roster (not
just this page's).

Returns `404 {"detail": "..."}` when the conversation does not exist in your
workspace.



## OpenAPI

````yaml GET /api/v2/public/whatsapp/conversations/{session_id}/messages
openapi: 3.1.0
info:
  title: Dialtu Public API
  version: '2.0'
  description: >-
    Programmatic access to your Dialtu account: schedule AI voice calls, create
    contacts, push leads into Salesflow pipelines, book calendar appointments
    and read WhatsApp conversation history.


    Every request is authenticated with an API key created in the dashboard
    under **Settings → API Keys**, sent as `Authorization: Bearer pk_...`.
servers:
  - url: https://api.dialtu.com
    description: Production
  - url: https://api.stg.dialtu.com
    description: Staging
security:
  - ApiKeyBearer: []
tags:
  - name: Calls
    description: Schedule outbound AI voice calls.
  - name: Clients
    description: Create contacts in your account.
  - name: Salesflow
    description: Push leads into a pipeline through an API input node.
  - name: Salesflow pipelines
    description: Read a pipeline's stages and add, move or remove clients.
  - name: Calendar
    description: Check bookable capacity, book appointments and manage waiting lists.
  - name: WhatsApp
    description: Read-only conversation history and transcripts.
paths:
  /api/v2/public/whatsapp/conversations/{session_id}/messages:
    get:
      tags:
        - WhatsApp
      summary: List messages in a WhatsApp conversation
      description: >-
        Paginated transcript for a single conversation, oldest-first.


        Use it to fetch the rest of a conversation that *List WhatsApp

        conversations* truncated (`has_more_messages=true`). Tool-execution rows

        are excluded; media exposes metadata only. Each message names its sender

        in `sender`, and `participants` returns the conversation's full roster
        (not

        just this page's).


        Returns `404 {"detail": "..."}` when the conversation does not exist in
        your

        workspace.
      operationId: listWhatsAppConversationMessages
      parameters:
        - in: path
          name: session_id
          schema:
            description: >-
              Conversation (session) ID, as returned by *List WhatsApp
              conversations*.
            title: Session Id
            type: integer
          required: true
          description: >-
            Conversation (session) ID, as returned by *List WhatsApp
            conversations*.
        - in: query
          name: limit
          schema:
            default: 50
            description: Page size (1–500).
            maximum: 500
            minimum: 1
            title: Limit
            type: integer
          required: false
          description: Page size (1–500).
        - in: query
          name: offset
          schema:
            default: 0
            description: Number of messages to skip, oldest-first.
            minimum: 0
            title: Offset
            type: integer
          required: false
          description: Number of messages to skip, oldest-first.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicWhatsAppMessagesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicWhatsAppErrorResponse'
        '401':
          description: Missing, malformed or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetailErrorResponse'
              examples:
                missing_header:
                  summary: No Authorization header
                  value:
                    detail: Unauthorized
                invalid_key:
                  summary: Unknown or revoked key
                  value:
                    detail: Invalid or expired API key. Please check your credentials.
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetailErrorResponse'
        '422':
          description: The request did not match the documented schema.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RequestValidationError'
              example:
                detail:
                  - type: missing
                    loc:
                      - body
                      - payload
                      - phone_number
                    msg: Field required
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicWhatsAppErrorResponse'
      security:
        - ApiKeyBearer: []
components:
  schemas:
    PublicWhatsAppMessagesResponse:
      description: Paginated transcript for a single session (overflow drill-down).
      properties:
        status:
          const: success
          default: success
          description: Always `success`.
          title: Status
          type: string
        data:
          description: Messages on this page, oldest-first.
          items:
            $ref: '#/components/schemas/PublicWhatsAppMessageSchema'
          title: Data
          type: array
        count:
          description: Total conversational messages in the session.
          title: Count
          type: integer
        limit:
          description: Page size that was applied.
          title: Limit
          type: integer
        offset:
          description: Offset that was applied.
          title: Offset
          type: integer
        participants:
          allOf:
            - $ref: '#/components/schemas/PublicWhatsAppParticipantsSchema'
          description: >-
            The conversation's participant roster. Describes the whole
            conversation, not just the returned page.
      required:
        - data
        - count
        - limit
        - offset
      title: PublicWhatsAppMessagesResponse
      type: object
    PublicWhatsAppErrorResponse:
      description: Public API error response for WhatsApp history operations.
      properties:
        status:
          const: error
          description: Error status
          title: Status
          type: string
        error_code:
          description: Machine-readable error code
          title: Error Code
          type: string
        message:
          description: Human-readable error message
          title: Message
          type: string
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: Additional error details
          title: Details
      required:
        - status
        - error_code
        - message
      title: PublicWhatsAppErrorResponse
      type: object
    DetailErrorResponse:
      description: 'Plain error body: `{"detail": "..."}`. No `error_code` is included.'
      properties:
        detail:
          description: Human-readable reason for the failure.
          title: Detail
          type: string
      required:
        - detail
      title: DetailErrorResponse
      type: object
    RequestValidationError:
      title: RequestValidationError
      type: object
      description: >-
        Returned when the request body, query string or path could not be parsed
        against the documented schema. Fix the listed fields and retry.
      properties:
        detail:
          type: array
          title: Detail
          description: One entry per invalid field.
          items:
            $ref: '#/components/schemas/RequestValidationErrorItem'
      required:
        - detail
    PublicWhatsAppMessageSchema:
      description: A single message in a transcript.
      properties:
        id:
          description: Message ID; use it with `reply_to_id`.
          title: Id
          type: integer
        sender_type:
          description: customer, ai, human, or system.
          title: Sender Type
          type: string
        sender:
          $ref: '#/components/schemas/PublicWhatsAppSenderSchema'
          description: >-
            The named sender. Use this to attribute a message to a specific AI
            agent or team member; sender_type only says what kind of party sent
            it.
        message_type:
          description: text, template, media, or system.
          title: Message Type
          type: string
        content:
          description: >-
            Message text. For media messages this is the caption or an empty
            string; for templates, the rendered template body.
          title: Content
          type: string
        timestamp:
          description: Message timestamp (Meta's original timestamp when available).
          format: date-time
          title: Timestamp
          type: string
        media:
          anyOf:
            - $ref: '#/components/schemas/PublicWhatsAppMediaSchema'
            - type: 'null'
          description: Media metadata when `message_type` is `media`; no download URL.
        reply_to_id:
          anyOf:
            - type: integer
            - type: 'null'
          description: ID of the message this one quotes, if any.
          title: Reply To Id
      required:
        - id
        - sender_type
        - sender
        - message_type
        - content
        - timestamp
      title: PublicWhatsAppMessageSchema
      type: object
    PublicWhatsAppParticipantsSchema:
      description: Everyone who actually replied in the conversation, split by kind.
      properties:
        ai_agents:
          description: AI agents that replied, busiest first.
          items:
            $ref: '#/components/schemas/PublicWhatsAppAgentParticipantSchema'
          title: Ai Agents
          type: array
        users:
          description: Team members that replied, busiest first.
          items:
            $ref: '#/components/schemas/PublicWhatsAppUserParticipantSchema'
          title: Users
          type: array
      title: PublicWhatsAppParticipantsSchema
      type: object
    RequestValidationErrorItem:
      title: RequestValidationErrorItem
      type: object
      properties:
        loc:
          type: array
          title: Loc
          description: >-
            Where the problem is: the first element is `body`, `query` or
            `path`, followed by the field path.
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          type: string
          title: Msg
          description: What is wrong with the value.
        type:
          type: string
          title: Type
          description: >-
            Machine-readable validation error type, e.g. `missing` or
            `int_parsing`.
      required:
        - loc
        - msg
        - type
    PublicWhatsAppSenderSchema:
      description: Who sent a message — the named party behind ``sender_type``.
      properties:
        type:
          description: >-
            ai_agent, user (a Dialtu team member), client (the customer), or
            system.
          title: Type
          type: string
        id:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            Internal Dialtu id of the agent, user or client. Null when the
            sender cannot be identified — messages synced from the WhatsApp
            Business app and imported history carry no attributable sender.
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: Display name of the sender.
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Email address, when the party has one on file. Populated for
            type=user and type=client; always null for ai_agent and system.
          title: Email
      required:
        - type
      title: PublicWhatsAppSenderSchema
      type: object
    PublicWhatsAppMediaSchema:
      description: Media metadata for a media message (no file bytes / no download URL).
      properties:
        kind:
          anyOf:
            - type: string
            - type: 'null'
          description: image, document, video, audio, or sticker.
          title: Kind
        mime:
          anyOf:
            - type: string
            - type: 'null'
          description: IANA MIME type.
          title: Mime
        filename:
          anyOf:
            - type: string
            - type: 'null'
          description: Original filename, if any.
          title: Filename
        caption:
          anyOf:
            - type: string
            - type: 'null'
          description: Media caption, if any.
          title: Caption
      title: PublicWhatsAppMediaSchema
      type: object
    PublicWhatsAppAgentParticipantSchema:
      description: An AI agent that produced at least one message in the conversation.
      properties:
        id:
          description: Agent ID.
          title: Id
          type: integer
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: Agent name.
          title: Name
        message_count:
          default: 0
          description: Messages this agent sent in the conversation.
          title: Message Count
          type: integer
        first_message_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Timestamp of the agent's first message (UTC).
          title: First Message At
        last_message_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Timestamp of the agent's last message (UTC).
          title: Last Message At
      required:
        - id
      title: PublicWhatsAppAgentParticipantSchema
      type: object
    PublicWhatsAppUserParticipantSchema:
      description: A team member who sent at least one message in the conversation.
      properties:
        id:
          description: User ID.
          title: Id
          type: integer
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: Display name.
          title: Name
        email:
          anyOf:
            - type: string
            - type: 'null'
          description: Email address.
          title: Email
        message_count:
          default: 0
          description: Messages this person sent in the conversation.
          title: Message Count
          type: integer
        first_message_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Timestamp of the person's first message (UTC).
          title: First Message At
        last_message_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          description: Timestamp of the person's last message (UTC).
          title: Last Message At
      required:
        - id
      title: PublicWhatsAppUserParticipantSchema
      type: object
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: pk_...
      description: >-
        API key created in the dashboard under **Settings → API Keys**. Send it
        as `Authorization: Bearer pk_...`.

````