---
title: "Create Document File"
method: POST
path: "/v1/create"
---

# Create Document File

`POST /v1/create`

## Request

- Base URL: `https://api.versionstory.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.versionstory.com/v1/create`
- Auth: HTTP bearer

Create a new Word document, with no source file, by applying edits to a blank document: the same edits, schema and
refusals POST /v1/edit takes, resolved against a document of no paragraphs and one section.

Put the first content at the body's start or end, with the destination {"position": "end"} (no paragraph or
table), give each paragraph, table or header that a later edit names a ref, and name it by that ref, as an edit
names content its own request creates. Every edit type is accepted: headings and lists (insert_paragraphs with
style_id, list and list_level), runs with their formats, fields and hyperlinks, tables (header_row, and
{"new_paragraphs": [...], "span": 2} for a cell merged across two grid columns), headers and footers
(add_header_footer for section {"index": 0}, a page number being the field run {"type": "field", "code": "PAGE"}; a first-page
one needs set_page_setup's different_first_page), comments, a table of contents, page setup and document settings.
An edit naming something a blank document lacks is refused as POST /v1/edit refuses it. The result is one clean Word
document with every change accepted. Paragraph styles are Normal (the default), Heading1 to Heading4, and those of
an uploaded template. The edits reference lists every edit type's fields with an example of each.

The created document is a file like an uploaded one: the answer carries it as GET /v1/files/{file_id} answers for it, its file_id
reads with GET /v1/files/{file_id}?format=md and changes with POST /v1/edit, and it is served as docx (the default), pdf, md, json or html. With wait
true the request holds until the document is made (up to 5 s) and answers as GET /v1/create/{creation_id} does, the
file's downloads in the formats outputs names, each with its bytes when inline is true; otherwise, or while it is
still processing, poll GET /v1/create/{creation_id} until it is ready. Its pdf, md, json and html are made from the
document once it is written, so a ready creation's file can still list them in pending_formats: poll again after
Retry-After.

## Headers

- `X-Customer-Id` string, nullable: Id of one of your customers (created in the developer dashboard) to attribute this request's credit usage to. Billing and limits stay organization-wide.

## Request body

- CreateRequest: POST /v1/create with a JSON body. A request that uploads style_template or pictures is multipart, with the same fields and edits as a JSON string.
  - `name` string, required: The new document's file name, ending in .docx.
  - `author` string, nullable: The name new comments carry when an edit names none; at most 255 characters, one line. Omitted, it is the signed-in user's own name (Version Story AI for an API key, which acts as its organization's service account).
  - `date` string, nullable: ISO 8601 date and time on new comments; defaults to the time of the request.
  - `wait` boolean: Hold the response until the job finishes (up to 5 s).
  - `inline` boolean: With wait: return the created file's bytes in the body.
  - `outputs` string[], nullable: With wait: the created file's formats, docx (the default), pdf, md, json or html, as GET /v1/create/{creation_id} takes them.
  - `edits` union[], required: The edits that write the new document, applied in order to a blank document: the same edits, schema and refusals as edit's, resolved against a document of no paragraphs and one section. Place the first content at the body's start or end ({"position": "end"} as a destination), give what later edits name a ref, and name it by that ref; the output is one clean Word document, every change accepted. Before your first create, call GET /v1/reference/{topic} with topic edits: it gives every type's fields and an example of each.
    - union
      - InsertEdit
        - `type` 'insert', required
        - `paragraphs` union, required: A paragraph locator, {"from": locator, "through": locator}, an array of those, "all", or {"all": true, "part": {...}}.
          - 'all'
          - AllParagraphs: Every paragraph of the matching parts; a part with only kind matches every part of that kind.
            - `all` true, required
            - `part` PartLocator, required: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - union[]
            - union
              - …
        - `at` union, required
          - 'start' | 'end'
          - AtAfter
            - `after` Selector, required: Text in the named paragraphs: match, with optional context and which occurrence.
              - …
          - AtBefore
            - `before` Selector, required: Text in the named paragraphs: match, with optional context and which occurrence.
              - …
        - `content` union, required: A string ("\t" a tab, "\n" a line break) or an array of runs in the listing's shapes.
          - string
          - union[]
            - union
              - …
      - ReplaceEdit
        - `type` 'replace', required
        - `paragraphs` union, required: A paragraph locator, {"from": locator, "through": locator}, an array of those, "all", or {"all": true, "part": {...}}.
          - 'all'
          - AllParagraphs: Every paragraph of the matching parts; a part with only kind matches every part of that kind.
            - `all` true, required
            - `part` PartLocator, required: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - union[]
            - union
              - …
        - `text` Selector, required: Text in the named paragraphs: match, with optional context and which occurrence.
          - `match` union, required: Text or runs.
            - string
            - union[]
              - …
          - `prefix` string, nullable
          - `suffix` string, nullable
          - `occurrence` union: Omitted: the match must be unique; N: the Nth; all: every match.
            - integer: Counted from 1.
            - 'all'
        - `content` union, required: A string ("\t" a tab, "\n" a line break) or an array of runs in the listing's shapes.
          - string
          - union[]
            - union
              - …
      - DeleteEdit
        - `type` 'delete', required
        - `paragraphs` union, required: A paragraph locator, {"from": locator, "through": locator}, an array of those, "all", or {"all": true, "part": {...}}.
          - 'all'
          - AllParagraphs: Every paragraph of the matching parts; a part with only kind matches every part of that kind.
            - `all` true, required
            - `part` PartLocator, required: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - union[]
            - union
              - …
        - `text` Selector, required: Text in the named paragraphs: match, with optional context and which occurrence.
          - `match` union, required: Text or runs.
            - string
            - union[]
              - …
          - `prefix` string, nullable
          - `suffix` string, nullable
          - `occurrence` union: Omitted: the match must be unique; N: the Nth; all: every match.
            - integer: Counted from 1.
            - 'all'
      - FormatEdit
        - `type` 'format', required
        - `paragraphs` union, required: A paragraph locator, {"from": locator, "through": locator}, an array of those, "all", or {"all": true, "part": {...}}.
          - 'all'
          - AllParagraphs: Every paragraph of the matching parts; a part with only kind matches every part of that kind.
            - `all` true, required
            - `part` PartLocator, required: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - union[]
            - union
              - …
        - `text` Selector: Text in the named paragraphs: match, with optional context and which occurrence.
          - `match` union, required: Text or runs.
            - string
            - union[]
              - …
          - `prefix` string, nullable
          - `suffix` string, nullable
          - `occurrence` union: Omitted: the match must be unique; N: the Nth; all: every match.
            - integer: Counted from 1.
            - 'all'
        - `format` CharacterFormat, required: Character formatting, the listing's format: a value sets a property, false turns it off, null removes the direct setting.
          - `bold` boolean, nullable
          - `italic` boolean, nullable
          - `small_caps` boolean, nullable
          - `all_caps` boolean, nullable
          - `superscript` boolean, nullable
          - `subscript` boolean, nullable
          - `underline` union: true is single.
            - boolean
            - 'single' | 'double' | 'thick' | 'dotted' | 'dash' | 'wave' | 'words'
          - `strike` union: true is single.
            - boolean
            - 'single' | 'double'
          - `highlight` union: true is refused.
            - false
            - 'black' | 'blue' | 'cyan' | 'green' | 'magenta' | 'red' | 'yellow' | 'white' | 'dark_blue' | 'dark_cyan' | 'dark_green' | 'dark_magenta' | 'dark_red' | 'dark_yellow' | 'dark_gray' | 'light_gray'
          - `color` string, nullable: Six hex digits.
          - `font_size` union: Points, in halves.
            - integer
            - number
          - `font` string, nullable
      - InsertParagraphsEdit
        - `type` 'insert_paragraphs', required
        - `destination` BlockDestination, required: Where new blocks go: before or after a paragraph, directly before or after a table, or, naming neither, at the start or end of the body ({"position": "end"}), which a document with no paragraph to name, such as the blank one POST /v1/create starts from, takes its first content at.
          - `paragraph` ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `table` TableLocator: A table: {"index": n} among its part's tables (body unless part is given), {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `position` 'before' | 'after' | 'start' | 'end', required: before or after the paragraph or table; with neither, start or end of the body.
        - `new_paragraphs` NewParagraph[], required
          - `content` union: As content; "" or none makes an empty paragraph.
            - string
            - union[]
              - …
          - `style_id` string, nullable
          - `paragraph_format` ParagraphFormat: Paragraph formatting, the listing's paragraph_format: a value sets, null removes the direct setting.
            - `alignment` 'left' | 'center' | 'right' | 'justify', nullable
            - `indent` Indent
              - …
            - `spacing` Spacing
              - …
            - `keep_with_next` boolean, nullable
            - `keep_lines_together` boolean, nullable
            - `page_break_before` boolean, nullable
            - `widow_control` boolean, nullable
            - `borders` ParagraphBorders
              - …
          - `list` union: null leaves it out of the operation's list (its style's numbering applies); false: no numbering.
            - NewList
              - …
            - SameList
              - …
            - false
          - `list_level` integer, nullable: A list level, 1 to 9.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `style_id` string, nullable
        - `paragraph_format` ParagraphFormat: Paragraph formatting, the listing's paragraph_format: a value sets, null removes the direct setting.
          - `alignment` 'left' | 'center' | 'right' | 'justify', nullable
          - `indent` Indent
            - `left` union
              - …
            - `right` union
              - …
            - `first_line` union
              - …
            - `hanging` union
              - …
          - `spacing` Spacing
            - `before` union
              - …
            - `after` union
              - …
            - `line_spacing` LineSpacing: One of {"multiple": lines}, {"exact": points}, {"at_least": points}.
              - …
          - `keep_with_next` boolean, nullable
          - `keep_lines_together` boolean, nullable
          - `page_break_before` boolean, nullable
          - `widow_control` boolean, nullable
          - `borders` ParagraphBorders
            - `top` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `left` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `bottom` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `right` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `between` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `bar` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
        - `list` union
          - NewList
            - `new` 'bulleted' | 'numbered', required
          - SameList
            - `same_as` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
        - `list_level` integer, nullable: A list level, 1 to 9.
      - DeleteParagraphsEdit
        - `type` 'delete_paragraphs', required
        - `paragraphs` union, required: A paragraph locator, {"from": locator, "through": locator}, an array of those, "all", or {"all": true, "part": {...}}.
          - 'all'
          - AllParagraphs: Every paragraph of the matching parts; a part with only kind matches every part of that kind.
            - `all` true, required
            - `part` PartLocator, required: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - union[]
            - union
              - …
      - MoveParagraphsEdit
        - `type` 'move_paragraphs', required
        - `paragraphs` union, required: A paragraph locator, {"from": locator, "through": locator}, an array of those, "all", or {"all": true, "part": {...}}.
          - 'all'
          - AllParagraphs: Every paragraph of the matching parts; a part with only kind matches every part of that kind.
            - `all` true, required
            - `part` PartLocator, required: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - union[]
            - union
              - …
        - `destination` BlockDestination, required: Where new blocks go: before or after a paragraph, directly before or after a table, or, naming neither, at the start or end of the body ({"position": "end"}), which a document with no paragraph to name, such as the blank one POST /v1/create starts from, takes its first content at.
          - `paragraph` ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `table` TableLocator: A table: {"index": n} among its part's tables (body unless part is given), {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `position` 'before' | 'after' | 'start' | 'end', required: before or after the paragraph or table; with neither, start or end of the body.
        - `pending_changes` 'accept' | 'reject', nullable: Settles the tracked changes inside the moved paragraphs before moving them; without it, a move of paragraphs holding tracked changes is refused.
      - SplitParagraphEdit
        - `type` 'split_paragraph', required
        - `paragraphs` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
          - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
            - `kind` 'body' | 'footnote' | 'endnote' | 'header' | 'footer', nullable
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `type` 'default' | 'first' | 'even', nullable: A header's or footer's pages.
            - `section` SectionLocator: A section: {"index": n} counted from 0 in document order, or {"ref": name} for a section this request creates.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `at` union, required
          - 'start' | 'end'
          - AtAfter
            - `after` Selector, required: Text in the named paragraphs: match, with optional context and which occurrence.
              - …
          - AtBefore
            - `before` Selector, required: Text in the named paragraphs: match, with optional context and which occurrence.
              - …
        - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - JoinParagraphsEdit
        - `type` 'join_paragraphs', required
        - `paragraphs` ParagraphRange, required: The paragraphs from one locator through another, inclusive.
          - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - SetParagraphStyleEdit
        - `type` 'set_paragraph_style', required
        - `paragraphs` union, required: A paragraph locator, {"from": locator, "through": locator}, an array of those, "all", or {"all": true, "part": {...}}.
          - 'all'
          - AllParagraphs: Every paragraph of the matching parts; a part with only kind matches every part of that kind.
            - `all` true, required
            - `part` PartLocator, required: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - union[]
            - union
              - …
        - `style_id` string, required
        - `clear` union
          - 'all'
          - string[]
      - SetParagraphFormatEdit
        - `type` 'set_paragraph_format', required
        - `paragraphs` union, required: A paragraph locator, {"from": locator, "through": locator}, an array of those, "all", or {"all": true, "part": {...}}.
          - 'all'
          - AllParagraphs: Every paragraph of the matching parts; a part with only kind matches every part of that kind.
            - `all` true, required
            - `part` PartLocator, required: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - union[]
            - union
              - …
        - `paragraph_format` ParagraphFormat, required: Paragraph formatting, the listing's paragraph_format: a value sets, null removes the direct setting.
          - `alignment` 'left' | 'center' | 'right' | 'justify', nullable
          - `indent` Indent
            - `left` union
              - …
            - `right` union
              - …
            - `first_line` union
              - …
            - `hanging` union
              - …
          - `spacing` Spacing
            - `before` union
              - …
            - `after` union
              - …
            - `line_spacing` LineSpacing: One of {"multiple": lines}, {"exact": points}, {"at_least": points}.
              - …
          - `keep_with_next` boolean, nullable
          - `keep_lines_together` boolean, nullable
          - `page_break_before` boolean, nullable
          - `widow_control` boolean, nullable
          - `borders` ParagraphBorders
            - `top` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `left` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `bottom` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `right` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `between` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `bar` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
      - SetStyleFormatEdit: Sets a paragraph style's own paragraph formatting, which every paragraph in the style takes.
        - `type` 'set_style_format', required
        - `style_id` string, required
        - `paragraph_format` ParagraphFormat, required: Paragraph formatting, the listing's paragraph_format: a value sets, null removes the direct setting.
          - `alignment` 'left' | 'center' | 'right' | 'justify', nullable
          - `indent` Indent
            - `left` union
              - …
            - `right` union
              - …
            - `first_line` union
              - …
            - `hanging` union
              - …
          - `spacing` Spacing
            - `before` union
              - …
            - `after` union
              - …
            - `line_spacing` LineSpacing: One of {"multiple": lines}, {"exact": points}, {"at_least": points}.
              - …
          - `keep_with_next` boolean, nullable
          - `keep_lines_together` boolean, nullable
          - `page_break_before` boolean, nullable
          - `widow_control` boolean, nullable
          - `borders` ParagraphBorders
            - `top` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `left` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `bottom` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `right` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `between` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `bar` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
      - RenameStyleEdit: Gives a style a new name, and an id made from it, and points everything in the style at the new id.
        - `type` 'rename_style', required
        - `style_id` string, required: The style to rename, by its style_id in the listing's paragraph styles.
        - `name` string, required: The style's new name, as Word shows it: one no other style, and none of Word's built-in styles, has, whatever its case. Its new style_id is the name's letters and digits ('DPA Heading 2' is DPAHeading2, numbered on when taken), which later edits in the request name it by.
      - SetNumberingEdit
        - `type` 'set_numbering', required
        - `paragraphs` union, required: A paragraph locator, {"from": locator, "through": locator}, an array of those, "all", or {"all": true, "part": {...}}.
          - 'all'
          - AllParagraphs: Every paragraph of the matching parts; a part with only kind matches every part of that kind.
            - `all` true, required
            - `part` PartLocator, required: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - union[]
            - union
              - …
        - `action` 'apply' | 'remove' | 'set_level' | 'restart' | 'continue' | 'set_number_format', required
        - `list` union
          - NewList
            - `new` 'bulleted' | 'numbered', required
          - SameList
            - `same_as` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
        - `list_level` integer, nullable: A list level, 1 to 9.
        - `start` integer, nullable
        - `number_format` 'decimal' | 'decimal_zero' | 'lower_roman' | 'upper_roman' | 'lower_letter' | 'upper_letter' | 'ordinal' | 'cardinal_text' | 'ordinal_text' | 'bullet' | 'none', nullable
        - `pattern` string, nullable
      - InsertSectionBreakEdit
        - `type` 'insert_section_break', required
        - `paragraphs` union, required: A paragraph locator, {"from": locator, "through": locator}, an array of those, "all", or {"all": true, "part": {...}}.
          - 'all'
          - AllParagraphs: Every paragraph of the matching parts; a part with only kind matches every part of that kind.
            - `all` true, required
            - `part` PartLocator, required: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - union[]
            - union
              - …
        - `section_type` 'next_page' | 'continuous' | 'even_page' | 'odd_page', required
        - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - RemoveSectionBreakEdit
        - `type` 'remove_section_break', required
        - `section` SectionLocator, required: A section: {"index": n} counted from 0 in document order, or {"ref": name} for a section this request creates.
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `keep` 'earlier' | 'later': Whose headers, footers and page setup the merged section keeps: earlier (the default), the section whose break is removed; later, the section after it, as Word does.
      - SetPageSetupEdit
        - `type` 'set_page_setup', required
        - `section` union, required
          - 'all'
          - SectionLocator: A section: {"index": n} counted from 0 in document order, or {"ref": name} for a section this request creates.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - SectionLocator[]
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `page_setup` PageSetup, required: A section's page setup in points, the listing's page_setup.
          - `orientation` 'portrait' | 'landscape', nullable
          - `paper` 'letter' | 'legal' | 'a4', nullable
          - `page_width` union
            - integer
            - number
          - `page_height` union
            - integer
            - number
          - `margins` Margins
            - `top` union
              - …
            - `bottom` union
              - …
            - `left` union
              - …
            - `right` union
              - …
            - `header` union
              - …
            - `footer` union
              - …
            - `gutter` union
              - …
          - `different_first_page` boolean, nullable
          - `page_numbering` PageNumbering
            - `start` integer, nullable
            - `number_format` 'decimal' | 'lower_roman' | 'upper_roman' | 'lower_letter' | 'upper_letter', nullable
          - `columns` SectionColumns: How many columns of equal width a section's text runs in, and the space between them, the listing's page_setup.columns.
            - `count` integer, required: 1 sets the text in one column.
            - `spacing` union: Points between the columns; Word's 36 when the section sets none.
              - …
      - AddHeaderFooterEdit
        - `type` 'add_header_footer', required
        - `part` HeaderFooterPart, required
          - `kind` 'header' | 'footer', required
          - `type` 'default' | 'first' | 'even', required
          - `section` SectionLocator, required: A section: {"index": n} counted from 0 in document order, or {"ref": name} for a section this request creates.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `content` union
          - string
          - union[]
            - union
              - …
        - `new_paragraphs` BlockParagraph[], nullable
          - `content` union: As content; "" or none makes an empty paragraph.
            - string
            - union[]
              - …
          - `style_id` string, nullable
          - `paragraph_format` ParagraphFormat: Paragraph formatting, the listing's paragraph_format: a value sets, null removes the direct setting.
            - `alignment` 'left' | 'center' | 'right' | 'justify', nullable
            - `indent` Indent
              - …
            - `spacing` Spacing
              - …
            - `keep_with_next` boolean, nullable
            - `keep_lines_together` boolean, nullable
            - `page_break_before` boolean, nullable
            - `widow_control` boolean, nullable
            - `borders` ParagraphBorders
              - …
        - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - InsertTableEdit
        - `type` 'insert_table', required
        - `destination` BlockDestination, required: Where new blocks go: before or after a paragraph, directly before or after a table, or, naming neither, at the start or end of the body ({"position": "end"}), which a document with no paragraph to name, such as the blank one POST /v1/create starts from, takes its first content at.
          - `paragraph` ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `table` TableLocator: A table: {"index": n} among its part's tables (body unless part is given), {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `position` 'before' | 'after' | 'start' | 'end', required: before or after the paragraph or table; with neither, start or end of the body.
        - `rows` array[], required
          - union[]
            - union
              - …
        - `header_row` boolean
        - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - InsertTableRowEdit
        - `type` 'insert_table_row', required
        - `destination` RowDestination, required
          - `row` RowLocator, required: A table row: {"table": {...}, "index": n} among its table's rows, {"id": "..."}, both index and id, {"paragraph": {...}} for the row holding that paragraph in the innermost table holding it, or {"ref": name}.
            - `table` TableLocator: A table: {"index": n} among its part's tables (body unless part is given), {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `paragraph` ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `position` 'before' | 'after', required
        - `cells` union[], required
          - union
            - ''
            - string
            - union[]
              - …
            - CellParagraphs: A table cell of several paragraphs, each as an insert_paragraphs item.
              - …
        - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - InsertTableColumnEdit
        - `type` 'insert_table_column', required
        - `destination` ColumnDestination, required
          - `column` ColumnLocator, required: A table column: {"table": {...}, "index": n} counting the table's grid columns from 0 (a listed cell's column), {"paragraph": {...}} for the column of the cell holding that paragraph in the innermost table holding it, or {"ref": name}.
            - `table` TableLocator: A table: {"index": n} among its part's tables (body unless part is given), {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `paragraph` ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `position` 'before' | 'after', required
        - `cells` union[], required
          - union
            - ''
            - string
            - union[]
              - …
            - CellParagraphs: A table cell of several paragraphs, each as an insert_paragraphs item.
              - …
        - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - DeleteTableEdit
        - `type` 'delete_table', required
        - `table` TableLocator, required: A table: {"index": n} among its part's tables (body unless part is given), {"id": "..."} in any part, both index and id, or {"ref": name}.
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
          - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
            - `kind` 'body' | 'footnote' | 'endnote' | 'header' | 'footer', nullable
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `type` 'default' | 'first' | 'even', nullable: A header's or footer's pages.
            - `section` SectionLocator: A section: {"index": n} counted from 0 in document order, or {"ref": name} for a section this request creates.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - DeleteTableRowEdit
        - `type` 'delete_table_row', required
        - `row` RowLocator, required: A table row: {"table": {...}, "index": n} among its table's rows, {"id": "..."}, both index and id, {"paragraph": {...}} for the row holding that paragraph in the innermost table holding it, or {"ref": name}.
          - `table` TableLocator: A table: {"index": n} among its part's tables (body unless part is given), {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
          - `paragraph` ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - DeleteTableColumnEdit
        - `type` 'delete_table_column', required
        - `column` ColumnLocator, required: A table column: {"table": {...}, "index": n} counting the table's grid columns from 0 (a listed cell's column), {"paragraph": {...}} for the column of the cell holding that paragraph in the innermost table holding it, or {"ref": name}.
          - `table` TableLocator: A table: {"index": n} among its part's tables (body unless part is given), {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `paragraph` ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - SetTableFormatEdit
        - `type` 'set_table_format', required
        - `table` TableLocator, required: A table: {"index": n} among its part's tables (body unless part is given), {"id": "..."} in any part, both index and id, or {"ref": name}.
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
          - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
            - `kind` 'body' | 'footnote' | 'endnote' | 'header' | 'footer', nullable
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `type` 'default' | 'first' | 'even', nullable: A header's or footer's pages.
            - `section` SectionLocator: A section: {"index": n} counted from 0 in document order, or {"ref": name} for a section this request creates.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `table_format` TableFormat, required: A table's formatting, the listing's table_format: a value sets, null removes the direct setting.
          - `borders` TableBorders
            - `top` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `left` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `bottom` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `right` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `inside_horizontal` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `inside_vertical` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
      - SetCellFormatEdit
        - `type` 'set_cell_format', required
        - `cells` union, required: One cell locator, or {"from": cell locator, "through": cell locator}.
          - CellRange: The cells from one corner through the other, in one table: every cell whose row, and the grid column it starts at, lie between from's and through's.
            - `from` CellLocator, required: A table cell: {"row": row locator, "index": n} among its row's cells, {"id": "..."}, both index and id, or {"paragraph": {...}} for the cell holding that paragraph in the innermost table holding it.
              - …
            - `through` CellLocator, required: A table cell: {"row": row locator, "index": n} among its row's cells, {"id": "..."}, both index and id, or {"paragraph": {...}} for the cell holding that paragraph in the innermost table holding it.
              - …
          - CellLocator: A table cell: {"row": row locator, "index": n} among its row's cells, {"id": "..."}, both index and id, or {"paragraph": {...}} for the cell holding that paragraph in the innermost table holding it.
            - `row` RowLocator: A table row: {"table": {...}, "index": n} among its table's rows, {"id": "..."}, both index and id, {"paragraph": {...}} for the row holding that paragraph in the innermost table holding it, or {"ref": name}.
              - …
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `paragraph` ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
        - `cell_format` CellFormat, required: A cell's formatting, the listing's cell_format: a value sets, null removes the direct setting.
          - `borders` CellBorders
            - `top` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `left` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `bottom` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `right` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `inside_horizontal` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `inside_vertical` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `diagonal_down` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
            - `diagonal_up` Border: One border, the listing's border: a line style with its width, colour and spacing. Style none is an explicit absence, which keeps a border the style or a neighbouring cell would draw from being drawn.
              - …
      - InsertTableOfContentsEdit
        - `type` 'insert_table_of_contents', required
        - `destination` BlockDestination, required: Where new blocks go: before or after a paragraph, directly before or after a table, or, naming neither, at the start or end of the body ({"position": "end"}), which a document with no paragraph to name, such as the blank one POST /v1/create starts from, takes its first content at.
          - `paragraph` ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `table` TableLocator: A table: {"index": n} among its part's tables (body unless part is given), {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `position` 'before' | 'after' | 'start' | 'end', required: before or after the paragraph or table; with neither, start or end of the body.
        - `from_level` integer, required
        - `to_level` integer, required
        - `hyperlinks` boolean
        - `page_numbers` boolean
      - RefreshFieldsEdit
        - `type` 'refresh_fields', required
      - AddHyperlinkEdit
        - `url` string, required
        - `type` 'add_hyperlink', required
        - `paragraphs` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
          - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
            - `kind` 'body' | 'footnote' | 'endnote' | 'header' | 'footer', nullable
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `type` 'default' | 'first' | 'even', nullable: A header's or footer's pages.
            - `section` SectionLocator: A section: {"index": n} counted from 0 in document order, or {"ref": name} for a section this request creates.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `text` Selector: Text in the named paragraphs: match, with optional context and which occurrence.
          - `match` union, required: Text or runs.
            - string
            - union[]
              - …
          - `prefix` string, nullable
          - `suffix` string, nullable
          - `occurrence` union: Omitted: the match must be unique; N: the Nth; all: every match.
            - integer: Counted from 1.
            - 'all'
      - SetHyperlinkEdit
        - `url` string, required
        - `type` 'set_hyperlink', required
        - `paragraphs` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
          - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
            - `kind` 'body' | 'footnote' | 'endnote' | 'header' | 'footer', nullable
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `type` 'default' | 'first' | 'even', nullable: A header's or footer's pages.
            - `section` SectionLocator: A section: {"index": n} counted from 0 in document order, or {"ref": name} for a section this request creates.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `text` Selector: Text in the named paragraphs: match, with optional context and which occurrence.
          - `match` union, required: Text or runs.
            - string
            - union[]
              - …
          - `prefix` string, nullable
          - `suffix` string, nullable
          - `occurrence` union: Omitted: the match must be unique; N: the Nth; all: every match.
            - integer: Counted from 1.
            - 'all'
      - RemoveHyperlinkEdit
        - `type` 'remove_hyperlink', required
        - `paragraphs` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
          - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
            - `kind` 'body' | 'footnote' | 'endnote' | 'header' | 'footer', nullable
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `type` 'default' | 'first' | 'even', nullable: A header's or footer's pages.
            - `section` SectionLocator: A section: {"index": n} counted from 0 in document order, or {"ref": name} for a section this request creates.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `text` Selector: Text in the named paragraphs: match, with optional context and which occurrence.
          - `match` union, required: Text or runs.
            - string
            - union[]
              - …
          - `prefix` string, nullable
          - `suffix` string, nullable
          - `occurrence` union: Omitted: the match must be unique; N: the Nth; all: every match.
            - integer: Counted from 1.
            - 'all'
      - DeleteNoteEdit
        - `type` 'delete_note', required
        - `note` NoteLocator, required: A footnote or endnote: {"kind": ..., "index": n} among the notes of its kind, or {"ref": name}.
          - `kind` 'footnote' | 'endnote', nullable
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - AddCommentEdit
        - `type` 'add_comment', required
        - `paragraphs` union
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `text` Selector: Text in the named paragraphs: match, with optional context and which occurrence.
          - `match` union, required: Text or runs.
            - string
            - union[]
              - …
          - `prefix` string, nullable
          - `suffix` string, nullable
          - `occurrence` union: Omitted: the match must be unique; N: the Nth; all: every match.
            - integer: Counted from 1.
            - 'all'
        - `revision` RevisionLocator: One entry of the listing's revisions, by its index.
          - `index` integer, required: Where a thing is now: its position within its container, counted from 0.
        - `content` union, required: A string, or text, tab and line-break runs; a comment holds no other run.
          - string
          - union[]
            - union
              - …
        - `author` string, nullable
        - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - AddBookmarkEdit
        - `type` 'add_bookmark', required
        - `paragraphs` union, required: The paragraphs the bookmark spans, from the start of the first to the end of the last; with text, the one paragraph holding it.
          - ParagraphRange: The paragraphs from one locator through another, inclusive.
            - `from` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
            - `through` ParagraphLocator, required: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
              - …
          - ParagraphLocator: A paragraph: {"index": n} in the body or {"part": {...}, "index": n} elsewhere, {"id": "..."} in any part, both index and id, or {"ref": name}.
            - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
            - `id` string, nullable: What a thing is, as the listing prints it: kept when content moves.
            - `part` PartLocator: A part of the document: body; a footnote or endnote by index; a header or footer by type and section; or a header, footer or note this request creates, by ref.
              - …
            - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `text` Selector: Text in the named paragraphs: match, with optional context and which occurrence.
          - `match` union, required: Text or runs.
            - string
            - union[]
              - …
          - `prefix` string, nullable
          - `suffix` string, nullable
          - `occurrence` union: Omitted: the match must be unique; N: the Nth; all: every match.
            - integer: Counted from 1.
            - 'all'
        - `name` string, required: The bookmark's name, which fields and cross-references name it by (an INCLUDETEXT field in another document, say): a letter, then letters, digits and underscores, 40 at most, and not a name the document already uses, whatever its case.
      - ReplyCommentEdit
        - `type` 'reply_comment', required
        - `comment` CommentLocator, required: A comment thread: {"index": n} counted from 0 among top-level threads, or {"ref": name}.
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
        - `content` union, required: A string, or text, tab and line-break runs; a comment holds no other run.
          - string
          - union[]
            - union
              - …
        - `author` string, nullable
      - ResolveCommentEdit
        - `type` 'resolve_comment', required
        - `comment` CommentLocator, required: A comment thread: {"index": n} counted from 0 among top-level threads, or {"ref": name}.
          - `index` integer, nullable: Where a thing is now: its position within its container, counted from 0.
          - `ref` string, nullable: A name for something this request creates; letters, digits, _ . : and -.
      - AcceptRevisionEdit
        - `revision` union, required
          - 'all'
          - RevisionLocator: One entry of the listing's revisions, by its index.
            - `index` integer, required: Where a thing is now: its position within its container, counted from 0.
          - RevisionFilter: Every revision by this author and/or of this type.
            - `author` string, nullable
            - `type` 'insertion' | 'deletion' | 'move' | 'property', nullable
        - `skip_if_none` boolean, nullable: With a filter (author and/or kind), true makes a filter that selects no revision decide nothing instead of refusing the request, as when accepting every insertion of a document that may have none.
        - `type` 'accept_revision', required
      - RejectRevisionEdit
        - `revision` union, required
          - 'all'
          - RevisionLocator: One entry of the listing's revisions, by its index.
            - `index` integer, required: Where a thing is now: its position within its container, counted from 0.
          - RevisionFilter: Every revision by this author and/or of this type.
            - `author` string, nullable
            - `type` 'insertion' | 'deletion' | 'move' | 'property', nullable
        - `skip_if_none` boolean, nullable: With a filter (author and/or kind), true makes a filter that selects no revision decide nothing instead of refusing the request, as when accepting every insertion of a document that may have none.
        - `type` 'reject_revision', required
      - SetDocumentSettingsEdit
        - `type` 'set_document_settings', required
        - `settings` DocumentSettingsOperation, required: Settings of the output document, applied directly: Word cannot track them. Unset fields are left as they are.
          - `track_changes` boolean, nullable: true turns on Track Changes in the output (w:trackRevisions); false turns it off.
          - `protection` union: Restrict editing of the output (w:documentProtection, enforced), replacing any protection it has; false removes protection.
            - false
            - DocumentProtectionSetting: Word's Restrict Editing, enforced: which changes the output allows, and optionally a password to lift it. The password is hashed as Word hashes it (word_protection_hash) when the edit is first serialized, after the request's checks; the operation serializes the hash as password_hash, so the password itself is never stored with the edit nor sent to the apply worker.
              - …
          - `remove_personal_information` boolean, nullable: true sets Word's remove-personal-information-on-save (w:removePersonalInformation) and clears the creator and last-modified-by names from the file properties; false turns the setting off.

## Response `202`

Successful Response

- union
  - CreationAcceptedResponse
    - `creation_id` string, required: The creation's id (crt_...), which GET /v1/create/{creation_id} takes.
    - `status` 'processing', required
    - `file` FileResource, required: A file: GET /v1/files/{file_id} answers with it, and every response that carries a document embeds it. It never carries version fields: a version holds its file.
      - `file_id` string, required
      - `file_name` string, required
      - `status` 'processing' | 'ready' | 'failed', required: The state of the formats this request asked for: processing while one is still being produced (poll again after Retry-After), ready when every one is in downloads, failed when the document cannot be used (error) or a requested format will never be produced.
      - `downloads` FormatDownload[], nullable: One per requested format that is ready.
        - `format` string, required
        - `url` string, required: Signed; it expires at expires_at.
        - `file_name` string, required
        - `expires_at` string, required: ISO 8601 in UTC, to the second: 2026-10-21T18:22:31Z.
        - `metadata_report` MetadataReport: What a clean found in one download and did to each kind of hidden data.
          - `format` string, required: docx, xlsx, pptx, pdf or zip.
          - `preset` string, required: standard or strict.
          - `items` MetadataReportItem[], required
            - `type` string, required: The kind of hidden data, such as author, tracked_changes or hidden_text.
            - `category` string, required: properties, review, hidden, automation, package or visible.
            - `count` integer, required: How many were found.
            - `action` string, required: What was done: remove, reset, accept, reject, anonymize, convert, unlink, apply, flatten or clean; keep or report when it was left in place.
            - `examples` string[]: A few of the values found, when they are names.
          - `warnings` MetadataReportWarning[], required
            - `type` string, required: The kind of hidden data the warning is about.
            - `message` string, required: What the reader should know before sending the document.
          - `files` integer, nullable: For a zip, how many documents inside it were cleaned.
        - `content_base64` string, nullable: Only in an edit's or a creation's files, with inline=true: the file's bytes, base64-encoded.
      - `pending_formats` string[], nullable: Requested formats still being produced.
      - `failed_formats` string[], nullable: Requested formats that will never be produced.
      - `error` ComparisonErrorDescriptor
        - `code` string, required
        - `upstream_code` string, nullable
  - CreationStatusResponse
    - `creation_id` string, required
    - `status` 'processing' | 'ready' | 'failed', required: The creation's status: ready once its DOCX is written. The file's status is that file's: a pdf, md, json or html made from the DOCX afterwards is pending until the file pipeline has made it.
    - `file` FileResource, required: A file: GET /v1/files/{file_id} answers with it, and every response that carries a document embeds it. It never carries version fields: a version holds its file.
      - `file_id` string, required
      - `file_name` string, required
      - `status` 'processing' | 'ready' | 'failed', required: The state of the formats this request asked for: processing while one is still being produced (poll again after Retry-After), ready when every one is in downloads, failed when the document cannot be used (error) or a requested format will never be produced.
      - `downloads` FormatDownload[], nullable: One per requested format that is ready.
        - `format` string, required
        - `url` string, required: Signed; it expires at expires_at.
        - `file_name` string, required
        - `expires_at` string, required: ISO 8601 in UTC, to the second: 2026-10-21T18:22:31Z.
        - `metadata_report` MetadataReport: What a clean found in one download and did to each kind of hidden data.
          - `format` string, required: docx, xlsx, pptx, pdf or zip.
          - `preset` string, required: standard or strict.
          - `items` MetadataReportItem[], required
            - `type` string, required: The kind of hidden data, such as author, tracked_changes or hidden_text.
            - `category` string, required: properties, review, hidden, automation, package or visible.
            - `count` integer, required: How many were found.
            - `action` string, required: What was done: remove, reset, accept, reject, anonymize, convert, unlink, apply, flatten or clean; keep or report when it was left in place.
            - `examples` string[]: A few of the values found, when they are names.
          - `warnings` MetadataReportWarning[], required
            - `type` string, required: The kind of hidden data the warning is about.
            - `message` string, required: What the reader should know before sending the document.
          - `files` integer, nullable: For a zip, how many documents inside it were cleaned.
        - `content_base64` string, nullable: Only in an edit's or a creation's files, with inline=true: the file's bytes, base64-encoded.
      - `pending_formats` string[], nullable: Requested formats still being produced.
      - `failed_formats` string[], nullable: Requested formats that will never be produced.
      - `error` ComparisonErrorDescriptor
        - `code` string, required
        - `upstream_code` string, nullable
    - `error` EditErrorDescriptor
      - `code` string, required
      - `upstream_code` string, nullable
      - `message` string, nullable

## Other responses

- `400`: The request is invalid: INVALID_REQUEST when a parameter or the body fails validation, otherwise the code of the operation's own refusal.

---

[API](https://skmtc.dev/versionstory/apis/version-story-public-api.md) - [All operations](https://skmtc.dev/versionstory/apis/version-story-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/versionstory/apis/version-story-public-api/revisions/994ce15faf32?raw)
