{"openapi":"3.1.0","info":{"title":"Ferrule Google Docs API","version":"1.0.0","description":"REST API for Google Docs via the Ferrule gateway.","contact":{"name":"Ferrule","url":"https://ferrule.io"}},"servers":[{"url":"https://0.0.0.0:3000","description":"Ferrule gateway"}],"paths":{"/api/v1/google-docs/documents/{documentId}":{"get":{"operationId":"google-docs.get_document","description":"Get a Google Doc by ID. Returns full document structure including body, headers, footers, lists, and styles.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc to retrieve."},"required":true,"description":"The ID of the Google Doc to retrieve."},{"in":"query","name":"suggestionsViewMode","schema":{"description":"How to render suggestions: 'DEFAULT_FOR_CURRENT_ACCESS', 'SUGGESTIONS_INLINE', 'PREVIEW_SUGGESTIONS_ACCEPTED', or 'PREVIEW_WITHOUT_SUGGESTIONS'.","type":"string"}},{"in":"query","name":"includeTabsContent","schema":{"description":"Whether to include tab content in the response (default false).","type":"boolean"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"anyOf":[{"type":"object","properties":{"content":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"footers":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"footnotes":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"lists":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"inlineObjects":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"namedRanges":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"documentStyle":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"namedStyles":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/text":{"get":{"operationId":"google-docs.get_document_text","description":"Get the plain text content of a Google Doc. Extracts all text from paragraphs, stripping formatting.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc to extract text from."},"required":true,"description":"The ID of the Google Doc to extract text from."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents":{"post":{"operationId":"google-docs.create_document","description":"Create a new empty Google Doc with the given title. Returns the created document.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"query","name":"title","schema":{"type":"string","description":"The title for the new document."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"documentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"revisionId":{"anyOf":[{"type":"string"},{"type":"null"}]},"body":{"anyOf":[{"type":"object","properties":{"content":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"headers":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"footers":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"footnotes":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"lists":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"inlineObjects":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"namedRanges":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"documentStyle":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"namedStyles":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/insert-text":{"post":{"operationId":"google-docs.insert_text","description":"Insert text at a specific index in a Google Doc. Index 1 is the beginning of the document body.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"text","schema":{"type":"string","description":"The text to insert."}},{"in":"query","name":"index","schema":{"type":"number","description":"The zero-based index to insert text at."}},{"in":"query","name":"segmentId","schema":{"description":"The segment ID (header, footer, or footnote ID). Omit for the document body.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/append-text":{"post":{"operationId":"google-docs.append_text","description":"Append text to the end of a Google Doc. Automatically determines the correct insertion index.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"text","schema":{"type":"string","description":"The text to append."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/delete-content":{"post":{"operationId":"google-docs.delete_content","description":"Delete content within a range in a Google Doc. Specify start and end indices.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"startIndex","schema":{"type":"number","description":"The start index of the range to delete."}},{"in":"query","name":"endIndex","schema":{"type":"number","description":"The end index of the range to delete."}},{"in":"query","name":"segmentId","schema":{"description":"The segment ID (header, footer, or footnote ID). Omit for the document body.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/replace-all-text":{"post":{"operationId":"google-docs.replace_all_text","description":"Find and replace all occurrences of a text string in a Google Doc.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"findText","schema":{"type":"string","description":"The text to find."}},{"in":"query","name":"replaceText","schema":{"type":"string","description":"The replacement text."}},{"in":"query","name":"matchCase","schema":{"description":"Whether the search is case-sensitive (default true).","type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/update-text-style":{"post":{"operationId":"google-docs.update_text_style","description":"Update text formatting (bold, italic, underline, font, color, etc.) for a range within a Google Doc. Only specified properties are changed; others are left unchanged.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"startIndex","schema":{"type":"number","description":"The start index of the range to format."}},{"in":"query","name":"endIndex","schema":{"type":"number","description":"The end index of the range to format."}},{"in":"query","name":"segmentId","schema":{"description":"The segment ID (header, footer, or footnote ID). Omit for the document body.","type":"string"}},{"in":"query","name":"bold","schema":{"description":"Set bold formatting.","type":"boolean"}},{"in":"query","name":"italic","schema":{"description":"Set italic formatting.","type":"boolean"}},{"in":"query","name":"underline","schema":{"description":"Set underline formatting.","type":"boolean"}},{"in":"query","name":"strikethrough","schema":{"description":"Set strikethrough formatting.","type":"boolean"}},{"in":"query","name":"fontSize","schema":{"description":"Font size in points (e.g. 12).","type":"number"}},{"in":"query","name":"fontFamily","schema":{"description":"Font family name (e.g. 'Arial', 'Times New Roman').","type":"string"}},{"in":"query","name":"foregroundColor","schema":{"description":"Text foreground color as RGB values (0-1 each).","type":"object","properties":{"red":{"description":"Red component (0-1).","type":"number"},"green":{"description":"Green component (0-1).","type":"number"},"blue":{"description":"Blue component (0-1).","type":"number"}}}},{"in":"query","name":"link","schema":{"description":"URL to link the text to. Pass empty string to remove link.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/update-paragraph-style":{"post":{"operationId":"google-docs.update_paragraph_style","description":"Update paragraph formatting (alignment, spacing, indentation, named style) for a range within a Google Doc. Only specified properties are changed.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"startIndex","schema":{"type":"number","description":"The start index of the range to format."}},{"in":"query","name":"endIndex","schema":{"type":"number","description":"The end index of the range to format."}},{"in":"query","name":"segmentId","schema":{"description":"The segment ID (header, footer, or footnote ID). Omit for the document body.","type":"string"}},{"in":"query","name":"namedStyleType","schema":{"description":"Named style: 'NORMAL_TEXT', 'TITLE', 'SUBTITLE', 'HEADING_1' through 'HEADING_6'.","type":"string"}},{"in":"query","name":"alignment","schema":{"description":"Paragraph alignment: 'START', 'CENTER', 'END', 'JUSTIFIED'.","type":"string"}},{"in":"query","name":"lineSpacing","schema":{"description":"Line spacing as a percentage (e.g. 100 for single, 200 for double).","type":"number"}},{"in":"query","name":"spaceAbove","schema":{"description":"Space above the paragraph in points.","type":"number"}},{"in":"query","name":"spaceBelow","schema":{"description":"Space below the paragraph in points.","type":"number"}},{"in":"query","name":"indentStart","schema":{"description":"Start (left) indentation in points.","type":"number"}},{"in":"query","name":"indentEnd","schema":{"description":"End (right) indentation in points.","type":"number"}},{"in":"query","name":"indentFirstLine","schema":{"description":"First line indentation in points.","type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/manage-bullets":{"post":{"operationId":"google-docs.manage_bullets","description":"Add or remove bullet/numbered list formatting for paragraphs in a range.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"startIndex","schema":{"type":"number","description":"The start index of the range."}},{"in":"query","name":"endIndex","schema":{"type":"number","description":"The end index of the range."}},{"in":"query","name":"segmentId","schema":{"description":"The segment ID (header, footer, or footnote ID). Omit for the document body.","type":"string"}},{"in":"query","name":"action","schema":{"type":"string","enum":["add","remove"],"description":"Whether to 'add' or 'remove' bullets."}},{"in":"query","name":"bulletPreset","schema":{"description":"Bullet preset when adding (e.g. 'BULLET_DISC_CIRCLE_SQUARE', 'NUMBERED_DECIMAL_ALPHA_ROMAN'). Defaults to 'BULLET_DISC_CIRCLE_SQUARE'.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/insert-table":{"post":{"operationId":"google-docs.insert_table","description":"Insert a table at a specific index in a Google Doc.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"index","schema":{"type":"number","description":"The index in the document to insert the table at."}},{"in":"query","name":"rows","schema":{"type":"number","description":"The number of rows for the new table."}},{"in":"query","name":"columns","schema":{"type":"number","description":"The number of columns for the new table."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/modify-table":{"post":{"operationId":"google-docs.modify_table","description":"Modify a table in a Google Doc. Supports inserting/deleting rows and columns.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"action","schema":{"type":"string","enum":["insertRow","insertColumn","deleteRow","deleteColumn"],"description":"The table modification action: 'insertRow', 'insertColumn', 'deleteRow', or 'deleteColumn'."}},{"in":"query","name":"tableStartIndex","schema":{"type":"number","description":"The start index of the table in the document."}},{"in":"query","name":"rowIndex","schema":{"description":"The row index for insert/delete row operations.","type":"number"}},{"in":"query","name":"columnIndex","schema":{"description":"The column index for insert/delete column operations.","type":"number"}},{"in":"query","name":"insertBelow","schema":{"description":"For insertRow: insert below (true) or above (false) the reference row. Default true.","type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/insert-page-break":{"post":{"operationId":"google-docs.insert_page_break","description":"Insert a page break at a specific index in a Google Doc.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"index","schema":{"type":"number","description":"The index in the document to insert the page break at."}},{"in":"query","name":"segmentId","schema":{"description":"The segment ID (header, footer, or footnote ID). Omit for the document body.","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/insert-inline-image":{"post":{"operationId":"google-docs.insert_inline_image","description":"Insert an inline image from a URL at a specific index in a Google Doc.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"index","schema":{"type":"number","description":"The index in the document to insert the image at."}},{"in":"query","name":"uri","schema":{"type":"string","description":"The URL of the image to insert."}},{"in":"query","name":"width","schema":{"description":"Image width in points. Omit to use the image's natural size.","type":"number"}},{"in":"query","name":"height","schema":{"description":"Image height in points. Omit to use the image's natural size.","type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/manage-headers-footers":{"post":{"operationId":"google-docs.manage_headers_footers","description":"Create or delete headers and footers in a Google Doc.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"action","schema":{"type":"string","enum":["createHeader","createFooter","deleteHeader","deleteFooter"],"description":"The action: 'createHeader', 'createFooter', 'deleteHeader', or 'deleteFooter'."}},{"in":"query","name":"type","schema":{"description":"Header/footer type for create actions: 'DEFAULT' (default).","type":"string"}},{"in":"query","name":"headerId","schema":{"description":"The header ID to delete (required for deleteHeader).","type":"string"}},{"in":"query","name":"footerId","schema":{"description":"The footer ID to delete (required for deleteFooter).","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}},"/api/v1/google-docs/documents/{documentId}/batch-update":{"post":{"operationId":"google-docs.batch_update","description":"Send a raw batchUpdate request to the Google Docs API. Use this for complex or multi-step document modifications not covered by other tools. Accepts an array of request objects per the Google Docs API spec.","tags":["google-docs"],"security":[{"oauth2":[]},{"bearerApiKey":[]}],"parameters":[{"in":"path","name":"documentId","schema":{"type":"string","description":"The ID of the Google Doc."},"required":true,"description":"The ID of the Google Doc."},{"in":"query","name":"requests","schema":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"description":"Array of request objects per the Google Docs batchUpdate API spec."}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Request body parameters"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}},"502":{"description":"Upstream error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean"},"code":{"type":"string"},"message":{"type":"string"}},"required":["error","code","message"],"additionalProperties":false}}}}}}}},"webhooks":{},"components":{"schemas":{"__schema0":{"type":"object","properties":{"startIndex":{"anyOf":[{"type":"number"},{"type":"null"}]},"endIndex":{"anyOf":[{"type":"number"},{"type":"null"}]},"paragraph":{"anyOf":[{"type":"object","properties":{"elements":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startIndex":{"anyOf":[{"type":"number"},{"type":"null"}]},"endIndex":{"anyOf":[{"type":"number"},{"type":"null"}]},"textRun":{"anyOf":[{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"textStyle":{"anyOf":[{"type":"object","properties":{"bold":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"italic":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"underline":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"strikethrough":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"fontSize":{"anyOf":[{"type":"object","properties":{"magnitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"foregroundColor":{"anyOf":[{"type":"object","properties":{"color":{"anyOf":[{"type":"object","properties":{"rgbColor":{"anyOf":[{"type":"object","properties":{"red":{"anyOf":[{"type":"number"},{"type":"null"}]},"green":{"anyOf":[{"type":"number"},{"type":"null"}]},"blue":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"backgroundColor":{"anyOf":[{"type":"object","properties":{"color":{"anyOf":[{"type":"object","properties":{"rgbColor":{"anyOf":[{"type":"object","properties":{"red":{"anyOf":[{"type":"number"},{"type":"null"}]},"green":{"anyOf":[{"type":"number"},{"type":"null"}]},"blue":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"fontFamily":{"anyOf":[{"type":"string"},{"type":"null"}]},"link":{"anyOf":[{"type":"object","properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"bookmarkId":{"anyOf":[{"type":"string"},{"type":"null"}]},"headingId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"baselineOffset":{"anyOf":[{"type":"string"},{"type":"null"}]},"smallCaps":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}}},{"type":"null"}]},"paragraphStyle":{"anyOf":[{"type":"object","properties":{"namedStyleType":{"anyOf":[{"type":"string"},{"type":"null"}]},"alignment":{"anyOf":[{"type":"string"},{"type":"null"}]},"lineSpacing":{"anyOf":[{"type":"number"},{"type":"null"}]},"direction":{"anyOf":[{"type":"string"},{"type":"null"}]},"spacingMode":{"anyOf":[{"type":"string"},{"type":"null"}]},"spaceAbove":{"anyOf":[{"type":"object","properties":{"magnitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"spaceBelow":{"anyOf":[{"type":"object","properties":{"magnitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"indentFirstLine":{"anyOf":[{"type":"object","properties":{"magnitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"indentStart":{"anyOf":[{"type":"object","properties":{"magnitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"indentEnd":{"anyOf":[{"type":"object","properties":{"magnitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"bullet":{"anyOf":[{"type":"object","properties":{"listId":{"anyOf":[{"type":"string"},{"type":"null"}]},"nestingLevel":{"anyOf":[{"type":"number"},{"type":"null"}]},"textStyle":{"anyOf":[{"type":"object","properties":{"bold":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"italic":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"underline":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"strikethrough":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"fontSize":{"anyOf":[{"type":"object","properties":{"magnitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"foregroundColor":{"anyOf":[{"type":"object","properties":{"color":{"anyOf":[{"type":"object","properties":{"rgbColor":{"anyOf":[{"type":"object","properties":{"red":{"anyOf":[{"type":"number"},{"type":"null"}]},"green":{"anyOf":[{"type":"number"},{"type":"null"}]},"blue":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"backgroundColor":{"anyOf":[{"type":"object","properties":{"color":{"anyOf":[{"type":"object","properties":{"rgbColor":{"anyOf":[{"type":"object","properties":{"red":{"anyOf":[{"type":"number"},{"type":"null"}]},"green":{"anyOf":[{"type":"number"},{"type":"null"}]},"blue":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"fontFamily":{"anyOf":[{"type":"string"},{"type":"null"}]},"link":{"anyOf":[{"type":"object","properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"bookmarkId":{"anyOf":[{"type":"string"},{"type":"null"}]},"headingId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"baselineOffset":{"anyOf":[{"type":"string"},{"type":"null"}]},"smallCaps":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"table":{"anyOf":[{"type":"object","properties":{"rows":{"anyOf":[{"type":"number"},{"type":"null"}]},"columns":{"anyOf":[{"type":"number"},{"type":"null"}]},"tableRows":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startIndex":{"anyOf":[{"type":"number"},{"type":"null"}]},"endIndex":{"anyOf":[{"type":"number"},{"type":"null"}]},"tableCells":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"startIndex":{"anyOf":[{"type":"number"},{"type":"null"}]},"endIndex":{"anyOf":[{"type":"number"},{"type":"null"}]},"content":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]},"tableCellStyle":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}}},{"type":"null"}]},"tableRowStyle":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}}},{"type":"null"}]},"tableStyle":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"sectionBreak":{"anyOf":[{"type":"object","properties":{"sectionStyle":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]},"tableOfContents":{"anyOf":[{"type":"object","properties":{"content":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/__schema0"}},{"type":"null"}]}},"additionalProperties":{}},{"type":"null"}]}},"additionalProperties":{}}},"securitySchemes":{"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"/oauth/authorize","tokenUrl":"/oauth/token","scopes":{}}}},"bearerApiKey":{"type":"http","scheme":"bearer","description":"API key authentication. Pass a Ferrule API key as a Bearer token."}}}}