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

# Queue Pending Message

> Queue a message for delivery when conversation becomes ready.

This endpoint allows users to submit messages even when the conversation's
WebSocket connection is not yet established. Messages are stored server-side
and delivered automatically when the conversation transitions to READY status.

Args:
    conversation_id: The conversation ID (can be task ID before conversation is ready)
    request: The FastAPI request containing message content

Returns:
    PendingMessageResponse with the message ID and queue position

Raises:
    HTTPException 400: If the request body is invalid
    HTTPException 429: If too many pending messages are queued (limit: 10)



## OpenAPI

````yaml /openapi/openhands-cloud.json post /api/v1/conversations/{conversation_id}/pending-messages
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/v1/conversations/{conversation_id}/pending-messages:
    post:
      tags:
        - Pending Messages
      summary: Queue Pending Message
      description: >-
        Queue a message for delivery when conversation becomes ready.


        This endpoint allows users to submit messages even when the
        conversation's

        WebSocket connection is not yet established. Messages are stored
        server-side

        and delivered automatically when the conversation transitions to READY
        status.


        Args:
            conversation_id: The conversation ID (can be task ID before conversation is ready)
            request: The FastAPI request containing message content

        Returns:
            PendingMessageResponse with the message ID and queue position

        Raises:
            HTTPException 400: If the request body is invalid
            HTTPException 429: If too many pending messages are queued (limit: 10)
      operationId: >-
        queue_pending_message_api_v1_conversations__conversation_id__pending_messages_post
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            title: Conversation Id
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingMessageResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    PendingMessageResponse:
      properties:
        id:
          type: string
          title: Id
        queued:
          type: boolean
          title: Queued
        position:
          type: integer
          title: Position
          description: Position in the queue (1-based)
      type: object
      required:
        - id
        - queued
        - position
      title: PendingMessageResponse
      description: Response when queueing a pending message.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````