Missing REST API endpoint for creating widget submessages (polls, todos)
missing feature
### Description of feature missing from another Zulip client
<!-- Is this an entire missing feature? Or part of the feature? -->
**Missing Feature:** REST API endpoint for creating widget submessages (polls and todos)
The Zulip server can display poll and todo widgets created via the web app, but there's no accessible REST API endpoint to create these widgets programmatically from third-party clients like zulip-terminal.
**Current Status:**
- ✅ Web app can create polls and todos
- ✅ Terminal client can **display** widgets (via `submessages` field in message events)
- ❌ Terminal client **cannot create** widgets (API endpoint returns 404)
**Attempted API Call:**
POST /api/v1/messages/{message_id}/submessages
Content-Type: application/x-www-form-urlencoded
message_id=123456
msg_type=widget
content={"widget_type":"poll","extra_data":{"question":"Lunch?","options":["Pizza","Sushi"]}}
→ Response: 404: Unexpected error from the server
**Use Case:**
Implementing slash commands in zulip-terminal to create interactive widgets:
- `/poll Question | Option1 | Option2 | Option3`
- `/todo Task list title | Task 1 | Task 2 | Task 3`
This would allow users to create polls and todo lists directly from the command-line interface without switching to the web app.
<!-- If discussed in #zulip-terminal or another channel on chat.zulip.org, paste link below: -->
### When was this feature first available in Zulip?
If you know:
- **Zulip version:** Unknown (widgets display on feature level 448)
- **Zulip feature level:** Unknown - widgets are displayable but creation API is unavailable
### Other details
**Testing Environment:**
- Server: `https://butibori.zulipchat.com`
- Zulip version: `12.0-dev-2021-ge81ec612c7`
- Feature level: `448`
**What Works:**
- Widget display in zulip-terminal (polls and todos render correctly)
- Receiving widget updates via submessage events
- Interacting with widgets created from web app
**What Doesn't Work:**
- Creating new widgets via REST API from zulip-terminal or other API clients
**Request:**
Please add a documented REST API endpoint for creating widget submessages, or document the correct endpoint/payload format if one already exists.
**Related:**
- Issue #1575 - Make zulip-terminal widgets interactive
关闭于 2026-01-19 0 条评论