# List items

> Items in one scope of a collection, by key in lexicographic order. Narrow with prefix — key your documents so a prefix is meaningful (order:2026-08:...) and this becomes a range scan rather than a filter.

`GET https://api.zavu.dev/v1/memory/collections/{collection}/items`

Items in one scope of a collection, by key in lexicographic order. Narrow with `prefix` — key your documents so a prefix is meaningful (`order:2026-08:...`) and this becomes a range scan rather than a filter.

## Parameters

- `collection` (path, string, required): Collection name.
- `scope` (query, string): Which scope to address: `contact:<contactId>`, `conversation:<conversationId>`, or omitted for the project scope. Note the asymmetry with `POST /v1/memory` and `POST /v1/memory/search`, which take the scope in the request BODY as `scope` plus `contactId`/`conversationId`. Every other Memory endpoint takes it here.
- `prefix` (query, string): Only keys starting with this string.
- `limit` (query, integer)
- `cursor` (query, string)

## Responses

### 200

Items in the scope.

- `items` (object[], required)
  - `key` (string, required)
  - `value` (any): The stored JSON. Any JSON value.
  - `rev` (integer, required): Revision, incremented on every write. Pass it as `If-Match` on a later write to make that write conditional.
  - `createdAt` (string<date-time>, required)
  - `updatedAt` (string<date-time>, required)
  - `expiresAt` (string<date-time>)
- `nextCursor` (string, nullable)

### 400

Invalid scope or query parameters.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

`collection_not_found`: no collection with that name. A collection exists once it is created or written to.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X GET "https://api.zavu.dev/v1/memory/collections/collection_abc123/items" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

const result = await zavu.memory.collections.items.list("collection_abc123");

console.log(result);
```
