Get chat history
One contact’s WhatsApp messages in the authorized channel, newest first, one page at a time: incoming and outgoing, with who sent it, type, text, media link, delivery status and any delivery error. For outgoing messages, sentBy.kind says who sent it and is one of a fixed set: ai_agent (the AI agent), team, admin or owner (a person sending from the inbox, by their role; sentBy.name is that person’s name), automation, api (sent through the API), campaign, webhook, system (reminders and follow-ups) or other. We tell API users before this list changes. sentBy.type is the raw internal label (for example mastra, agent, API) and can hold other values, so build on sentBy.kind; sentBy.name is the agent, person, automation or API reference. Incoming messages have sentBy null. The contact is found by phone (country code first) or WhatsApp BSUID, the same way the send endpoints find it.
Authentication: API key via X-API-Key header (or Authorization: Bearer). Permissions: User API key Rate limit: api_read — 120 requests/min per API user.

