Pagination
Offset pagination for most lists, cursor pagination for conversation feeds.
Offset pagination
Most list endpoints take limit and offset query parameters and return:
{
"items": [],
"total": 412,
"limit": 50,
"offset": 0
}total is the full match count for your filters, so you can render page numbers. Walk pages by adding limit to offset:
curl "https://api.smileline.io/patients?limit=50&offset=50" \
-H "Authorization: Bearer $SMILELINE_API_KEY"Cursor pagination
High-churn feeds — conversations and their messages — use cursors instead, so new items arriving mid-scroll can't shift your pages:
{
"items": [],
"nextCursor": "opaque-cursor-string"
}Pass the cursor back to get the next page; a null cursor means you've reached the end.
Cursors are opaque. Don't parse or construct them — only pass back what the API returned.