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

# Mark a conversation's inbound messages read up to a cursor

> Marks the caller's own inbound messages in a conversation thread as read, up to and including the given `(upToOccurredAt, upToMessageId)` cursor — typically a conversation row's `lastMessage`. Idempotent: repeating the call with the same cursor updates 0 rows. Returns the number of rows updated.



## OpenAPI

````yaml /api-reference/mobilerun-numbers.yaml post /numbers/messages/conversations/read
openapi: 3.1.0
info:
  title: Mobilerun Numbers
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /numbers/messages/conversations/read:
    post:
      tags:
        - Messages
      summary: Mark a conversation's inbound messages read up to a cursor
      description: >-
        Marks the caller's own inbound messages in a conversation thread as
        read, up to and including the given `(upToOccurredAt, upToMessageId)`
        cursor — typically a conversation row's `lastMessage`. Idempotent:
        repeating the call with the same cursor updates 0 rows. Returns the
        number of rows updated.
      operationId: markConversationRead
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkConversationReadInput'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/MarkConversationReadResponse'
                required:
                  - data
                type: object
          description: Read state updated
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageErrorResponse'
          description: >-
            Service Unavailable — the relevant product is disabled for this
            deployment (see `reason`/`message`)
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.messages.conversations.markRead({
              peerKey: 'x',
              upToMessageId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              upToOccurredAt: '2019-12-27T18:11:19.117Z',
            });

            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from datetime import datetime
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.messages.conversations.mark_read(
                peer_key="x",
                up_to_message_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                up_to_occurred_at=datetime.fromisoformat("2019-12-27T18:11:19.117"),
            )
            print(response.data)
components:
  schemas:
    MarkConversationReadInput:
      properties:
        peerKey:
          description: The thread's canonical peer key (see GET .../conversations)
          maxLength: 128
          minLength: 1
          type: string
        upToMessageId:
          format: uuid
          type: string
        upToOccurredAt:
          description: >-
            Mark inbound messages read up to (and including) this
            occurredAt/upToMessageId cursor
          format: date-time
          type: string
      required:
        - peerKey
        - upToOccurredAt
        - upToMessageId
      type: object
    MarkConversationReadResponse:
      properties:
        updated:
          minimum: 0
          type: integer
      required:
        - updated
      type: object
    MessageErrorResponse:
      properties:
        message:
          type: string
        reason:
          enum:
            - not_installed
            - missing_device
            - missing_subscription
            - idempotency_conflict
            - send_disabled
            - daily_cap_exceeded
            - rate_limited
            - product_disabled
          type: string
        success:
          enum:
            - false
          type: boolean
      required:
        - success
        - reason
        - message
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````