Query items by field
Find items by an indexed field instead of by key, within one scope.
The field must have been declared in indexes when the collection was created. Querying any other field returns 400 field_not_indexed — including every field of a collection that was auto-created by its first write, which has no indexes at all.
Authorization
AuthorizationheaderrequiredBearer YOUR_API_KEY. Create a key in the dashboard.
Path parameters
collectionstringrequiredCollection name.
Query parameters
scopestringWhich scope to address:
contact:<contactId>,conversation:<conversationId>, or omitted for the project scope.Note the asymmetry with
POST /v1/memoryandPOST /v1/memory/search, which take the scope in the request BODY asscopepluscontactId/conversationId. Every other Memory endpoint takes it here.
Body
application/json
whereobjectrequiredOne condition on one indexed field.
betweenbounds are inclusive and must be the same type.5 properties
fieldstringrequiredopstringrequiredOne ofeqbeginsWithbetweenvalueanyThe value to match. Used by
eq(string, number or boolean) andbeginsWith(string).fromanyLower bound, for
between.toanyUpper bound, for
between.
limitintegerDefault50Limitsmin 1 · max 100cursorstring
Responses
200Matching items.
itemsobject[]required6 properties
keystringrequiredvalueanyThe stored JSON. Any JSON value.
revintegerrequiredRevision, incremented on every write. Pass it as
If-Matchon a later write to make that write conditional.createdAtstring<date-time>requiredupdatedAtstring<date-time>requiredexpiresAtstring<date-time>
nextCursorstring
400Invalid body or scope, or `field_not_indexed` when the field carries no index.
codestringrequiredmessagestringrequireddetailsobject
401Unauthorized.
codestringrequiredmessagestringrequireddetailsobject
404Collection not found.
codestringrequiredmessagestringrequireddetailsobject