> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/developers/gitbook-api/api-reference/change-requests/change-request-content/apply-a-batch-of-content-changes-to-a-change-request.md).

# Apply a batch of content changes to a change request

Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, rename, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request. **Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`. **Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time. To put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `![Alt](./<ref>)` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead. When page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by:

* Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`).
* Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>` for a nested page (e.g. `/pages/guides/getting-started`).
* Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page, or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is `/pages/README.md`.
* Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`, `../other.md`, or `../README.md` (the parent page). Folder-style links without an extension (e.g. `./section`) resolve to that folder's page.

External URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail. GitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content.

**Response shape (`compat`)** — this endpoint is changing what it returns:

* `compat=true` (current default) returns the updated change request, matching the endpoint's original behavior.
* `compat=false` returns the updated change request **and** the list of affected pages (see the response schema).

The default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.

```json
{"openapi":"3.1.0","info":{"title":"GitBook API","version":"0.0.1-beta"},"tags":[{"name":"change-request-content","description":"Retrieve or update the pages and files tied to an open change request. This lets you preview alterations and merge them when ready.\n"}],"servers":[{"url":"{host}/v1","variables":{"host":{"default":"https://api.gitbook.com"}}}],"security":[{"user":[]},{"oauth":["space:write"]}],"components":{"securitySchemes":{"user":{"type":"http","scheme":"bearer"},"oauth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://oauth.gitbook.com/authorize","tokenUrl":"https://oauth.gitbook.com/token","scopes":{"user:read":"Read your GitBook user profile.","organization:read":"Read organization settings and metadata.","organization:write":"Create and update organization settings.","organization:members:read":"Read organization members, invites and link invites.","organization:members:write":"Manage organization members, invites and link invites.","organization:ask":"Ask AI questions across an organization's content.","organization:search":"Search across an organization's content.","space:read":"Read spaces and their content.","space:write":"Create, update and delete spaces and their content, including imports.","space:permissions:read":"Read space permissions.","space:permissions:write":"Manage space permissions.","change-request:merge":"Merge change requests, publishing their changes to the space.","site:read":"Read sites and their settings.","site:write":"Create, update and delete sites, sections and their settings.","site:publish":"Publish and unpublish sites, controlling their public exposure.","site:permissions:read":"Read site permissions.","site:permissions:write":"Manage site permissions.","site:auth:read":"Read site authentication and security configuration.","site:auth:write":"Manage site authentication and security configuration.","site:insights:read":"Read site analytics and insights.","site:ask":"Ask AI questions across a site's content.","site:search":"Search across a site's content.","integration:read":"Read integrations and where they are installed.","integration:installations:read":"Read integration installations and their configuration, which can include credentials for third-party services.","integration:installations:write":"Install and configure integrations on an organization, its spaces and its sites.","integration:publish":"Publish integrations, which can request their own permissions on your content, and route their events to a development tunnel.","integration:delete":"Unpublish integrations, permanently deleting them and every installation of them.","openapi:read":"Read OpenAPI specifications.","openapi:write":"Create, update and delete OpenAPI specifications."}}}}},"parameters":{"spaceId":{"name":"spaceId","in":"path","required":true,"description":"The unique id of the space","schema":{"$ref":"#/components/schemas/EntityId"}},"changeRequestId":{"name":"changeRequestId","in":"path","required":true,"description":"The unique ID of the change request or its number identifier in the space","schema":{"$ref":"#/components/schemas/EntityId"}}},"schemas":{"EntityId":{"type":"string","pattern":"^[a-zA-Z0-9_-]+$","description":"A unique entity identifier"},"ChangeRequestContentChange":{"oneOf":[{"$ref":"#/components/schemas/ChangeRequestContentChangeUpdatePage"},{"$ref":"#/components/schemas/ChangeRequestContentChangeInsertPage"},{"$ref":"#/components/schemas/ChangeRequestContentChangeDeletePage"},{"$ref":"#/components/schemas/ChangeRequestContentChangeRevertPage"},{"$ref":"#/components/schemas/ChangeRequestContentChangeInsertFiles"}],"discriminator":{"propertyName":"operation","mapping":{"update_page":"#/components/schemas/ChangeRequestContentChangeUpdatePage","insert_page":"#/components/schemas/ChangeRequestContentChangeInsertPage","delete_page":"#/components/schemas/ChangeRequestContentChangeDeletePage","revert_page":"#/components/schemas/ChangeRequestContentChangeRevertPage","insert_files":"#/components/schemas/ChangeRequestContentChangeInsertFiles"}}},"ChangeRequestContentChangeUpdatePage":{"description":"Update an existing page. Its document and/or its metadata (title, icon, description, visibility, adaptive-content condition) can be changed, and it can be moved to a new parent and/or position with `into`/`at`.","allOf":[{"$ref":"#/components/schemas/RevisionPageUpdate"},{"type":"object","required":["operation","page"],"properties":{"operation":{"type":"string","enum":["update_page"]},"page":{"type":"string","description":"ID of the page to update."},"document":{"description":"New document for the page. When provided as markdown, its frontmatter is read to update the page metadata. Omit to update only the metadata fields.","$ref":"#/components/schemas/Document"},"into":{"description":"Move the page to be a child of this page ID. Set to `null` to move it to the root of the page tree. Omit to leave the page's parent unchanged. The target cannot be the page itself or one of its own descendants.","oneOf":[{"type":"string"},{"type":"null"}]},"at":{"type":"integer","minimum":0,"description":"Zero-based index to move the page to among its new siblings (those of `into`, or the root pages when `into` is omitted or `null`). Omit to leave the page's position unchanged when its parent isn't changing, or to append it at the end when its parent is changing."}}}]},"RevisionPageUpdate":{"type":"object","description":"Page metadata that can be set when inserting or updating a page through a change request. When a markdown document is provided on the same operation, the values read from its frontmatter take precedence over these fields.","properties":{"title":{"type":"string","minLength":1,"description":"Title of the page."},"slug":{"description":"Slug of the page in its parent, used to build the page's path. When omitted, the slug is derived from the title. The slug must be unique among the page's siblings; any collision is rejected.","$ref":"#/components/schemas/RevisionPageSlug"},"emoji":{"description":"Emoji of the page. Set to an empty string to remove it.","$ref":"#/components/schemas/Emoji"},"icon":{"description":"Icon of the page. Set to an empty string to remove it.","$ref":"#/components/schemas/Icon"},"description":{"type":"string","description":"Description of the page."},"hidden":{"type":"boolean","description":"If true, the page is not displayed in the navigation, while still being accessible."},"noIndex":{"type":"boolean","description":"If true, the page is not indexable in the search and ask features."},"noRobotsIndex":{"type":"boolean","description":"If true, the page is not indexable by search engine robots."},"condition":{"type":"string","description":"Adaptive-content condition controlling whether the page is shown to a visitor. Set to an empty string to remove the condition."}}},"RevisionPageSlug":{"type":"string","description":"Page's slug in its direct parent","minLength":0,"maxLength":100},"Emoji":{"type":"string","maxLength":50,"format":"emoji","description":"Unicode codepoint or character of the emoji"},"Icon":{"type":"string","maxLength":50,"format":"icon","description":"Name of the icon"},"Document":{"oneOf":[{"$ref":"#/components/schemas/MarkdownDocument","title":"Markdown"},{"type":"object","title":"JSON Document","properties":{"document":{"$ref":"#/components/schemas/JSONDocument"}},"required":["document"]},{"type":"object","title":"Empty","properties":{},"additionalProperties":false}]},"MarkdownDocument":{"type":"object","properties":{"markdown":{"type":"string","description":"Content of the document formatted as markdown"}},"required":["markdown"]},"JSONDocument":{"type":"object","properties":{"object":{"type":"string","enum":["document"]},"data":{"type":"object","properties":{"schemaVersion":{"description":"The schema version of the document. If undefined, the document is considered to be of the latest schema version.","type":"integer"}},"additionalProperties":true},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlocksTopLevels"}},"meta":{"type":"object","properties":{"token":{"description":"A content token that can be used to fetch the content referenced in this document from the API.","type":"string"}}}},"required":["object","data","nodes"]},"DocumentBlocksTopLevels":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockPrompt"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockExpandable"},{"$ref":"#/components/schemas/DocumentBlockTabs"},{"$ref":"#/components/schemas/DocumentBlockTable"},{"$ref":"#/components/schemas/DocumentBlockOpenAPI"},{"$ref":"#/components/schemas/DocumentBlockOpenAPIOperation"},{"$ref":"#/components/schemas/DocumentBlockOpenAPISchemas"},{"$ref":"#/components/schemas/DocumentBlockOpenAPIWebhook"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockIntegration"},{"$ref":"#/components/schemas/DocumentBlockReusableContent"},{"$ref":"#/components/schemas/DocumentBlockStepper"},{"$ref":"#/components/schemas/DocumentBlockIf"},{"$ref":"#/components/schemas/DocumentBlockColumns"},{"$ref":"#/components/schemas/DocumentBlockUpdates"}]},"DocumentBlocksEssentials":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockParagraph"},{"$ref":"#/components/schemas/DocumentBlockHeading"},{"$ref":"#/components/schemas/DocumentBlockListOrdered"},{"$ref":"#/components/schemas/DocumentBlockListUnordered"},{"$ref":"#/components/schemas/DocumentBlockListTasks"},{"$ref":"#/components/schemas/DocumentBlockDivider"}]},"DocumentBlockParagraph":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["paragraph"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentInline"},{"$ref":"#/components/schemas/DocumentText"}]}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"align":{"$ref":"#/components/schemas/TextAlignment"}},"additionalProperties":false}},"required":["object","type","nodes"]},"DocumentInline":{"oneOf":[{"$ref":"#/components/schemas/DocumentInlineLink"},{"$ref":"#/components/schemas/DocumentInlineEmoji"},{"$ref":"#/components/schemas/DocumentInlineIcon"},{"$ref":"#/components/schemas/DocumentInlineExpression"},{"$ref":"#/components/schemas/DocumentInlineMath"},{"$ref":"#/components/schemas/DocumentInlineImage"},{"$ref":"#/components/schemas/DocumentInlineAnnotation"},{"$ref":"#/components/schemas/DocumentInlineMention"},{"$ref":"#/components/schemas/DocumentInlineButton"}]},"DocumentInlineLink":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["link"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentText"},{"$ref":"#/components/schemas/DocumentInlineImage"}]}},"data":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRef"}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"DocumentText":{"type":"object","properties":{"object":{"type":"string","enum":["text"]},"key":{"type":"string"},"leaves":{"type":"array","items":{"$ref":"#/components/schemas/DocumentTextLeaf"}}},"required":["object","leaves"]},"DocumentTextLeaf":{"type":"object","properties":{"object":{"type":"string","enum":["leaf"]},"text":{"type":"string"},"marks":{"type":"array","items":{"$ref":"#/components/schemas/DocumentTextMark"}}},"required":["object","text","marks"]},"DocumentTextMark":{"oneOf":[{"$ref":"#/components/schemas/DocumentMarkBold"},{"$ref":"#/components/schemas/DocumentMarkItalic"},{"$ref":"#/components/schemas/DocumentMarkCode"},{"$ref":"#/components/schemas/DocumentMarkKeyboard"},{"$ref":"#/components/schemas/DocumentMarkStrikethrough"},{"$ref":"#/components/schemas/DocumentMarkColor"},{"$ref":"#/components/schemas/DocumentMarkSuperscript"},{"$ref":"#/components/schemas/DocumentMarkSubscript"}]},"DocumentMarkBold":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["bold"]}},"required":["object","type"]},"DocumentMarkItalic":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["italic"]}},"required":["object","type"]},"DocumentMarkCode":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["code"]}},"required":["object","type"]},"DocumentMarkKeyboard":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["keyboard"]}},"required":["object","type"]},"DocumentMarkStrikethrough":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["strikethrough"]}},"required":["object","type"]},"DocumentMarkColor":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["color"]},"data":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/DocumentTextColor"},"background":{"$ref":"#/components/schemas/DocumentTextColor"}},"required":["text","background"]}},"required":["object","type","data"]},"DocumentTextColor":{"type":"string","description":"Allowed color tokens for color marks (text and background; background reuses this enum). Named colors are fixed palette keys. `$*` tokens are semantic: resolved from the published sites customization when rendering; authors may still persist them in content when valid.\n","enum":["default","green","blue","red","orange","yellow","purple","pink","violet","cyan","$primary","$info","$success","$warning","$danger","$tint"]},"DocumentMarkSuperscript":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["superscript"]}},"required":["object","type"]},"DocumentMarkSubscript":{"type":"object","properties":{"object":{"type":"string","enum":["mark"]},"type":{"type":"string","enum":["subscript"]}},"required":["object","type"]},"DocumentInlineImage":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["inline-image"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefURL"},{"$ref":"#/components/schemas/ContentRefFile"}]},"refDark":{"oneOf":[{"$ref":"#/components/schemas/ContentRefURL"},{"$ref":"#/components/schemas/ContentRefFile"}]},"caption":{"type":"string"},"alt":{"type":"string"},"size":{"type":"string","enum":["original","line"]}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"ContentRefURL":{"type":"object","properties":{"kind":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["kind","url"]},"ContentRefFile":{"type":"object","properties":{"kind":{"type":"string","enum":["file"]},"file":{"type":"string"},"space":{"description":"ID of the space the file is in. The file is considered as in the current space if none is provided.","type":"string"}},"required":["kind","file"]},"ContentRef":{"description":"A relative reference to content in GitBook.","oneOf":[{"$ref":"#/components/schemas/ContentRefFile"},{"$ref":"#/components/schemas/ContentRefURL"},{"$ref":"#/components/schemas/ContentRefPage"},{"$ref":"#/components/schemas/ContentRefAnchor"},{"$ref":"#/components/schemas/ContentRefUser"},{"$ref":"#/components/schemas/ContentRefCollection"},{"$ref":"#/components/schemas/ContentRefSpace"},{"$ref":"#/components/schemas/ContentRefReusableContent"},{"$ref":"#/components/schemas/ContentRefTag"},{"$ref":"#/components/schemas/ContentRefOpenAPI"}]},"ContentRefPage":{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"page":{"type":"string"},"space":{"description":"ID of the space the page is in. The page is considered as in the current space if none is provided.","type":"string"}},"required":["kind","page"]},"ContentRefAnchor":{"type":"object","properties":{"kind":{"type":"string","enum":["anchor"]},"anchor":{"type":"string"},"space":{"description":"ID of the space the page is in. The page is considered as in the current space if none is provided.","type":"string"},"page":{"description":"ID of the page the anchor is in. The anchor is considered as in the current page if none is provided.","type":"string"}},"required":["kind","anchor"]},"ContentRefUser":{"type":"object","properties":{"kind":{"type":"string","enum":["user"]},"user":{"type":"string"}},"required":["kind","user"]},"ContentRefCollection":{"type":"object","properties":{"kind":{"type":"string","enum":["collection"]},"collection":{"type":"string"}},"required":["kind","collection"]},"ContentRefSpace":{"type":"object","properties":{"kind":{"type":"string","enum":["space"]},"space":{"type":"string"}},"required":["kind","space"]},"ContentRefReusableContent":{"type":"object","properties":{"kind":{"type":"string","enum":["reusable-content"]},"reusableContent":{"type":"string"},"space":{"type":"string","description":"The space in which the reusable content is defined. If undefined, the reusable content is assumed to be in the same space as the content reference."}},"required":["kind","reusableContent"]},"ContentRefTag":{"type":"object","properties":{"kind":{"type":"string","enum":["tag"]},"tag":{"type":"string","description":"The slug of the tag, also used as the ID, and references the tags defined on a revision."},"space":{"type":"string","description":"The space in which the tag is defined. If undefined, the tag is assumed to be in the same space as the content reference."}},"required":["kind","tag"]},"ContentRefOpenAPI":{"type":"object","properties":{"kind":{"type":"string","enum":["openapi"]},"spec":{"type":"string","description":"Slug of the OpenAPI specification"}},"required":["kind","spec"]},"DocumentInlineEmoji":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["emoji"]},"key":{"type":"string"},"data":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentInlineIcon":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["icon"]},"key":{"type":"string"},"data":{"type":"object","properties":{"icon":{"type":"string"},"color":{"$ref":"#/components/schemas/DocumentTextColor"}},"required":["icon"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentInlineExpression":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["expression"]},"key":{"type":"string"},"data":{"type":"object","properties":{"expression":{"type":"string"}},"required":["expression"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentInlineMath":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["inline-math"]},"key":{"type":"string"},"data":{"type":"object","properties":{"formula":{"type":"string"}},"required":["formula"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentInlineAnnotation":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["annotation"]},"key":{"type":"string"},"fragments":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/DocumentFragment"},{"type":"object","properties":{"type":{"type":"string","enum":["annotation-body"]},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockCode"}]},"minItems":1}},"required":["nodes","type"]}]}},"isVoid":{"type":"boolean","enum":[false]},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentText"}},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["object","type","fragments","isVoid","nodes"]},"DocumentFragment":{"type":"object","properties":{"object":{"type":"string","enum":["fragment"]},"key":{"type":"string"},"fragment":{"type":"string"},"type":{"type":"string"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlock"}}},"required":["object","nodes"]},"DocumentBlock":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockParagraph"},{"$ref":"#/components/schemas/DocumentBlockHeading"},{"$ref":"#/components/schemas/DocumentBlockListOrdered"},{"$ref":"#/components/schemas/DocumentBlockListUnordered"},{"$ref":"#/components/schemas/DocumentBlockListTasks"},{"$ref":"#/components/schemas/DocumentBlockListItem"},{"$ref":"#/components/schemas/DocumentBlockDivider"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockPrompt"},{"$ref":"#/components/schemas/DocumentBlockIf"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockImage"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockCodeLine"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockExpandable"},{"$ref":"#/components/schemas/DocumentBlockTabs"},{"$ref":"#/components/schemas/DocumentBlockTabsItem"},{"$ref":"#/components/schemas/DocumentBlockTable"},{"$ref":"#/components/schemas/DocumentBlockOpenAPI"},{"$ref":"#/components/schemas/DocumentBlockOpenAPIOperation"},{"$ref":"#/components/schemas/DocumentBlockOpenAPISchemas"},{"$ref":"#/components/schemas/DocumentBlockOpenAPIWebhook"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockIntegration"},{"$ref":"#/components/schemas/DocumentBlockReusableContent"},{"$ref":"#/components/schemas/DocumentBlockStepper"},{"$ref":"#/components/schemas/DocumentBlockStepperStep"},{"$ref":"#/components/schemas/DocumentBlockColumns"},{"$ref":"#/components/schemas/DocumentBlockColumn"},{"$ref":"#/components/schemas/DocumentBlockUpdates"},{"$ref":"#/components/schemas/DocumentBlockUpdate"}]},"DocumentBlockHeading":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["heading-1","heading-2","heading-3"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentInline"},{"$ref":"#/components/schemas/DocumentText"}]}},"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^[-a-z0-9.+_]+$"},"align":{"$ref":"#/components/schemas/TextAlignment"}}},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"TextAlignment":{"type":"string","enum":["start","center","end"]},"DocumentBlockListOrdered":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["list-ordered"]},"key":{"type":"string"},"data":{"type":"object","properties":{"start":{"type":"number","description":"An integer to start counting from for the list items."}}},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockListItem"}]}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","data","nodes"]},"DocumentBlockListItem":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["list-item"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockTable"}]}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"checked":{"type":"boolean"}}}},"required":["object","type","nodes"]},"DocumentBlockCode":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["code"]},"key":{"type":"string"},"data":{"type":"object","properties":{"syntax":{"type":"string"},"title":{"type":"string"},"overflow":{"type":"string","default":"scroll","enum":["scroll","wrap"]},"lineNumbers":{"type":"boolean"},"fullWidth":{"type":"boolean"},"expandable":{"type":"boolean"},"collapsedLineCount":{"type":"integer","description":"Number of lines rendered in a code block when it is collapsed","minimum":1,"default":10}}},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockCodeLine"}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","data","nodes"]},"DocumentBlockCodeLine":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["code-line"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentText"},{"$ref":"#/components/schemas/DocumentInlineAnnotation"},{"$ref":"#/components/schemas/DocumentInlineExpression"}]}},"data":{"type":"object","properties":{"highlighted":{"type":"boolean"}}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"DocumentBlockHint":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["hint"]},"key":{"type":"string"},"data":{"type":"object","properties":{"style":{"type":"string","enum":["info","warning","danger","success"]},"icon":{"$ref":"#/components/schemas/Icon"}},"required":["style"]},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockIntegration"}]}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","data","nodes"]},"DocumentBlockEmbed":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["embed"]},"key":{"type":"string"},"data":{"type":"object","properties":{"url":{"type":"string"},"fullWidth":{"type":"boolean"}},"required":["url"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentBlockIntegration":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["integration"]},"key":{"type":"string"},"data":{"type":"object","properties":{"integration":{"type":"string","description":"Name of the integration"},"block":{"type":"string","description":"ID of the block in the integration"},"props":{"description":"Properties passed to the block during rendering","$ref":"#/components/schemas/PlainObject"},"action":{"$ref":"#/components/schemas/ContentKitAction"},"url":{"type":"string","description":"URL associated with the content represented by the block.\nThis property is set when creating a block from a URL (unfurl) to ensure\nwe can convert the block back to an embed.\n"},"fullWidth":{"type":"boolean"}},"required":["integration","block","props"]},"isVoid":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"token":{"type":"string","description":"A content token that can be used to authenticate requests for cross-space integration blocks."},"spaceId":{"type":"string","description":"ID of the space the integration block originates from"}}}},"required":["object","type","data","isVoid"]},"PlainObject":{"properties":{},"additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/PlainObject"},{"type":"string"},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"},{"$ref":"#/components/schemas/PlainObject"}]}}]}},"ContentKitAction":{"anyOf":[{"type":"object","description":"Custom action to re-render the block.","properties":{"action":{"type":"string"}},"additionalProperties":true,"required":["action"]},{"$ref":"#/components/schemas/ContentKitDefaultAction"}]},"ContentKitDefaultAction":{"oneOf":[{"type":"object","description":"Action to open an overlay modal defined by \"componentId\".","properties":{"action":{"type":"string","enum":["@ui.modal.open"]},"componentId":{"type":"string"},"props":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","componentId","props"]},{"type":"object","description":"Action when a modal overlay is closed, with a return value to the higher level component in the stack. This action will be triggered on the parent component instance.","properties":{"action":{"type":"string","enum":["@ui.modal.close"]},"returnValue":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","returnValue"]},{"type":"object","description":"Action to open an url.","properties":{"action":{"type":"string","enum":["@ui.url.open"]},"url":{"type":"string"}},"required":["action","url"]},{"type":"object","description":"Action when a link is being unfurled into a block.","properties":{"action":{"type":"string","enum":["@link.unfurl"]},"url":{"type":"string"}},"required":["action","url"]},{"type":"object","description":"Action to update the properties stored in the related node.","properties":{"action":{"type":"string","enum":["@editor.node.updateProps"]},"props":{"$ref":"#/components/schemas/PlainObject"}},"required":["action","props"]}]},"DocumentBlockQuote":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["blockquote"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockQuote"}]}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["object","type","nodes"]},"DocumentBlockMath":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["math"]},"key":{"type":"string"},"data":{"type":"object","properties":{"formula":{"type":"string"}},"required":["formula"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentBlockTable":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["table"]},"key":{"type":"string"},"isVoid":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"view":{"oneOf":[{"$ref":"#/components/schemas/DocumentTableViewGrid"},{"$ref":"#/components/schemas/DocumentTableViewCards"}]},"records":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DocumentTableRecord"}},"definition":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/DocumentTableDefinition"}},"fullWidth":{"type":"boolean","description":"Whether to render the block as a full width one"},"search":{"type":"boolean","description":"Whether to show the search bar on the table. When unset, search is shown automatically on grid tables once they have enough rows."}},"required":["view","records","definition"]},"fragments":{"type":"array","items":{"$ref":"#/components/schemas/DocumentFragment"}}},"required":["object","type","data","isVoid","fragments"]},"DocumentTableViewGrid":{"type":"object","properties":{"type":{"type":"string","enum":["grid"]},"columns":{"type":"array","description":"Ordered list of the definition IDs to display","items":{"type":"string"}},"columnWidths":{"type":"object","description":"Percent width of each column","additionalProperties":{"type":"number"}},"hideHeader":{"type":"boolean","description":"Should we display the header with column titles"},"stickyHeader":{"type":"boolean","description":"Should we keep the table header sticky while the page scrolls"},"stickyFirstColumn":{"type":"boolean","description":"Should we keep the first visible table column sticky while horizontally scrolling"},"useNewSizing":{"type":"boolean","description":"Tables in GitBook originally used a scaled width approach i.e. the width defined\nin columnWidths would be scaled to ensure a 100% width table.\n\nWe later changed this to treat the widths in columnWidths as exact values - they are\nnever scaled. A columnWidth of 50 is rendered as 50px.\n\nIn order to maintain backwards compatibility, we track whether or not we\nuse the new system here.\n\nAll new tables should have this value set to true, older tables will have it set\nto undefined.\n"}},"required":["type","columns","hideHeader"]},"DocumentTableViewCards":{"type":"object","properties":{"type":{"type":"string","enum":["cards"]},"cardSize":{"type":"string","description":"Size of the cards. It indicates how many columns will be used","enum":["medium","large"]},"columns":{"type":"array","description":"Ordered list of the definition IDs to display","items":{"type":"string"}},"targetDefinition":{"type":"string","description":"Definition ID to use as a target link for the card"},"coverDefinition":{"type":"string","description":"Definition ID to use as a cover image"},"coverDefinitionDark":{"type":"string","description":"Definition ID to use as a dark mode cover image"},"hideColumnTitle":{"type":"boolean","description":"Should we display the column title or not"},"wrap":{"type":"boolean","description":"Whether the cards wrap onto multiple rows (true, the default) or are laid out in a single horizontally-scrolling carousel row (false)."}},"required":["type","columns","cardSize"]},"DocumentTableRecord":{"type":"object","properties":{"orderIndex":{"type":"string"},"values":{"type":"object","additionalProperties":{"oneOf":[{"type":"number"},{"type":["string","null"]},{"type":"boolean"},{"type":"array","items":{"type":"string"}},{"$ref":"#/components/schemas/ContentRef"},{"$ref":"#/components/schemas/DocumentTableImageRecord"}]}}},"required":["orderIndex","values"]},"DocumentTableImageRecord":{"description":"A table record value for image columns, supporting both direct ContentRefs and the additional format with record-level settings.","oneOf":[{"$ref":"#/components/schemas/ContentRefFile"},{"$ref":"#/components/schemas/ContentRefURL"},{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefFile"},{"$ref":"#/components/schemas/ContentRefURL"}]},"objectFit":{"$ref":"#/components/schemas/CardsImageObjectFit"},"alt":{"type":"string","description":"Alternative text for the cover image"}},"required":["ref"]}]},"CardsImageObjectFit":{"type":"string","description":"Object fit for image display in card views","enum":["contain","fill","cover"]},"DocumentTableDefinition":{"oneOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionText"},{"$ref":"#/components/schemas/DocumentTableDefinitionNumber"},{"$ref":"#/components/schemas/DocumentTableDefinitionCheckbox"},{"$ref":"#/components/schemas/DocumentTableDefinitionFiles"},{"$ref":"#/components/schemas/DocumentTableDefinitionUsers"},{"$ref":"#/components/schemas/DocumentTableDefinitionRating"},{"$ref":"#/components/schemas/DocumentTableDefinitionSelect"},{"$ref":"#/components/schemas/DocumentTableDefinitionContentRef"},{"$ref":"#/components/schemas/DocumentTableDefinitionImage"}]},"DocumentTableDefinitionText":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"textAlignment":{"type":"string","enum":["center","right","left"]},"verticalAlignment":{"$ref":"#/components/schemas/VerticalAlignment"}},"required":["type","textAlignment"]}]},"DocumentTableDefinitionBase":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","description":"Title for the column"}},"required":["id","title"]},"VerticalAlignment":{"type":"string","enum":["top","middle","bottom"]},"DocumentTableDefinitionNumber":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["number"]}},"required":["type"]}]},"DocumentTableDefinitionCheckbox":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["checkbox"]}},"required":["type"]}]},"DocumentTableDefinitionFiles":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["files"]}},"required":["type"]}]},"DocumentTableDefinitionUsers":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["users"]},"multiple":{"type":"boolean"}},"required":["type","multiple"]}]},"DocumentTableDefinitionRating":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["rating"]},"max":{"type":"number"}},"required":["type","max"]}]},"DocumentTableDefinitionSelect":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["select"]},"multiple":{"type":"boolean"},"options":{"type":"array","items":{"$ref":"#/components/schemas/DocumentTableSelectOption"}}},"required":["type","multiple","options"]}]},"DocumentTableSelectOption":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"color":{"type":"string"}},"required":["value","label","color"]},"DocumentTableDefinitionContentRef":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["content-ref"]}},"required":["type"]}]},"DocumentTableDefinitionImage":{"allOf":[{"$ref":"#/components/schemas/DocumentTableDefinitionBase"},{"type":"object","properties":{"type":{"type":"string","enum":["image"]}},"required":["type"]}]},"DocumentBlockListUnordered":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["list-unordered"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockListItem"}]}},"data":{"type":"object","additionalProperties":false},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes"]},"DocumentBlockListTasks":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["list-tasks"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockListItem"}]}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["object","type","nodes"]},"DocumentBlockDivider":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["divider"]},"key":{"type":"string"},"isVoid":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["object","type","isVoid","data"]},"DocumentBlockPrompt":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["prompt"]},"key":{"type":"string"},"data":{"type":"object","properties":{"description":{"type":"string"},"icon":{"$ref":"#/components/schemas/Icon"},"openInAIProviders":{"type":"boolean"},"defaultExpanded":{"type":"string","default":"hidden","description":"Controls how much of the prompt content is visible by default.","enum":["hidden","partial","full"]}},"required":["description"],"additionalProperties":false},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlockCode"}]},"minItems":1,"maxItems":1},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","data","nodes"]},"DocumentBlockIf":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["if"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlocksTopLevels"}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"expression":{"type":"string"}},"required":["expression"]}},"required":["object","type","nodes","data"]},"DocumentBlockImages":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["images"]},"key":{"type":"string"},"data":{"type":"object","properties":{"align":{"type":"string","enum":["center","left","right"]},"fullWidth":{"type":"boolean"},"withFrame":{"type":"boolean"}}},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockImage"}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","data","nodes","isVoid"]},"DocumentBlockImage":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["image"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefURL"},{"$ref":"#/components/schemas/ContentRefFile"}]},"refDark":{"oneOf":[{"$ref":"#/components/schemas/ContentRefURL"},{"$ref":"#/components/schemas/ContentRefFile"}]},"width":{"$ref":"#/components/schemas/Length"},"height":{"$ref":"#/components/schemas/Length"},"alt":{"type":"string"}},"required":["ref"]},"fragments":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/DocumentFragment"},{"type":"object","properties":{"fragment":{"type":"string","enum":["caption"]},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockParagraph"}}},"required":["nodes","fragment"]}]}},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","fragments","isVoid"]},"Length":{"oneOf":[{"type":"number"},{"type":"object","properties":{"unit":{"type":"string"},"value":{"type":"number"}},"required":["unit","value"]}]},"DocumentBlockFile":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["file"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefFile"}]}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentBlockDrawing":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["drawing"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefFile"}]}}},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentBlockExpandable":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["expandable"]},"key":{"type":"string"},"isVoid":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"defaultExpanded":{"type":"boolean"}},"additionalProperties":false},"fragments":{"type":"array","items":{"oneOf":[{"allOf":[{"$ref":"#/components/schemas/DocumentFragment"},{"type":"object","properties":{"fragment":{"type":"string","enum":["expandable-title"]},"type":{"type":"string","enum":["expandable-title"]},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockParagraph"},"minItems":1,"maxItems":1}},"required":["nodes","fragment","type"]}]},{"allOf":[{"$ref":"#/components/schemas/DocumentFragment"},{"type":"object","properties":{"fragment":{"type":"string","enum":["expandable-body"]},"type":{"type":"string","enum":["expandable-body"]},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockTable"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockPrompt"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockReusableContent"},{"$ref":"#/components/schemas/DocumentBlockIntegration"}]},"minItems":1}},"required":["nodes","fragment","type"]}]}]}},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]}},"required":["object","type","isVoid","fragments","data"]},"DocumentBlockReusableContent":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["reusable-content"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefReusableContent"}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"token":{"description":"A content token that can be used to fetch the reusable content from the API.","type":"string"}}}},"required":["object","type","data","isVoid"]},"DocumentBlockTabs":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["tabs"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockTabsItem"}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"fullWidth":{"type":"boolean"}},"additionalProperties":false}},"required":["object","type","nodes"]},"DocumentBlockTabsItem":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["tabs-item"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockPrompt"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockIntegration"}]}},"data":{"type":"object","properties":{"title":{"type":"string"},"icon":{"$ref":"#/components/schemas/Icon"}}},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"DocumentBlockContentRef":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["content-ref"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRef"}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentBlockOpenAPI":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["swagger"]},"key":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/OpenAPIOperationPointer"},{"type":"object","properties":{"ref":{"oneOf":[{"$ref":"#/components/schemas/ContentRefFile"},{"$ref":"#/components/schemas/ContentRefURL"}]},"expanded":{"type":"boolean","description":"If true, the block is opened by default."},"fullWidth":{"type":"boolean"}},"required":["ref"]}]},"isVoid":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]}},"required":["object","type","data","isVoid"]},"OpenAPIOperationPointer":{"type":"object","description":"Pointer to an operation in the OpenAPI spec.","properties":{"path":{"type":"string","description":"Path of the operation in the OpenAPI spec."},"method":{"type":"string","description":"HTTP method of the operation in the OpenAPI spec."}},"required":["path","method"]},"DocumentBlockOpenAPIOperation":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["openapi-operation"]},"key":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/OpenAPIOperationPointer"},{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"},"headless":{"type":"boolean","description":"When true, the block omits its own title and description; the page renders them instead. Set by the computed one-operation-per-page layout; not intended to be set manually."}},"required":["ref"]}]},"isVoid":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]}},"required":["object","type","data","isVoid"]},"DocumentBlockOpenAPISchemas":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["openapi-schemas"]},"key":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/OpenAPISchemasPointer"},{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"}},"required":["ref"]}],"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]}},"required":["object","type","data","isVoid"]},"OpenAPISchemasPointer":{"type":"object","description":"Pointer to schemas in the OpenAPI spec.","properties":{"grouped":{"type":"boolean","description":"Whether the schemas are grouped or not.","default":true},"schemas":{"type":"array","description":"List of schemas name from the OpenAPI spec.","items":{"type":"string"}},"title":{"type":"string","description":"Custom title for the schemas block. When not provided, defaults to \"The <SchemaName> object\"."}},"required":["schemas"]},"DocumentBlockOpenAPIWebhook":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["openapi-webhook"]},"key":{"type":"string"},"data":{"allOf":[{"$ref":"#/components/schemas/OpenAPIWebhookPointer"},{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRefOpenAPI"},"headless":{"type":"boolean","description":"When true, the block omits its own title and description; the page renders them instead. Set by the computed one-operation-per-page layout; not intended to be set manually."}},"required":["ref"]}]},"isVoid":{"type":"boolean","enum":[true]},"meta":{"type":"object","properties":{"id":{"description":"Unique ID to be used in an URL for the block.","type":"string"}},"required":["id"]}},"required":["object","type","data","isVoid"]},"OpenAPIWebhookPointer":{"type":"object","description":"Pointer to a webhook in the OpenAPI spec.","properties":{"name":{"type":"string","description":"Name of the webhook in the OpenAPI spec."},"method":{"type":"string","description":"HTTP method of the webhook in the OpenAPI spec."}},"required":["name","method"]},"DocumentBlockStepper":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["stepper"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockStepperStep"}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{},"additionalProperties":false}},"required":["object","type","nodes"]},"DocumentBlockStepperStep":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["stepper-step"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockPrompt"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockIntegration"},{"$ref":"#/components/schemas/DocumentBlockExpandable"}]}},"data":{"type":"object","properties":{"icon":{"type":"string"}}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"DocumentBlockColumns":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["columns"]},"key":{"type":"string"},"data":{"type":"object","properties":{"fullWidth":{"type":"boolean"}}},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockColumn"}},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","data","nodes","isVoid"]},"DocumentBlockColumn":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["column"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockPrompt"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockIntegration"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockTable"},{"$ref":"#/components/schemas/DocumentBlockExpandable"},{"$ref":"#/components/schemas/DocumentBlockStepper"}]}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"width":{"$ref":"#/components/schemas/Length"},"verticalAlignment":{"$ref":"#/components/schemas/VerticalAlignment"}},"additionalProperties":false}},"required":["object","type","nodes","data"]},"DocumentBlockUpdates":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["updates"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"$ref":"#/components/schemas/DocumentBlockUpdate"}},"isVoid":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{"format":{"type":"string","enum":["numeric","full","short"],"default":"full"}},"required":["format"],"additionalProperties":false}},"required":["object","type","nodes","data"]},"DocumentBlockUpdate":{"type":"object","properties":{"object":{"type":"string","enum":["block"]},"type":{"type":"string","enum":["update"]},"key":{"type":"string"},"nodes":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/DocumentBlocksEssentials"},{"$ref":"#/components/schemas/DocumentBlockContentRef"},{"$ref":"#/components/schemas/DocumentBlockCode"},{"$ref":"#/components/schemas/DocumentBlockEmbed"},{"$ref":"#/components/schemas/DocumentBlockFile"},{"$ref":"#/components/schemas/DocumentBlockImages"},{"$ref":"#/components/schemas/DocumentBlockDrawing"},{"$ref":"#/components/schemas/DocumentBlockHint"},{"$ref":"#/components/schemas/DocumentBlockPrompt"},{"$ref":"#/components/schemas/DocumentBlockQuote"},{"$ref":"#/components/schemas/DocumentBlockMath"},{"$ref":"#/components/schemas/DocumentBlockIntegration"},{"$ref":"#/components/schemas/DocumentBlockTabs"},{"$ref":"#/components/schemas/DocumentBlockExpandable"}]}},"data":{"type":"object","properties":{"date":{"$ref":"#/components/schemas/Timestamp"},"tags":{"type":"array","description":"Array of tags. Each tag is id'ed by its slug.","items":{"$ref":"#/components/schemas/ContentRefTag"}}},"required":["date"]},"isVoid":{"type":"boolean","enum":[false]}},"required":["object","type","nodes","data"]},"Timestamp":{"type":"string","format":"date-time"},"DocumentInlineMention":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["mention"]},"key":{"type":"string"},"data":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRef"}},"required":["ref"]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentInlineButton":{"type":"object","properties":{"object":{"type":"string","enum":["inline"]},"type":{"type":"string","enum":["button"]},"key":{"type":"string"},"data":{"allOf":[{"type":"object","properties":{"label":{"type":"string"},"kind":{"type":"string","enum":["primary","secondary"]},"size":{"type":"string","enum":["small","medium","large"]},"icon":{"$ref":"#/components/schemas/Icon"}},"required":["label","kind"]},{"oneOf":[{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/ContentRef"}},"required":["ref"],"additionalProperties":false},{"type":"object","properties":{"action":{"$ref":"#/components/schemas/DocumentAction"}},"required":["action"],"additionalProperties":false}]}]},"isVoid":{"type":"boolean","enum":[true]}},"required":["object","type","data","isVoid"]},"DocumentAction":{"description":"Action to perform when an inline button is clicked.","type":"object","oneOf":[{"type":"object","description":"Open a search input, optionally prefilled with a search query.","properties":{"action":{"type":"string","enum":["search"]},"query":{"type":"string","description":"The search query to prefill."}},"required":["action"],"additionalProperties":false},{"type":"object","description":"Open an AI input, optionally prefilled with a question.","properties":{"action":{"type":"string","enum":["ask"]},"query":{"type":"string","description":"The question to prefill."}},"required":["action"],"additionalProperties":false},{"type":"object","description":"Open a selection input for the option identified by its slug.","properties":{"action":{"type":"string","enum":["select"]},"slug":{"type":"string","description":"The slug of the option to select."}},"required":["action","slug"],"additionalProperties":false}]},"ChangeRequestContentChangeInsertPage":{"description":"Insert a new page into the change request. The title is taken from `title`, or, when the document is markdown, from the document's frontmatter or leading heading (which take precedence, matching Git Sync). When no title can be resolved, the page falls back to a default title.","allOf":[{"$ref":"#/components/schemas/RevisionPageUpdate"},{"type":"object","required":["operation","document"],"properties":{"operation":{"type":"string","enum":["insert_page"]},"into":{"type":"string","description":"ID of the parent page to insert the new page into. If omitted, the page is inserted as a root page."},"at":{"type":"integer","minimum":0,"description":"Zero-based index to insert the page at among its siblings. If omitted, the page is appended at the end."},"ref":{"type":"string","description":"Temporary local reference for the page, used only for the lifetime of this request and never persisted. Other pages inserted in the same batch can link to this page by its ref (e.g. `[Page](./<ref>.md)`), which resolves to the page's ID at apply time — regardless of operation order or the page's eventual slug. A ref must be unique within the batch and must not collide with an existing page's path."},"document":{"description":"Document for the new page. When provided as markdown, its frontmatter is read to set the page metadata.","$ref":"#/components/schemas/Document"}}}]},"ChangeRequestContentChangeDeletePage":{"type":"object","description":"Delete an existing page (and its subpages) from the change request.","required":["operation","page"],"properties":{"operation":{"type":"string","enum":["delete_page"]},"page":{"type":"string","description":"ID of the page to delete."}}},"ChangeRequestContentChangeRevertPage":{"type":"object","description":"Revert a page to the state it had in a given revision. If `revision` is omitted, the page is reverted to the change request's base revision. Without `block`, the whole page is reverted — added pages are removed, deleted pages are restored, and modified pages have their document reset. With `block`, only the listed block-level changes in the page's document are reverted (each block is removed if it was added, restored if it was deleted, or reset if it was modified or moved); other blocks and the page's properties/metadata are left untouched.","required":["operation","page"],"properties":{"operation":{"type":"string","enum":["revert_page"]},"page":{"type":"string","description":"ID of the page to revert."},"revision":{"type":"string","description":"ID of the revision to revert the page to. If omitted, the change request's base revision is used."},"block":{"type":"array","items":{"type":"string"},"description":"Keys of the specific blocks to revert within the page's document, as they appear in the page's document. If omitted, the whole page is reverted."}}},"ChangeRequestContentChangeInsertFiles":{"type":"object","description":"Upload files (images or attachments) into the change request. A document references one as `![Alt](/files/<fileId>)` or `[Label](/files/<fileId>)` — use a `ref` to reference it from a later change in the same batch, or read the generated IDs from `insertedFiles`.","required":["operation","files"],"properties":{"operation":{"type":"string","enum":["insert_files"]},"files":{"type":"array","minItems":1,"maxItems":20,"items":{"type":"object","description":"A file to upload. Set exactly one source: `url` (GitBook fetches it) or `base64` (inline bytes, max 1MB). Prefer `url`.","required":["name"],"properties":{"ref":{"type":"string","description":"Temporary local reference for the file, used only for the lifetime of this request and never persisted. Pages inserted in the same batch can link to this file by its ref (e.g. `[File](./<ref>)`), which resolves to the file's ID at apply time — regardless of operation order or the file's eventual path. A ref must be unique within the batch and must not collide a page ref in the batch or an existing page path."},"name":{"type":"string","minLength":1,"maxLength":256,"description":"Filename to store the file under, including its extension."},"contentType":{"type":"string","description":"MIME type. Required with `base64`; overrides the source's own type otherwise."}},"oneOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","maxLength":2048,"description":"Public http(s) URL to fetch the file from. A URL resolving to a private or reserved address is rejected — send internally hosted bytes with `base64` instead."}},"required":["url"]},{"type":"object","properties":{"base64":{"type":"string","description":"Base64-encoded bytes, max 1MB. Requires `contentType`."}},"required":["base64"]}]}}}},"ChangeRequest":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"change-request\"","enum":["change-request"]},"id":{"type":"string","description":"Unique identifier for the change request"},"number":{"type":"number","description":"Incremental identifier of the change request"},"status":{"$ref":"#/components/schemas/ChangeRequestStatus"},"subject":{"$ref":"#/components/schemas/ChangeRequestSubject"},"description":{"$ref":"#/components/schemas/JSONDocument"},"createdBy":{"$ref":"#/components/schemas/User"},"createdAt":{"$ref":"#/components/schemas/Timestamp"},"updatedAt":{"$ref":"#/components/schemas/Timestamp"},"mergedBy":{"$ref":"#/components/schemas/User","description":"User who merged the change request. Only present when the change request has been merged."},"mergedAt":{"$ref":"#/components/schemas/Timestamp","description":"Date at which the change request was merged. Only present when the change request has been merged."},"space":{"type":"string","description":"ID of the space in which the change request was created."},"revision":{"type":"string","description":"ID of the active revision in the change request."},"revisionInitial":{"type":"string","description":"ID of the initial revision in the space from which the change request was created."},"revisionMergedAncestor":{"type":"string","description":"ID of the latest revision when updating from main space content."},"revisionMerged":{"type":"string","description":"When merged, ID of the revision resulting from the merge."},"comments":{"type":"number","description":"Count of opened comments on the change request."},"siteTopic":{"type":"object","description":"Site context associated with the change request when it was created from a site topic or finding.","properties":{"site":{"type":"string","description":"ID of the site associated with the change request."},"topic":{"type":"string","description":"ID of the site topic associated with the change request."},"finding":{"type":"string","description":"ID of the site finding associated with the change request, when applicable."}},"required":["site","topic"]},"outdated":{"type":"boolean","description":"If true, the change request is not up-to-date with latest changes in the main content."},"imports":{"description":"Import runs targeting this change request, still running or ended recently, most recent first. Only returned when fetching a single change request.\n","type":"array","items":{"$ref":"#/components/schemas/ContentImportRun"}},"links":{"$ref":"#/components/schemas/ChangeRequestLinks"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"app":{"type":"string","description":"URL of the space in the application","format":"uri"},"location":{"type":"string","description":"URL of the user in the API","format":"uri"}},"required":["app","location"]}},"required":["object","id","number","status","subject","createdBy","createdAt","updatedAt","space","revision","revisionInitial","comments","outdated","urls"]},"ChangeRequestStatus":{"type":"string","enum":["draft","open","archived","merged"]},"ChangeRequestSubject":{"type":"string","description":"Subject of the change request","minLength":0,"maxLength":100},"User":{"type":"object","properties":{"object":{"type":"string","description":"Type of Object, always equals to \"user\"","enum":["user"]},"id":{"type":"string","description":"Unique identifier for the user"},"displayName":{"type":"string","description":"Full name for the user"},"email":{"type":"string","description":"Email address of the user"},"photoURL":{"type":"string","description":"URL of the user's profile picture"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"type":"string","description":"URL of the user in the API","format":"uri"}},"required":["location"]}},"required":["object","id","displayName","urls"]},"ContentImportRun":{"type":"object","properties":{"object":{"description":"Type of Object, always equals to \"import-run\"","type":"string","enum":["import-run"]},"id":{"description":"Unique ID of the import","type":"string"},"startedAt":{"description":"Date when the import has started","$ref":"#/components/schemas/Timestamp"},"completedAt":{"description":"Filled when the imported is in status \"completed\"","$ref":"#/components/schemas/Timestamp"},"createdAt":{"description":"Date when the import was requested","$ref":"#/components/schemas/Timestamp"},"updatedAt":{"description":"Date when the import was last updated","$ref":"#/components/schemas/Timestamp"},"status":{"description":"Status of the import","type":"string","enum":["pending","in-progress","completed","failed","cancelled"]},"reason":{"description":"Reason for the import failure when `status` is `failed`.","type":"string"},"source":{"description":"Where the content is imported from.","$ref":"#/components/schemas/ContentImportSource"},"target":{"description":"Where the content is imported into.","$ref":"#/components/schemas/ContentImportTarget"},"site":{"description":"ID of the site the target space belongs to, when it belongs to exactly one.","type":"string"},"createdBy":{"description":"ID of the user who started the import.","type":"string"},"urls":{"type":"object","description":"URLs associated with the object","properties":{"location":{"description":"URL of the import run in the API","type":"string","format":"uri"}},"required":["location"]},"pages":{"description":"Pages included in the import","type":"array","items":{"type":"object","properties":{"id":{"description":"ID of page","type":"string"},"sourceURL":{"description":"Source URL where the page has been imported from","type":"string"},"type":{"description":"Type of page","type":"string","enum":["page","folder"]},"status":{"description":"Status of the page","type":"string","enum":["complete","pending"]}},"required":["id","type","status"]}}},"required":["id","status"]},"ContentImportSource":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["website"]},"url":{"$ref":"#/components/schemas/URL"}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"files":{"description":"Files to import","type":"array","maxItems":50,"items":{"description":"Key of file","type":"string"}}},"required":["type","files"]}]},"URL":{"type":"string","format":"uri","maxLength":2048},"ContentImportTarget":{"type":"object","properties":{"space":{"type":"string","description":"ID of the space to import in"},"changeRequest":{"type":"string","description":"ID of the change request to import in"},"page":{"type":"string","description":"ID of the page to import in"}},"required":["space"]},"ChangeRequestLinks":{"type":"array","description":"External links associated with the change request.","items":{"$ref":"#/components/schemas/ChangeRequestLink"},"maxItems":10},"ChangeRequestLink":{"allOf":[{"$ref":"#/components/schemas/ChangeRequestLinkInput"},{"type":"object","properties":{"id":{"type":"string","description":"The ID of the link. Absent on links not yet stored relationally."},"expanded":{"$ref":"#/components/schemas/ChangeRequestLinkExpanded","readOnly":true}}}]},"ChangeRequestLinkInput":{"type":"object","description":"External link associated with a change request.","properties":{"id":{"type":"string","description":"The ID of an existing link, as served on the change request. Pass it back to update that link; omit it to add a new one. Links created before links were stored individually have no ID and are matched on their URL instead."},"ref":{"$ref":"#/components/schemas/ContentRefURL"},"title":{"$ref":"#/components/schemas/ChangeRequestLinkTitle"}},"required":["ref"]},"ChangeRequestLinkTitle":{"type":"string","description":"Optional title to display for the link.","maxLength":128},"ChangeRequestLinkExpanded":{"description":"External ticket data resolved for this link by a configured connector.","oneOf":[{"type":"object","description":"An external ticket linked to the change request.","properties":{"kind":{"type":"string","enum":["external-ticket"]},"provider":{"type":"string","enum":["jira"]},"state":{"type":"string","enum":["connected"]},"key":{"type":"string","description":"The ticket's provider-specific key."},"url":{"type":"string","format":"uri","description":"URL to open the ticket."},"status":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"summary":{"type":"string","description":"The ticket's summary."}},"required":["kind","provider","state","key","url","status","summary"]},{"type":"object","description":"An external ticket whose current data could not be loaded.","properties":{"kind":{"type":"string","enum":["external-ticket"]},"provider":{"type":"string","enum":["jira"]},"state":{"type":"string","enum":["error"]}},"required":["kind","provider","state"]}]},"ChangeRequestContentUpdate":{"type":"object","description":"The result of applying a batch of content changes.","required":["changeRequest","changes"],"properties":{"changeRequest":{"description":"The change request after the batch was applied.","$ref":"#/components/schemas/ChangeRequest"},"changes":{"type":"array","description":"One entry per affected page (deduplicated), in the order the pages were first touched by the batch.","items":{"$ref":"#/components/schemas/ChangeRequestContentUpdateChange"}},"insertedFiles":{"type":"array","description":"Files created by the `insert_files` changes in this batch, in the order they were inserted. Use their IDs to reference them from a document.","items":{"$ref":"#/components/schemas/RevisionFile"}}}},"ChangeRequestContentUpdateChange":{"description":"An outcome of a content change.","oneOf":[{"$ref":"#/components/schemas/ChangeRequestContentUpdateInsertedPage"},{"$ref":"#/components/schemas/ChangeRequestContentUpdateUpdatedPage"},{"$ref":"#/components/schemas/ChangeRequestContentUpdateDeletedPage"}],"discriminator":{"propertyName":"object","mapping":{"created_page":"#/components/schemas/ChangeRequestContentUpdateInsertedPage","updated_page":"#/components/schemas/ChangeRequestContentUpdateUpdatedPage","deleted_page":"#/components/schemas/ChangeRequestContentUpdateDeletedPage"}}},"ChangeRequestContentUpdateInsertedPage":{"type":"object","description":"A page created by the operation with its resolved ID, ref as passed by the caller, and a URL to fetch its content.","required":["object","page"],"properties":{"object":{"type":"string","description":"Type of Object, always equals to \"created_page\".","enum":["created_page"]},"ref":{"type":"string","description":"The batch-local `ref` provided on the insert operation, echoed so the caller can map their reference to the created page's ID. Absent when the operation had no ref."},"page":{"description":"Reference to the created page, with a URL to fetch its normalized content.","$ref":"#/components/schemas/ChangeRequestContentUpdatePageRef"}}},"ChangeRequestContentUpdatePageRef":{"type":"object","required":["object","id","urls"],"properties":{"object":{"type":"string","description":"Type of Object, always equals to \"page\".","enum":["page"]},"id":{"type":"string","description":"Unique identifier of the page."},"urls":{"type":"object","required":["location"],"properties":{"location":{"description":"API URL to fetch the page's full, normalized content.","$ref":"#/components/schemas/URL"}}}}},"ChangeRequestContentUpdateUpdatedPage":{"type":"object","description":"A page updated by the operation, with a URL to fetch its content.","required":["object","page"],"properties":{"object":{"type":"string","description":"Type of Object, always equals to \"updated_page\".","enum":["updated_page"]},"page":{"description":"Reference to the updated page, with a URL to fetch its normalized content.","$ref":"#/components/schemas/ChangeRequestContentUpdatePageRef"}}},"ChangeRequestContentUpdateDeletedPage":{"type":"object","description":"A page deleted by the batch. Only its ID is returned, as it no longer has content.","required":["object","page"],"properties":{"object":{"type":"string","description":"Type of Object, always equals to \"deleted_page\".","enum":["deleted_page"]},"page":{"type":"string","description":"ID of the deleted page."}}},"RevisionFile":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"downloadURL":{"type":"string"},"size":{"type":"number"},"dimensions":{"type":"object","description":"For images, it contains the dimensions of it.","properties":{"width":{"type":"number"},"height":{"type":"number"}},"required":["width","height"]},"git":{"$ref":"#/components/schemas/GitSyncBlob"}},"required":["id","name","contentType","downloadURL","size"]},"GitSyncBlob":{"type":"object","properties":{"oid":{"type":"string","description":"SHA for the blob"},"path":{"type":"string","description":"Path of the blob in the Git tree"}},"required":["oid","path"]}},"responses":{"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","properties":{"code":{"type":"integer","format":"int32","enum":[404]},"message":{"type":"string"}},"required":["code","message"]}}}}}}}},"paths":{"/spaces/{spaceId}/change-requests/{changeRequestId}/content":{"post":{"operationId":"updateChangeRequestContent","summary":"Apply a batch of content changes to a change request","description":"Applies an ordered array of content changes (up to 50) to the change request atomically, creating a single new revision. Changes are applied sequentially; if any single change is invalid the entire batch is rejected and no revision is created. Use this to create, update, rename, move, or delete pages within a change request before merging to live. This is the primary way to programmatically author content in a change request.\n**Renaming a page** — `update_page` can change a page's `title` and/or its `slug` (the path segment used to build its URL within its current parent). Both fields are independent: to rename only the title without changing the URL, set `title` and omit `slug`; to change the URL without changing the title, set `slug` and omit `title`.\n**Moving a page** — `update_page` can also change a page's parent and/or its position among siblings with `into`/`at`. Set `into` to the new parent's page ID, or `null` to move the page to the root of the tree; omit `into` to leave the parent unchanged. Set `at` to place the page at a specific zero-based index among its new siblings; omit it to leave the position unchanged (when the parent isn't changing) or append at the end (when it is). A page cannot be moved under itself or one of its own descendants. `insert_page`'s `into`/`at` remain the way to place a **new** page at creation time.\nTo put an image or attachment in a page, upload it with an `insert_files` change. Give the file a `ref` and a page inserted in the same batch can reference it as `![Alt](./<ref>)` or `[File](./<ref>)`, which resolves to the file's ID at apply time regardless of operation order. Uploaded files are also listed as `insertedFiles` when `compat=false`, and a file already in the change request can be referenced directly as `/files/<fileId>`. Inline `data:` URIs in markdown are not ingested and large image blocks are dropped, so upload the bytes with `insert_files` instead.\nWhen page content is provided as markdown, links to other pages are resolved against the change request's current page tree. You can link a page by:\n- Page ID — `/pages/<pageId>` (also `/pages/<pageId>#anchor`).\n- Page slug path — `/pages/<slug>` for a top-level page, or `/pages/<parent-slug>/<slug>`\n  for a nested page (e.g. `/pages/guides/getting-started`).\n\n- Markdown file path — the path the page would have in Git: `/pages/<slug>.md` for a page,\n  or `/pages/<slug>/README.md` for a page that has child pages. The space's root page is\n  `/pages/README.md`.\n\n- Relative markdown link — resolved against the page being edited, e.g. `./sibling.md`,\n  `../other.md`, or `../README.md` (the parent page). Folder-style links without an\n  extension (e.g. `./section`) resolve to that folder's page.\n\nExternal URLs (`https://…`) are kept as-is. A link that does not match any page in the change request is left as plain text rather than causing the request to fail.\nGitBook normalizes submitted content, so the stored page may differ from what was sent. To help callers reconcile local state with the stored result, the response can list each created and modified page with its resolved ID and a `urls.location` to fetch the page's persisted content.\n\n**Response shape (`compat`)** — this endpoint is changing what it returns:\n- `compat=true` (current default) returns the updated change request, matching the endpoint's\n  original behavior.\n\n- `compat=false` returns the updated change request **and** the list of affected pages (see\n  the response schema).\n\nThe default is `true` for now to preserve backwards compatibility, but **will switch to `false` in a future release**, at which point the affected-page list is always included. You should pass `compat=false` if you want the new behavior today and avoid unexpected errors when the default flips in the future.","tags":["change-request-content"],"parameters":[{"$ref":"#/components/parameters/spaceId"},{"$ref":"#/components/parameters/changeRequestId"},{"name":"compat","in":"query","description":"When `true`, the updated change request is returned. When `false`, the updated change request and the list of affected pages are returned.","schema":{"type":"boolean","default":true}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["changes"],"properties":{"changes":{"type":"array","minItems":1,"maxItems":50,"items":{"$ref":"#/components/schemas/ChangeRequestContentChange"}}}}}}},"responses":{"200":{"description":"The change request has been updated","content":{"application/json":{"schema":{"description":"The change request when `compat=true` (default), or the change request plus the list of affected pages when `compat=false`.","oneOf":[{"$ref":"#/components/schemas/ChangeRequest"},{"$ref":"#/components/schemas/ChangeRequestContentUpdate"}]}}}},"404":{"description":"The change request could not be found.","$ref":"#/components/responses/NotFoundError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/developers/gitbook-api/api-reference/change-requests/change-request-content/apply-a-batch-of-content-changes-to-a-change-request.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
