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

# List the caller's own SMS inbox/outbox messages

> Lists the caller's own SMS messages, newest first. Supports filtering by direction, esimId, numberId, status, peerNumber (substring search, min 3 characters), and peerKey (exact thread match). Each row includes its canonical thread key (`peerKey`).



## OpenAPI

````yaml /api-reference/mobilerun-numbers.yaml get /numbers/messages
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:
    get:
      tags:
        - Messages
      summary: List the caller's own SMS inbox/outbox messages
      description: >-
        Lists the caller's own SMS messages, newest first. Supports filtering by
        direction, esimId, numberId, status, peerNumber (substring search, min 3
        characters), and peerKey (exact thread match). Each row includes its
        canonical thread key (`peerKey`).
      operationId: listMessages
      parameters:
        - in: query
          name: page
          required: false
          schema:
            default: 1
            exclusiveMinimum: 0
            type: integer
        - in: query
          name: pageSize
          required: false
          schema:
            default: 20
            maximum: 100
            minimum: 1
            type: integer
        - in: query
          name: direction
          required: false
          schema:
            default: all
            enum:
              - all
              - inbound
              - outbound
            type: string
        - in: query
          name: esimId
          required: false
          schema:
            format: uuid
            type: string
        - in: query
          name: numberId
          required: false
          schema:
            format: uuid
            type: string
        - in: query
          name: status
          required: false
          schema:
            default: all
            enum:
              - all
              - received
              - queued
              - claimed
              - sending
              - sent
              - sent_unconfirmed
              - delivered
              - failed
            type: string
        - in: query
          name: peerNumber
          required: false
          schema:
            maxLength: 64
            minLength: 3
            type: string
        - in: query
          name: peerKey
          required: false
          schema:
            maxLength: 128
            minLength: 1
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicMessageListResponse'
          description: Messages retrieved
        '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 messages = await client.messages.list();

            console.log(messages.items);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            messages = client.messages.list()
            print(messages.items)
components:
  schemas:
    PublicMessageListResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PublicMessageRow'
          type: array
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - items
        - pagination
      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
    PublicMessageRow:
      properties:
        body:
          type:
            - string
            - 'null'
        createdAt:
          format: date-time
          type: string
        deliveryStatus:
          type:
            - string
            - 'null'
        detectedSender:
          type:
            - string
            - 'null'
        direction:
          enum:
            - inbound
            - outbound
          type: string
        esimId:
          format: uuid
          type:
            - string
            - 'null'
        id:
          format: uuid
          type: string
        occurredAt:
          format: date-time
          type: string
        peerKey:
          type:
            - string
            - 'null'
        peerNumber:
          type:
            - string
            - 'null'
        providerCode:
          type:
            - string
            - 'null'
        status:
          enum:
            - received
            - queued
            - claimed
            - sending
            - sent
            - sent_unconfirmed
            - delivered
            - failed
          type: string
      required:
        - id
        - esimId
        - direction
        - status
        - peerNumber
        - peerKey
        - body
        - deliveryStatus
        - detectedSender
        - providerCode
        - occurredAt
        - createdAt
      type: object
    Pagination:
      properties:
        hasNext:
          type: boolean
        hasPrev:
          type: boolean
        page:
          minimum: 1
          type: integer
        pageSize:
          minimum: 1
          type: integer
        pages:
          minimum: 0
          type: integer
        total:
          minimum: 0
          type: integer
      required:
        - hasNext
        - hasPrev
        - page
        - pageSize
        - pages
        - total
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````