Messages in a chat
The chat's messages, most recent first (up to 100 per page). Each media file comes with the Wappfy link when it has already been stored by the webhook; the query does not download from WhatsApp (has_media: true with media: null).
X-Api-Key: wpf_YOUR_KEYThe connection's API key (wpf_...), generated in the dashboard.
Authorization: Bearer wpf_YOUR_KEYThe same key in Authorization: Bearer wpf_... (what n8n, Make and HTTP libraries support out of the box).
chatId*stringThe chat: the chat_id from GET /chats or from the webhooks (...@c.us, ...@lid, ...@g.us), or the phone number with country code and area code. Brazilian phone numbers are checked on WhatsApp, as when sending.
limit?integerHow many items to return (1 to 100; default 20).
1 <= value <= 10020offset?integerHow many items to skip from the start, for the next page (default 0). Always advance limit by limit.
0 <= value <= 1000000before?integerOptional: only messages before this moment (seconds since 1970, exclusive).
0 < valueafter?integerOptional: only messages after this moment (seconds since 1970, exclusive).
0 <= valueThe messages on the page.
application/json- response
data*array<>curl -X GET 'https://app.wappfy.io/api/v1/chats/5581999999999/messages' \ -H 'X-Api-Key: wpf_YOUR_KEY'{ "data": [ { "message_id": "string", "chat_id": "string", "from_me": true, "from": "string", "is_group": true, "type": "string", "text": "string", "has_media": true, "media": { "url": "string", "mimetype": "string" }, "reply_to": "string", "status": "failed", "timestamp": 0 } ]}
