---
title: "Export sealed ledger lines"
description: "Requires a workspace-bound API key with ledger:read. Returns ledger lines in record order after afterSeq. Each item carries the exact canonical line text, so a client can write NDJSON and run the offline reference checker (`y2-ledger check`) against it. The log is append-only: continuing from meta.nextAfterSeq never skips or repeats a line."
canonical: https://y2.dev/docs/api/reference/ontology-ledger/listLedgerRecordsV2/
---

Endpoint Reference[Ontology Ledger](https://y2.dev/docs/api/reference/ontology-ledger)

# Export sealed ledger lines

Requires a workspace-bound API key with ledger:read. Returns ledger lines in record order after afterSeq. Each item carries the exact canonical line text, so a client can write NDJSON and run the offline reference checker (\`y2-ledger check\`) against it. The log is append-only: continuing from meta.nextAfterSeq never skips or repeats a line.

`GET https://api.y2.dev/api/v2/ledger/records`

- Operation ID: `listLedgerRecordsV2`
- Required scopes: `ledger:read`
- Contract: https://y2.dev/openapi.json

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `afterSeq` | query | integer | No | Return lines with seq greater than this. Start at 0. |
| `limit` | query | integer | No |  |

## Responses

| Status | Description | Body |
| --- | --- | --- |
| 200 | Sealed lines after afterSeq. | `LedgerRecordListResponse` |
| 400 | Invalid request parameters |  |
| 401 | Missing or invalid API key |  |
| 403 | Insufficient permissions or access denied |  |
| 429 | Rate limit exceeded (per-key or per-account aggregate) |  |
| 500 | Internal server error |  |

### 200 response fields

| Field | Type | Description |
| --- | --- | --- |
| `data[]` | array of `LedgerRecord` |  |
| `data[].id` | string |  |
| `data[].type` | string |  |
| `data[].kind` | `subject`, `designator`, `observation`, `assertion` |  |
| `data[].seq` | integer |  |
| `data[].hash` | string |  |
| `data[].line` | string | The exact canonical JSON line. Its SHA-256 without the hash field is hash. |
| `data[].record` | object | The parsed line, in the framework's snake_case field names. |
| `meta` | `LedgerSeqWindowMeta` |  |
| `meta.afterSeq` | integer |  |
| `meta.nextAfterSeq` | integer |  |
| `meta.hasMore` | boolean |  |
