List endpoints return the same envelope:
{
"count": 50,
"limit": 50,
"next_page_token": "eyJwayI6...",
"messages": [ ... ]
}
count integer
How many items are in this page — not the total.
next_page_token string | null
Pass it back as page_token for the next page. null means you have reached the end.
curl "https://api.carlyemail.com/v0/inboxes/$INBOX_ID/messages?limit=50&page_token=$TOKEN" \
-H "Authorization: Bearer $CARLYEMAIL_API_KEY"
Default page size is 50, maximum 200.
Why there is no total
There is no total, no offset and no arbitrary sort_by, and that is not an
oversight. Counting every match means reading every match, which is a query whose
cost grows with your mailbox rather than with your page. The API deliberately
promises nothing it cannot serve cheaply at any size.
Use ascending to flip the direction. The token encodes position, so pages stay
consistent while you walk them even as new mail arrives.
Warning
Treat next_page_token as opaque. Its contents are an implementation detail and
will change.