> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superdoc.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# diff.capture

> Capture the current document's diffable state as a versioned snapshot. v1 covers body, comments, styles, and numbering. Header/footer content is not included.

## Summary

Capture the current document's diffable state as a versioned snapshot. v1 covers body, comments, styles, and numbering. Header/footer content is not included.

* Operation ID: `diff.capture`
* API member path: `editor.doc.diff.capture(...)`
* Mutates document: `no`
* Idempotency: `idempotent`
* Supports tracked mode: `no`
* Supports dry run: `no`
* Deterministic target resolution: `yes`

## Expected result

Returns a DiffSnapshot with a fingerprint and opaque payload.

## Input fields

*No fields.*

### Example request

```json theme={null}
{}
```

## Output fields

| Field | Type | Required | Description |
| - | - | - | - |
| `coverage` | object | yes | |
| `coverage.body` | `true` | yes | Constant: `true` |
| `coverage.comments` | boolean | yes | |
| `coverage.headerFooters` | boolean | yes | |
| `coverage.numbering` | boolean | yes | |
| `coverage.styles` | boolean | yes | |
| `engine` | enum | yes | `"super-editor"` |
| `fingerprint` | string | yes | |
| `payload` | object | yes | |
| `version` | enum | yes | `"sd-diff-snapshot/v1"`, `"sd-diff-snapshot/v2"` |

### Example response

```json theme={null}
{
  "coverage": {
    "body": true,
    "comments": true,
    "headerFooters": true,
    "numbering": true,
    "styles": true
  },
  "engine": "super-editor",
  "fingerprint": "example",
  "payload": {},
  "version": "sd-diff-snapshot/v1"
}
```

## Pre-apply throws

* None

## Non-applied failure codes

* None

## Raw schemas

> [accordion] Raw input schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {},
>   "type": "object"
> }
> ```

> [accordion] Raw output schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "coverage": {
>       "additionalProperties": false,
>       "properties": {
>         "body": {
>           "const": true,
>           "type": "boolean"
>         },
>         "comments": {
>           "type": "boolean"
>         },
>         "headerFooters": {
>           "type": "boolean"
>         },
>         "numbering": {
>           "type": "boolean"
>         },
>         "styles": {
>           "type": "boolean"
>         }
>       },
>       "required": [
>         "body",
>         "comments",
>         "styles",
>         "numbering",
>         "headerFooters"
>       ],
>       "type": "object"
>     },
>     "engine": {
>       "enum": [
>         "super-editor"
>       ],
>       "type": "string"
>     },
>     "fingerprint": {
>       "type": "string"
>     },
>     "payload": {
>       "description": "Opaque engine-owned snapshot data.",
>       "type": "object"
>     },
>     "version": {
>       "enum": [
>         "sd-diff-snapshot/v1",
>         "sd-diff-snapshot/v2"
>       ],
>       "type": "string"
>     }
>   },
>   "required": [
>     "version",
>     "engine",
>     "fingerprint",
>     "coverage",
>     "payload"
>   ],
>   "type": "object"
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.