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

# Get one of the caller's SMS messages

> Returns one message. For an outbound message that is not yet final, the status may be refreshed once (at most every 30 s) before it is returned; a failed refresh returns the stored message.



## OpenAPI

````yaml /api-reference/mobilerun-numbers.yaml get /numbers/messages/{id}
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/{id}:
    get:
      tags:
        - Messages
      summary: Get one of the caller's SMS messages
      description: >-
        Returns one message. For an outbound message that is not yet final, the
        status may be refreshed once (at most every 30 s) before it is returned;
        a failed refresh returns the stored message.
      operationId: getMessage
      parameters:
        - in: path
          name: id
          required: true
          schema:
            example: 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/PublicMessageRow'
                required:
                  - data
                type: object
          description: Message retrieved
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageErrorResponse'
          description: Messaging is unavailable. See `code` for details.
      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 message = await
            client.messages.retrieve('550e8400-e29b-41d4-a716-446655440000');


            console.log(message.data);
        - 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
            )
            message = client.messages.retrieve(
                "550e8400-e29b-41d4-a716-446655440000",
            )
            print(message.data)
components:
  schemas:
    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
    ApiErrorEnvelope:
      properties:
        code:
          type: string
        details: {}
        message:
          type: string
        retryAfterSeconds:
          type: number
        traceId:
          type: string
      required:
        - code
        - message
      type: object
    MessageErrorResponse:
      description: >-
        Messaging error envelope. `code` is the canonical discriminator (see
        `MessageErrorReason` for the code set).
      properties:
        code:
          $ref: '#/components/schemas/MessageErrorReason'
        message:
          type: string
      required:
        - code
        - message
      type: object
    MessageErrorReason:
      description: >-
        Stable machine-readable messaging error code. Unknown future values
        should be handled as a generic error with the same HTTP status.
      enum:
        - not_installed
        - missing_device
        - missing_subscription
        - idempotency_key_reused
        - send_disabled
        - daily_cap_exceeded
        - rate_limited
        - capability_unavailable
        - invalid_recipient
        - unsupported_destination
        - body_too_long
        - daily_limit_reached
        - number_rate_limited
        - product_disabled
      type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.