Actions
| Field | Type | Notes |
|---|---|---|
POST /reactions | { emoji } | Set this number's reaction; an empty emoji removes it. |
POST /read | — | Blue ticks for a received message. Idempotent. |
PATCH | { body } | Edit a text message this number sent, within 15 minutes. |
POST /revoke | — | Delete a message this number sent, for everyone, within about 2.5 days. |
All four live under /v1/messages/{id} and return the updated message. Each is refused before WhatsApp is contacted when it would not apply — a received message cannot be edited, a deleted one cannot be reacted to, a window that has passed has passed. Edits keep the first text and, like deletions, are written to the audit log.
curl -X POST https://www.chatrail.dev/v1/messages/$MESSAGE_ID/reactions \
-H "Authorization: Bearer $CHATRAIL_API_KEY" -H "Content-Type: application/json" \
-d '{ "emoji": "👍" }'Only text messages can be edited. The caption on an image, video or document cannot be changed after sending.
When the other side does it
message.reaction carries by, emoji and removed; reactions are also kept on the message, one per person. message.edited carries the new body, and the message keeps its original text. message.revoked marks the message deleted. Subscribe to them like any event, or to message.*.
Typing, before you answer
POST /v1/connections/{connection}/presence with { "to": "+447700900123", "state": "typing" } shows the typing indicator. Automatic AI replies do this for you: with the AI policy's humanize on (the default) the question is marked read and typing shows briefly before the answer arrives.