---
title: "Blok BlockData — Per-Block Payload Reference"
description: "What lives inside a block's data field, how tunes attach to it, and how parentId and contentIds express nesting."
source: https://blokeditor.com/docs/block-data/
lastmod: 2026-09-07
---

Framework JavaScript

Data types BlockData

On this page id

# BlockData: the per-block payload

The structure of each block in the blocks array.

[Edit this page on GitHub](https://github.com/JackUait/blok/blob/main/docs/src/components/api/api-data.ts)

TypeScript

```
// Individual block structure
interface OutputBlockData {
  id?: string;        // Unique identifier (auto-generated)
  type: string;       // Tool name (e.g., "paragraph", "header")
  data: object;       // Tool-specific data
  tunes?: { [name: string]: BlockTuneData }; // Optional block tunes/metadata
  parent?: string;    // Id of the parent block (flat-with-references nesting)
  content?: string[]; // Ids of child blocks (flat-with-references nesting)
  indent?: number;    // Nesting/indent level
  lastEditedAt?: number; // Timestamp (ms since epoch) of the last edit — omitted until the block is actually edited
  lastEditedBy?: string; // Id of the user who last edited this block (from user.id config)
}

// Example blocks:
const paragraphBlock: OutputBlockData = {
  id: "p6QK0Xz1Ab",
  type: "paragraph",
  data: { "text": "Hello, world!" }
};

const headerBlock: OutputBlockData = {
  id: "hM3lTn9RdC",
  type: "header",
  data: { "text": "Chapter 1", "level": 1 }
};

// Each list item is its own block — the list tool saves a single item,
// not an items[] array
const listItemBlock: OutputBlockData = {
  id: "wY7bV2sQ8e",
  type: "list",
  data: {
    "text": "Item 1",
    "style": "unordered"
  }
};
```

## OutputBlockData

| Property | Description |
| --- | --- |
| `id` | `string (optional)` | Unique block identifier |
| `type` | `string` | Block type name |
| `data` | `object` | Block-specific data |
| `tunes` | `{ [name: string]: BlockTuneData }` | Block tunes/meta data |
| `parent` | `string (optional)` | Id of the parent block (flat-with-references nesting). On input the loose wire shape also accepts `null`, which is treated as absent — a root-level block. |
| `content` | `string[] (optional)` | Ids of child blocks (flat-with-references nesting). On input the loose wire shape also accepts `null` or `[]`, both treated as absent — a childless block. |
| `indent` | `number (optional)` | Nesting/indent level |
| `lastEditedAt` | `number (optional)` | Timestamp (ms since epoch) of the last edit to this block. Only present once the block's content actually changes — loading a document is not an edit, so a merely-rendered document saves back exactly what it loaded. equalsOutputData ignores this field. |
| `lastEditedBy` | `string (optional)` | Id of the user who last edited this block (from the user.id config) |
