For the complete documentation index, see llms.txt. This page is also available as Markdown.

Reading conversations

List your conversations and read their history.

Two endpoints cover it: /chats/ for the list of conversations, and /messages/ for what was said in each one.

1

List your chats

curl -H "Authorization: Token $SERVICE_TOKEN" $INBOX/api/v1/chats/

Chats come back with the most recent conversation first. Each one has the contact you are talking to, its wa_id, and new_messages — how many messages this user has not yet received.

To get only chats with something new, add ?unread=true.

Reference: List chats

2

Read a conversation

curl -H "Authorization: Token $SERVICE_TOKEN" "$INBOX/api/v1/messages/?wa_id=$WA_ID&limit=20"

You get the 20 most recent messages, newest first. Each message has:

  • waba_payload — the message exactly as WhatsApp sent it: type, text, timestamp, media and so on

  • from_us — false if the customer sent it, true if you did

  • sender — which user sent it, for messages from you

Reference: List messages

3

Load older messages

Take waba_payload.timestamp of the oldest message you have, and ask for the ones before it:

curl -H "Authorization: Token $SERVICE_TOKEN" "$INBOX/api/v1/messages/?wa_id=$WA_ID&limit=20&before_time=1759150800"

Use before_time rather than offset: new messages can arrive while you page, which shifts offsets but not timestamps.

Was this helpful?