count. Walk next until it is null; there is no total from which to compute ceil(count / page_size). Use the next value as given rather than incrementing page yourself.page is bounded from above. The offset ((page - 1) * page_size) may not exceed 2,000,000. Beyond that the request is refused with 404 rather than scanning to that depth for an empty answer. next is withheld at the same boundary, so following links can never walk a client into that 404.from_date / to_date may span at most 60 days. Supply one and the other is derived 60 days away from it. A client that needs to read deeper than the offset cap narrows this window rather than paging further.curl --location 'https://api.sudonum.com.com/v2/whatsapp/messages/?page=1&page_size=200&from_date=2026-07-01T00%3A00%3A00Z&to_date=2026-08-28T23%3A59%3A59Z&status=DELIVERED&type=TEXT&direction=INBOUND&from_whatsapp_number=27833052562&to_whatsapp_number=27104773424&campaign_log_uuid=b2b3a1de-7c44-4f0a-9e63-1f0d5c8a2b19&context_data=chat_intro_log_uuid'count — see MessagePage.{
"next": "https://api.sudonum.com/v2/whatsapp/messages/?page=2&page_size=2",
"previous": null,
"results": [
{
"uuid": "6f5e33df-e179-4108-9fc9-533af53caea5",
"type": "TEXT",
"status": "DELIVERED",
"status_description": "",
"whatsapp_number": "27104773424",
"direction": "INBOUND",
"from_whatsapp_number": "27833052562",
"from_bsuid": null,
"to_whatsapp_number": "27104773424",
"to_bsuid": null,
"message_data": {
"text": "Hello, World!"
},
"meta_data": {},
"context_data": {},
"campaign_log_uuid": null,
"is_coexistence": false,
"is_history": false,
"created": "2026-08-28T08:25:47.559162Z",
"modified": "2026-08-28T08:25:47.559267Z"
},
{
"uuid": "f7bd1b18-4541-4782-a4a0-8fc4f19796c6",
"type": "IMAGE",
"status": "READ",
"status_description": "read",
"whatsapp_number": "27104773424",
"direction": "INBOUND",
"from_whatsapp_number": "27833052562",
"from_bsuid": null,
"to_whatsapp_number": "27104773424",
"to_bsuid": null,
"message_data": {
"url": "https://api.sudonum.com/v2/whatsapp/media/8c1f0e14-2a77-4d3e-9f1b-6a2c5d0e7b43/",
"caption": "a caption",
"mime_type": "image/jpeg"
},
"meta_data": {},
"context_data": {},
"campaign_log_uuid": null,
"is_coexistence": false,
"is_history": false,
"created": "2026-08-28T08:25:47.557894Z",
"modified": "2026-08-28T08:25:47.557943Z"
}
]
}