Pagination & Filtering
Paging
List endpoints take page (from 1) and limit (default 100, max 500) and return page_context:
{
"data": [ ... ],
"page_context": { "count": 100, "page": 1, "per_page": 100, "total": 250, "has_more": true }
}
Keep requesting page + 1 while has_more is true.
Reading new mail without missing any
New mail arrives while you page, so for a poll loop use the change time instead of page numbers:
# Every message stored or changed since the last run, oldest first
curl "https://mail.finopsbricks.com/api/v1/messages?updated_since=2026-11-17T09:00:00Z&direction=inbound" \
-H "api-key: fob_mail_xxxxxxxxxxxx" -H "api-secret: xxxxxxxxxxxxxxxx"
Remember the largest updated_at you saw and pass it as updated_since next time. Threads take
updated_since too (a thread changes when it gets a message or its status, assignee or labels
change), with sort_order=ASC for oldest first.
Dates
date_from, date_to and updated_since take an ISO date (2026-11-01) or timestamp
(2026-11-01T09:30:00Z). On threads the dates are the last message's; on messages, the sent date.
Fields
GET /api/v1/messages leaves bodies out unless you ask: fields=id,subject,body_text.