Skip to content

docs: Add send-message REST endpoint documentation#482

Open
malhotra5 wants to merge 1 commit intomainfrom
docs/add-send-message-endpoint
Open

docs: Add send-message REST endpoint documentation#482
malhotra5 wants to merge 1 commit intomainfrom
docs/add-send-message-endpoint

Conversation

@malhotra5
Copy link
Copy Markdown
Contributor

Summary

Add documentation for the new POST /api/v1/app-conversations/{id}/send-message REST endpoint that allows sending follow-up messages to conversations without establishing a WebSocket connection.

Changes

  • Updated the "App conversations" section in the Key resources to include the new endpoint
  • Added a new "Sending messages to conversations" section with:
    • Prerequisites (sandbox must be in RUNNING state)
    • Request/response format examples
    • Error response codes table
    • Alternative approaches (WebSocket, direct agent server REST API)
    • Design note about being a thin proxy (no additional processing logic)

Related

This documentation accompanies the feature PR: OpenHands/OpenHands#14182


This PR was created by an AI agent (OpenHands).

@malhotra5 can click here to continue refining the PR

Add documentation for the new POST /api/v1/app-conversations/{id}/send-message
endpoint that allows sending follow-up messages to conversations without
a WebSocket connection.

Includes:
- Request/response format examples
- Prerequisites (sandbox must be RUNNING)
- Error response codes
- Alternative approaches (WebSocket, direct agent server API)
- Design note about being a thin proxy

Related to: OpenHands/OpenHands#14182

Co-authored-by: openhands <openhands@all-hands.dev>
@mintlify
Copy link
Copy Markdown

mintlify Bot commented Apr 28, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
all-hands-ai 🟢 Ready View Preview Apr 28, 2026, 6:07 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copy link
Copy Markdown
Contributor

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation is clear and well-structured. A few suggestions to improve completeness for end users.

}
```

| Field | Type | Required | Description |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: The description mentions "text and/or image" but only shows a text example. Consider adding an example of the image content block format:

{
  "role": "user",
  "content": [
    {"type": "text", "text": "Check this image:"},
    {"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}}
  ],
  "run": true
}

Or add a link to documentation that describes the content block schema in detail.

```

### Error responses

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: The error description says "Resume it first" for STARTING/STOPPING states, but the prerequisites section (line 47) correctly says to "wait" for STARTING state, not resume it. Consider clarifying:

Suggested change
| 409 | Sandbox is not running. For PAUSED state, resume it first. For STARTING state, wait for it to reach RUNNING. |

| 503 | Sandbox is in error state or agent server is unavailable. |

### Alternative approaches

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: The conversation_url field is referenced but not explained. Consider either:

  • Adding a sentence explaining what this field contains (e.g., "the base URL for direct agent server API calls")
  • Linking to documentation for the GET /api/v1/app-conversations/{id} endpoint response schema
  • Or providing an example showing what a conversation_url looks like

This endpoint is a convenience wrapper. You can also interact with the agent server directly:

1. **WebSocket**: Connect to the agent server's WebSocket endpoint for real-time bidirectional communication.
2. **Agent Server REST API**: Call the agent server's REST endpoints directly using the `conversation_url` from <code>GET /api/v1/app-conversations/{id}</code>.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: Webhook callbacks are mentioned but not explained or linked. Consider either:

  • Linking to webhook callback documentation if it exists
  • Or briefly explaining what webhook callbacks are in this context (e.g., "via the conversation's webhook configuration")

This helps users understand how to implement custom processing without having to search for webhook documentation separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants