Send messages
Mark as read
Mark a received message as read with POST /v1/messages/{id}/read and optionally show the typing indicator.
POST /v1/messages/{id}/read marks a message the contact sent as read. With typing: true, it also shows the typing indicator.
Before you start
Section titled “Before you start”- An API key with the
sendpermission. - The
id(msg_…) of the received message, which comes in themessage.receivedevent.
Mark as read
Section titled “Mark as read”curl -X POST https://api.messajo.com/v1/messages/msg_.../read \ -H "Authorization: Bearer $MESSAJO_API_KEY"With the typing indicator:
curl -X POST https://api.messajo.com/v1/messages/msg_.../read \ -H "Authorization: Bearer $MESSAJO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "typing": true }'import { Messajo } from "@messajo/sdk";
const messajo = new Messajo({ apiKey: process.env.MESSAJO_API_KEY! });
await messajo.messages.markRead("msg_...");The SDK method takes no typing argument. To show the typing indicator, call the REST API (cURL tab) or send typing: true on the next send.
n8n HTTP Request node settings
- Method:
POST - URL:
https://api.messajo.com/v1/messages/msg_.../read - Authentication: Generic Credential Type, then Header Auth. Name:
Authorization; Value:Bearer mj_... - Headers: turn on Send Headers and add
Idempotency-Key(a unique value per item) - Body: turn on Send Body; Body Content Type: JSON; Specify Body: Using JSON
{ "typing": true}Replace mj_... with your API key.
The response returns the id and the confirmation:
{ "id": "msg_...", "read": true }Fields
Section titled “Fields”| Field | Description |
|---|---|
id (path) |
msg_… id of the received message. |
typing (body, optional) |
true shows the typing indicator. Default false. |
By channel
Section titled “By channel”- WhatsApp: the typing indicator always marks the message as read.
- Instagram:
typing: trueshows the typing indicator before sending andPOST /v1/messages/{id}/readmarks the conversation as seen. - Messenger: uses the same engine as Instagram, see Messages.
typing spends one token from the number’s bucket (see Limits).
Common errors
Section titled “Common errors”not_found(404): theiddoes not exist.connection_rate_limited(429): no token left in the bucket. Wait forRetry-Afterand retry.