> ## Documentation Index
> Fetch the complete documentation index at: https://hc.saas-manager.biz.nuro.jp/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination

> AI Helpdesk API list endpoints control result size with the `limit` query parameter. There is no page number or cursor.

## Limiting Results

List endpoints accept a `limit` query parameter. The default and maximum vary by endpoint.

| Endpoint                    | Default | Maximum |
| --------------------------- | ------- | ------- |
| `GET /api/v1/sessions`      | 50      | 100     |
| `GET /api/v1/knowledge`     | 50      | 100     |
| `GET /api/v1/procedures`    | 200     | 500     |
| `GET /api/v1/notifications` | 20      | 100     |

The API does not provide `page`, `offset`, or cursor parameters, and does not return a continuation token for fetching the next page.

## Response Shape

List endpoints return an array of resources together with a `count` field.

```json theme={null}
{
  "ok": true,
  "sessions": [
    // array of sessions
  ],
  "count": 23
}
```

### Response Fields

| Field                                                                     | Type    | Description                                   |
| ------------------------------------------------------------------------- | ------- | --------------------------------------------- |
| `ok`                                                                      | boolean | `true` on success                             |
| `sessions` / `articles` / `procedures` / `notifications` / `integrations` | array   | Resource array (key name depends on endpoint) |
| `count`                                                                   | integer | Number of items in this response              |

`count` is the count **in this response**, not a tenant-wide total.

## Filters

Some list endpoints accept filter parameters.

### `GET /api/v1/sessions`

| Parameter      | Values                                                   | Description             |
| -------------- | -------------------------------------------------------- | ----------------------- |
| `status`       | `open` / `in_progress` / `pending_approval` / `resolved` | Filter by status        |
| `assigneeType` | `unassigned` / `ai_agent` / `human_agent` / `requester`  | Filter by assignee type |

### `GET /api/v1/knowledge`

| Parameter  | Description              |
| ---------- | ------------------------ |
| `category` | Filter by category       |
| `type`     | Filter by knowledge type |

<Info>
  **About `assigneeType` and `type` filters**

  `assigneeType` (sessions) and `type` (knowledge) are applied **in memory after the first `limit` rows are read from DynamoDB**. When either filter is set, `count` in the response reflects matches **within those first `limit` rows only** — not the tenant-wide total.

  For exhaustive enumeration, omit these filters and filter on the client side.
</Info>

## Examples

### cURL

```bash theme={null}
# Default 50 items
curl -H "X-API-Key: YOUR_API_KEY" \
  https://assist.i.moneyforward.com/api/v1/sessions

# Up to 100 items
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://assist.i.moneyforward.com/api/v1/sessions?limit=100"

# Only open sessions
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://assist.i.moneyforward.com/api/v1/sessions?status=open"
```

### JavaScript

```javascript theme={null}
async function fetchSessions({ status, limit = 50 } = {}) {
  const params = new URLSearchParams();
  if (status) params.set('status', status);
  params.set('limit', String(limit));

  const response = await fetch(
    `https://assist.i.moneyforward.com/api/v1/sessions?${params}`,
    {
      headers: {
        'X-API-Key': 'YOUR_API_KEY'
      }
    }
  );

  return response.json();
}
```

## Best Practices

1. Do not request more than you need with `limit` — larger responses take longer to fetch and parse.
2. When using `assigneeType` or `type` filters, remember `count` is partial. If you need a complete enumeration, fetch without the filter and filter client-side.
3. Keep concurrency below \~20 RPS per API key to avoid pressuring upstream DynamoDB capacity.
