{"openapi":"3.1.0","info":{"title":"Version Story Public API","description":"Compare two documents (docx, doc, pdf, xlsx) and download the redline, apply an edit set to a document — including accepting or rejecting its tracked revisions — and download the edited result, and manage versioned documents with a redline between every version and its parent.","version":"1.0.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/v1/compare":{"post":{"summary":"Create Comparison","operationId":"create_comparison_v1_compare_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_comparison_v1_compare_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonAcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/compare/{comparison_id}":{"get":{"summary":"Get Comparison","operationId":"get_comparison_v1_compare__comparison_id__get","parameters":[{"name":"comparison_id","in":"path","required":true,"schema":{"type":"string","title":"Comparison Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"docx (default), pdf, pdf_changed_pages_only, md, json, viewer; repeatable. PPTX comparisons support pptx (default) and pdf only. xlsx applies only to Excel comparisons created before this endpoint stopped accepting them.","title":"Format"},"description":"docx (default), pdf, pdf_changed_pages_only, md, json, viewer; repeatable. PPTX comparisons support pptx (default) and pdf only. xlsx applies only to Excel comparisons created before this endpoint stopped accepting them."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/compare/{comparison_id}/acknowledge":{"post":{"summary":"Acknowledge Comparison Download","description":"Queue immediate content deletion after the client has secured its result.","operationId":"acknowledge_comparison_download_v1_compare__comparison_id__acknowledge_post","parameters":[{"name":"comparison_id","in":"path","required":true,"schema":{"type":"string","title":"Comparison Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComparisonAcknowledgedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/merge":{"post":{"summary":"Create Merge","operationId":"create_merge_v1_merge_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_merge_v1_merge_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeAcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/merge/{merge_id}":{"get":{"summary":"Get Merge","operationId":"get_merge_v1_merge__merge_id__get","parameters":[{"name":"merge_id","in":"path","required":true,"schema":{"type":"string","title":"Merge Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"docx (default), md, json, viewer; repeatable","title":"Format"},"description":"docx (default), md, json, viewer; repeatable"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/edit/initiate":{"post":{"summary":"Initiate Edit","description":"Stage a document for editing and return the id its serialized form is read from.\n\nAn edit names the paragraph unids and revision ids the document carries, and a plain upload\nhas no unids until preprocessing assigns them — so they cannot be known when the document is\nfirst sent. Staging it here creates them once; GET returns the rendering that exposes them,\nand POST /v1/edit applies edits against this same staged document rather than a fresh upload,\nwhich is what keeps the ids an agent read valid.","operationId":"initiate_edit_v1_edit_initiate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_initiate_edit_v1_edit_initiate_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditDocumentAcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/edit/initiate/{file_id}":{"get":{"summary":"Get Edit Document","description":"The staged document serialized to markdown, with every identifier an edit can name.","operationId":"get_edit_document_v1_edit_initiate__file_id__get","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/edit":{"post":{"summary":"Create Edit","operationId":"create_edit_v1_edit_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_edit_v1_edit_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditAcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/edit/{edit_id}":{"get":{"summary":"Get Edit","operationId":"get_edit_v1_edit__edit_id__get","parameters":[{"name":"edit_id","in":"path","required":true,"schema":{"type":"string","title":"Edit Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"docx (default) and/or redline; repeatable","title":"Format"},"description":"docx (default) and/or redline; repeatable"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents":{"post":{"summary":"Create Document","operationId":"create_document_v1_documents_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_document_v1_documents_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCreatedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Documents","operationId":"list_documents_v1_documents_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque continuation cursor from a prior page","title":"Cursor"},"description":"Opaque continuation cursor from a prior page"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents/{document_id}":{"get":{"summary":"Get Document","operationId":"get_document_v1_documents__document_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch Document","operationId":"patch_document_v1_documents__document_id__patch","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Document","operationId":"delete_document_v1_documents__document_id__delete","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents/{document_id}/versions":{"post":{"summary":"Create Version","operationId":"create_version_v1_documents__document_id__versions_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_create_version_v1_documents__document_id__versions_post"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents/{document_id}/versions/{version_id}":{"get":{"summary":"Get Version","operationId":"get_version_v1_documents__document_id__versions__version_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch Version","operationId":"patch_version_v1_documents__document_id__versions__version_id__patch","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPatchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Version","operationId":"delete_version_v1_documents__document_id__versions__version_id__delete","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents/{document_id}/versions/{version_id}/download":{"get":{"summary":"Download Version","operationId":"download_version_v1_documents__document_id__versions__version_id__download_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"docx (default), pdf; repeatable","title":"Format"},"description":"docx (default), pdf; repeatable"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionDownloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents/{document_id}/versions/{version_id}/redline":{"get":{"summary":"Download Redline","operationId":"download_redline_v1_documents__document_id__versions__version_id__redline_get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"docx (default), pdf, pdf_changed_pages_only, md, viewer; repeatable","title":"Format"},"description":"docx (default), pdf, pdf_changed_pages_only, md, viewer; repeatable"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionDownloadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents/{document_id}/merges":{"post":{"summary":"Create Document Merge","operationId":"create_document_merge_v1_documents__document_id__merges_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMergeRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMergeAcceptedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents/{document_id}/merges/{merge_id}":{"get":{"summary":"Get Document Merge","operationId":"get_document_merge_v1_documents__document_id__merges__merge_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"merge_id","in":"path","required":true,"schema":{"type":"string","title":"Merge Id"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"docx (default), md, viewer; repeatable","title":"Format"},"description":"docx (default), md, viewer; repeatable"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentMergeStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Document Merge","description":"Deletes a merge and its draft — the recovery action for a failed or stranded merge.\n\nMerge ids are deterministic per leaf set, so a failed merge would otherwise block that\nleaf set forever (re-POST converges on the failed row by design). 409 for a finalized\nmerge: its version is part of the document's history.","operationId":"delete_document_merge_v1_documents__document_id__merges__merge_id__delete","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"merge_id","in":"path","required":true,"schema":{"type":"string","title":"Merge Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/documents/{document_id}/merges/{merge_id}/finalize":{"post":{"summary":"Finalize Document Merge","operationId":"finalize_document_merge_v1_documents__document_id__merges__merge_id__finalize_post","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"merge_id","in":"path","required":true,"schema":{"type":"string","title":"Merge Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_finalize_document_merge_v1_documents__document_id__merges__merge_id__finalize_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionResource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_create_comparison_v1_compare_post":{"properties":{"original":{"type":"string","contentMediaType":"application/octet-stream","title":"Original","description":"The base (earlier) document"},"modified":{"type":"string","contentMediaType":"application/octet-stream","title":"Modified","description":"The revised (later) document"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author","description":"Name to attribute the redline's tracked changes to. Defaults to the revised document's uploader and file name."}},"type":"object","required":["original","modified"],"title":"Body_create_comparison_v1_compare_post"},"Body_create_document_v1_documents_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"The document's first version (v0)"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Document name; defaults to the file name"}},"type":"object","required":["file"],"title":"Body_create_document_v1_documents_post"},"Body_create_edit_v1_edit_post":{"properties":{"document":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Document","description":"The document to edit; omit when passing file_id"},"file_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File Id","description":"A document staged by POST /v1/edit/initiate. Required when the edits name ids read from that staging, since a fresh upload is preprocessed into different unids."},"edits":{"type":"string","title":"Edits","description":"JSON array of edits. Supported element operations are replace, delete, insert, replace_page_break_with_section_break, set_paragraph_style, and add_table_row. Element edits target a paragraph unid from the extracted document; add_table_row targets a paragraph inside the reference row. Revision decisions target one of the document's tracked revisions (accept_revision/reject_revision with {\"revision_id\": \"<w:id>\"})"},"style_template":{"anyOf":[{"type":"string","contentMediaType":"application/octet-stream"},{"type":"null"}],"title":"Style Template","description":"Optional .docx, .dotx, or .dotm whose styles and numbering are imported before edits"},"edit_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edit Description","description":"The request these edits fulfill"}},"type":"object","required":["edits"],"title":"Body_create_edit_v1_edit_post"},"Body_create_merge_v1_merge_post":{"properties":{"original":{"type":"string","contentMediaType":"application/octet-stream","title":"Original","description":"The base document every revision derives from"},"revisions":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Revisions","description":"Two or more revised copies of the base document"}},"type":"object","required":["original","revisions"],"title":"Body_create_merge_v1_merge_post"},"Body_create_version_v1_documents__document_id__versions_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"The new version's document"},"parent_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Version Id","description":"Version to derive from; defaults to the latest. An older one starts a branch."},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name","description":"Who the redline attributes this version's changes to. Defaults to the acting identity, which for an API key is its organization's service account."}},"type":"object","required":["file"],"title":"Body_create_version_v1_documents__document_id__versions_post"},"Body_finalize_document_merge_v1_documents__document_id__merges__merge_id__finalize_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File","description":"The conflict-resolved merged document"}},"type":"object","required":["file"],"title":"Body_finalize_document_merge_v1_documents__document_id__merges__merge_id__finalize_post"},"Body_initiate_edit_v1_edit_initiate_post":{"properties":{"document":{"type":"string","contentMediaType":"application/octet-stream","title":"Document","description":"The document to be edited"}},"type":"object","required":["document"],"title":"Body_initiate_edit_v1_edit_initiate_post"},"ComparisonAcceptedResponse":{"properties":{"comparison_id":{"type":"string","title":"Comparison Id"},"status":{"type":"string","const":"processing","title":"Status"}},"type":"object","required":["comparison_id","status"],"title":"ComparisonAcceptedResponse"},"ComparisonAcknowledgedResponse":{"properties":{"comparison_id":{"type":"string","title":"Comparison Id"},"status":{"type":"string","const":"deletion_queued","title":"Status"}},"type":"object","required":["comparison_id","status"],"title":"ComparisonAcknowledgedResponse"},"ComparisonErrorDescriptor":{"properties":{"code":{"type":"string","title":"Code"},"upstream_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upstream Code"}},"type":"object","required":["code"],"title":"ComparisonErrorDescriptor"},"ComparisonStatusResponse":{"properties":{"comparison_id":{"type":"string","title":"Comparison Id"},"status":{"type":"string","enum":["processing","ready","failed"],"title":"Status"},"downloads":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormatDownload"},"type":"array"},{"type":"null"}],"title":"Downloads"},"pending_formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Pending Formats"},"failed_formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Failed Formats"},"error":{"anyOf":[{"$ref":"#/components/schemas/ComparisonErrorDescriptor"},{"type":"null"}]}},"type":"object","required":["comparison_id","status"],"title":"ComparisonStatusResponse"},"DeletedResponse":{"properties":{"deleted":{"type":"boolean","title":"Deleted","default":true}},"type":"object","title":"DeletedResponse"},"DocumentCreatedResponse":{"properties":{"document":{"$ref":"#/components/schemas/DocumentResource"},"version":{"$ref":"#/components/schemas/DocumentVersionResource"}},"type":"object","required":["document","version"],"title":"DocumentCreatedResponse"},"DocumentDetailResponse":{"properties":{"document_id":{"type":"string","title":"Document Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"version_count":{"type":"integer","title":"Version Count"},"head_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Version Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}},"versions":{"items":{"$ref":"#/components/schemas/DocumentVersionResource"},"type":"array","title":"Versions","default":[]}},"type":"object","required":["document_id","version_count"],"title":"DocumentDetailResponse"},"DocumentListResponse":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/DocumentResource"},"type":"array","title":"Documents"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["documents"],"title":"DocumentListResponse"},"DocumentMergeAcceptedResponse":{"properties":{"merge_id":{"type":"string","title":"Merge Id"},"status":{"type":"string","enum":["processing","ready","failed","finalized"],"title":"Status"},"source_version_ids":{"items":{"type":"string"},"type":"array","title":"Source Version Ids"},"base_version_id":{"type":"string","title":"Base Version Id"}},"type":"object","required":["merge_id","status","source_version_ids","base_version_id"],"title":"DocumentMergeAcceptedResponse"},"DocumentMergeRequest":{"properties":{"version_ids":{"items":{"type":"string"},"type":"array","title":"Version Ids"}},"type":"object","required":["version_ids"],"title":"DocumentMergeRequest"},"DocumentMergeStatusResponse":{"properties":{"merge_id":{"type":"string","title":"Merge Id"},"status":{"type":"string","enum":["processing","ready","failed","finalized"],"title":"Status"},"source_version_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Source Version Ids"},"base_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Version Id"},"downloads":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormatDownload"},"type":"array"},{"type":"null"}],"title":"Downloads"},"pending_formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Pending Formats"},"error":{"anyOf":[{"$ref":"#/components/schemas/ComparisonErrorDescriptor"},{"type":"null"}]},"finalized_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finalized Version Id"}},"type":"object","required":["merge_id","status"],"title":"DocumentMergeStatusResponse"},"DocumentPatchRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"metadata":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"DocumentPatchRequest"},"DocumentResource":{"properties":{"document_id":{"type":"string","title":"Document Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"version_count":{"type":"integer","title":"Version Count"},"head_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Head Version Id"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}}},"type":"object","required":["document_id","version_count"],"title":"DocumentResource"},"DocumentVersionDownloadResponse":{"properties":{"version_id":{"type":"string","title":"Version Id"},"status":{"type":"string","enum":["processing","ready","failed"],"title":"Status"},"downloads":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormatDownload"},"type":"array"},{"type":"null"}],"title":"Downloads"},"pending_formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Pending Formats"},"failed_formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Failed Formats"},"error":{"anyOf":[{"$ref":"#/components/schemas/ComparisonErrorDescriptor"},{"type":"null"}]}},"type":"object","required":["version_id","status"],"title":"DocumentVersionDownloadResponse"},"DocumentVersionResource":{"properties":{"version_id":{"type":"string","title":"Version Id"},"document_id":{"type":"string","title":"Document Id"},"version_number":{"type":"integer","title":"Version Number"},"parent_version_ids":{"items":{"type":"string"},"type":"array","title":"Parent Version Ids"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"status":{"type":"string","enum":["processing","ready","failed"],"title":"Status"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","default":{}},"redline":{"anyOf":[{"$ref":"#/components/schemas/RedlineDescriptor"},{"type":"null"}]}},"type":"object","required":["version_id","document_id","version_number","parent_version_ids","status"],"title":"DocumentVersionResource"},"EditAcceptedResponse":{"properties":{"edit_id":{"type":"string","title":"Edit Id"},"status":{"type":"string","const":"processing","title":"Status"}},"type":"object","required":["edit_id","status"],"title":"EditAcceptedResponse"},"EditDocumentAcceptedResponse":{"properties":{"file_id":{"type":"string","title":"File Id"},"status":{"type":"string","const":"processing","title":"Status"}},"type":"object","required":["file_id","status"],"title":"EditDocumentAcceptedResponse"},"EditDocumentResponse":{"properties":{"file_id":{"type":"string","title":"File Id"},"status":{"type":"string","enum":["processing","ready","failed"],"title":"Status"},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown"},"error":{"anyOf":[{"$ref":"#/components/schemas/ComparisonErrorDescriptor"},{"type":"null"}]}},"type":"object","required":["file_id","status"],"title":"EditDocumentResponse"},"EditStatusResponse":{"properties":{"edit_id":{"type":"string","title":"Edit Id"},"status":{"type":"string","enum":["processing","ready","failed"],"title":"Status"},"downloads":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormatDownload"},"type":"array"},{"type":"null"}],"title":"Downloads"},"pending_formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Pending Formats"},"comparison_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comparison Id"},"error":{"anyOf":[{"$ref":"#/components/schemas/ComparisonErrorDescriptor"},{"type":"null"}]}},"type":"object","required":["edit_id","status"],"title":"EditStatusResponse"},"FormatDownload":{"properties":{"format":{"type":"string","title":"Format"},"url":{"type":"string","title":"Url"},"file_name":{"type":"string","title":"File Name"},"expires_at":{"type":"string","title":"Expires At"}},"type":"object","required":["format","url","file_name","expires_at"],"title":"FormatDownload"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MergeAcceptedResponse":{"properties":{"merge_id":{"type":"string","title":"Merge Id"},"status":{"type":"string","const":"processing","title":"Status"}},"type":"object","required":["merge_id","status"],"title":"MergeAcceptedResponse"},"MergeStatusResponse":{"properties":{"merge_id":{"type":"string","title":"Merge Id"},"status":{"type":"string","enum":["processing","ready","failed"],"title":"Status"},"downloads":{"anyOf":[{"items":{"$ref":"#/components/schemas/FormatDownload"},"type":"array"},{"type":"null"}],"title":"Downloads"},"pending_formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Pending Formats"},"error":{"anyOf":[{"$ref":"#/components/schemas/ComparisonErrorDescriptor"},{"type":"null"}]}},"type":"object","required":["merge_id","status"],"title":"MergeStatusResponse"},"RedlineDescriptor":{"properties":{"status":{"type":"string","enum":["processing","ready","failed"],"title":"Status"},"error":{"anyOf":[{"$ref":"#/components/schemas/ComparisonErrorDescriptor"},{"type":"null"}]}},"type":"object","required":["status"],"title":"RedlineDescriptor"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}