API Reference
Pagination & Filters
MemorySync list endpoints page through results with either an offset/limit window or an opaque cursor. Filtering uses query parameters; advanced filters use a small structured grammar. This page describes both forms and when each is used.
Two pagination forms
| Form | Used by | Why |
|---|---|---|
offset / limit | Most admin and dashboard list endpoints (audit logs, projects, webhooks). | Random page access; total count visible. |
cursor | Memory listings, large delivery histories. | Stable across writes; new rows appear on the first page only. |
Offset / limit pagination
offset— zero-based index of the first item to return. Default0.limit— number of items per page. Default50, max100.- Response includes
total,offset,limit,has_next.
JSON
{
"items": [ /* records */ ],
"total": 412,
"offset": 0,
"limit": 50,
"has_next": true
}Cursor pagination
cursor— opaque token returned inpagination.next. Omit on first page.limit— page size; same defaults as above.- Cursors are stable across writes — new rows appear on the first page, never in the middle of an iteration.
JSON
{
"items": [ /* records */ ],
"cursor": "eyJpZCI6MTIzfQ",
"has_next": true
}Iteration pattern
PYTHON
cursor = None
while True:
page = client.memory.list(project_id="proj_main", cursor=cursor, limit=100)
for item in page["items"]:
process(item)
if not page.get("has_next"):
break
cursor = page["cursor"]Filter parameters
Each list endpoint exposes its own filter set. The common pattern is field-equals via query string, with comma-separated lists for OR semantics:
project_id=proj_main— exact match.tags=alpha,beta— OR over comma-separated values.created_after=2026-05-01T00:00:00Z— inclusive RFC 3339 lower bound.created_before=2026-06-01T00:00:00Z— exclusive upper bound.
Sort order
Endpoints that support sort accept order as field:direction, for example order=created_at:desc. The default order is documented per-endpoint.
Pagination errors
| Code | When |
|---|---|
invalid_cursor | Cursor is malformed or expired. |
limit_out_of_range | limit exceeds the per-endpoint maximum. |
incompatible_pagination | Mixing offset and cursor in the same request. |