X-AgentFlow-Bot-Token and proxy to the Matrix Client-Server API under the hood.
POST /api/v1/sendMessage
Sendm.text to a room the bot has joined.
Request
| Field | Type | Required | Description |
|---|---|---|---|
room_id | string | yes | Matrix room id starting with ! |
text | string | yes | message body, max 40 000 chars |
markdown | bool | no | render **bold**, *italic*, `code`, line breaks |
reply_to | string | no | event_id to reply to (Matrix m.in_reply_to) |
Response
event_id for follow-ups (edit, redact, react).
Errors
| Status | Body error | Meaning |
|---|---|---|
| 400 | invalid_body | schema validation failed (check detail) |
| 403 | forbidden | bot is not in this room — call /api/v1/joinRoom first |
| 404 | room_not_found | |
| 502 | send_failed | upstream Matrix returned 5xx — retry safe |
TypeScript
Python (planned v0.2)
POST /api/v1/joinRoom
Bot joins a room by id or alias.Response
- already invited to the room (DM, manual invite), OR
- joining a public-discoverable room by alias
Coming soon (v0.2)
POST /api/v1/sendPhoto— upload + sendm.imagePOST /api/v1/sendDocument—m.filePOST /api/v1/editMessage—m.replacerelationPOST /api/v1/deleteMessage— redactPOST /api/v1/setReaction— annotate with emojiPOST /api/v1/inviteUserGET /api/v1/rooms/GET /api/v1/rooms/:id/members