> ## 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 a mailbox message



## OpenAPI

````yaml /api-reference/mobilerun-mailbox.yaml get /mailboxes/{mailboxId}/messages/{messageId}
openapi: 3.1.0
info:
  title: Mobilerun Mailbox
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /mailboxes/{mailboxId}/messages/{messageId}:
    get:
      tags:
        - Mailbox Messages
      summary: Get a mailbox message
      operationId: getMailboxMessage
      parameters:
        - in: path
          name: mailboxId
          required: true
          schema:
            format: uuid
            type: string
        - in: path
          name: messageId
          required: true
          schema:
            minLength: 1
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/MailboxMessage'
                required:
                  - data
                type: object
          description: Message retrieved
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Not Found
        '500':
          description: Internal Server Error
      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.mailboxes.messages.retrieve('x', {
              mailboxId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            });

            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.mailboxes.messages.retrieve(
                message_id="x",
                mailbox_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(message.data)
components:
  schemas:
    MailboxMessage:
      properties:
        attachmentCount:
          minimum: 0
          type: integer
        attachments:
          items:
            $ref: '#/components/schemas/MailboxAttachmentMeta'
          type: array
        fromAddress:
          type:
            - string
            - 'null'
        fromName:
          type:
            - string
            - 'null'
        hasOtp:
          type: boolean
        id:
          type: string
        mailboxId:
          format: uuid
          type: string
        receivedAt:
          format: date-time
          type: string
        subject:
          type:
            - string
            - 'null'
        textBody:
          type:
            - string
            - 'null'
      required:
        - id
        - mailboxId
        - fromAddress
        - fromName
        - subject
        - textBody
        - hasOtp
        - attachmentCount
        - attachments
        - receivedAt
      type: object
    MailboxAttachmentMeta:
      properties:
        contentType:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        size:
          minimum: 0
          type: integer
      required:
        - name
        - contentType
        - size
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````