Skip to main content

Queue pending message

POST /api/v1/conversations/{conversation_id}/pending-messages

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)

Parameters

NameInTypeRequiredDescription
conversation_idpathstringyes

Responses

StatusDescription
201Successful Response
422Validation Error

Response body

FieldTypeRequiredDescription
idstringyes
queuedbooleanyes
positionintegeryesPosition in the queue (1-based)

Operation ID: queue_pending_message_api_v1_conversations__conversation_id__pending_messages_post