# HERO API ## Docs - [Working with AI agents](https://developers.myhero.so/ai/overview.md): HERO's built-in AI agents for drafting, reviewing, and analysing documents — accessible via the REST API and MCP server, with skills for contracts, NDAs, compliance, and more. - [Check document access](https://developers.myhero.so/api-reference/access/get-document-access.md): Returns `true` if the authenticated user can access the document identified by `documentId`, `false` otherwise. - [Check email existence](https://developers.myhero.so/api-reference/access/get-email-exists.md): Returns `true` if a user account is registered for `email`, `false` otherwise. - [Check project access](https://developers.myhero.so/api-reference/access/get-project-access.md): Returns `true` if the authenticated user can access the project identified by `projectId`, `false` otherwise. - [Run an AI agent](https://developers.myhero.so/api-reference/ai/ai-chat.md): Runs the general AI agent and returns the complete response as a `chatMessages` array. - [Retrieve AI usage](https://developers.myhero.so/api-reference/ai/ai-get-usage.md): Returns the authenticated user's current token consumption (`usedTokens`), plan limit (`tokenLimit`), and the timestamp when the usage counter resets (`tokenResetAt`). - [Stream an AI agent](https://developers.myhero.so/api-reference/ai/ai-stream.md): Runs the general AI agent and streams its response as Server-Sent Events over `text/event-stream`. - [Transform text](https://developers.myhero.so/api-reference/ai/ai-transform-text.md): Applies a named transformation (`operation`) to the provided `text` and returns the rewritten string along with token `usage`. - [Undo last AI agent run](https://developers.myhero.so/api-reference/ai/ai-undo.md): Reverses the most recent AI-driven changes for the given `sessionId` and truncates that exchange from the conversation history. - [Create an API key](https://developers.myhero.so/api-reference/api-keys/create-api-key.md): Creates a personal API key that authenticates as the calling user against the standard REST API. - [List API keys](https://developers.myhero.so/api-reference/api-keys/list-api-keys.md): Returns the calling user's REST API keys (active only). - [Revoke an API key](https://developers.myhero.so/api-reference/api-keys/revoke-api-key.md): Marks the API key as revoked. - [Retrieve a block](https://developers.myhero.so/api-reference/blocks/get-block-by-id.md): Returns a single block document (clause block, clause reference, placeholder, term definition, or image block) by its `_id`. - [Retrieve multiple blocks](https://developers.myhero.so/api-reference/blocks/get-blocks-by-ids.md): Accepts an array of block IDs and returns the matching block documents. - [Create a clause reference](https://developers.myhero.so/api-reference/clauses/create-clause-reference.md): Creates a clause reference linking a block in a document to a cross-document clause hierarchy. - [Paste clause references](https://developers.myhero.so/api-reference/clauses/create-pasted-clause-references.md): Duplicates clause references during a paste operation by mapping old reference IDs to new IDs supplied in `oldToNewClauseReferenceIds`. - [Retrieve a clause block](https://developers.myhero.so/api-reference/clauses/get-clause-block-by-id-or-hierarchy.md): Looks up the clause block associated with a clause reference, first by block ID and then by the reference's `hierarchy` string. - [Retrieve a clause reference](https://developers.myhero.so/api-reference/clauses/get-clause-reference-by-id.md): Returns the `ClauseReference` record identified by `referenceId`. - [Retrieve multiple clause references](https://developers.myhero.so/api-reference/clauses/get-clause-references-by-ids.md): Bulk-fetches `ClauseReference` records for the IDs supplied in `data`. - [LLM-friendly site map](https://developers.myhero.so/api-reference/discovery/get-llms-txt.md): Curated, markdown-formatted overview of the site for AI crawlers, per the llmstxt.org convention. - [Robots exclusion rules](https://developers.myhero.so/api-reference/discovery/get-robots-txt.md): Standard robots.txt at the site root telling crawlers which paths are allowed/disallowed and pointing at the sitemap. - [Security disclosure contacts](https://developers.myhero.so/api-reference/discovery/get-security-txt.md): RFC 9116 security.txt with contact info for security researchers reporting vulnerabilities. - [Public URL sitemap](https://developers.myhero.so/api-reference/discovery/get-sitemap-xml.md): XML sitemap of publicly indexable URLs, per the sitemaps.org schema. - [Accept a document transfer](https://developers.myhero.so/api-reference/documents/accept-document-transfer.md): Accepts a pending transfer identified by `transferId`, copying the documents into the caller's target workspace or project. - [Create a document](https://developers.myhero.so/api-reference/documents/create-document.md): Creates a new document inside the given project. - [Create a document transfer](https://developers.myhero.so/api-reference/documents/create-document-transfer.md): Initiates a transfer of one or more documents to another user by `email`. - [Decline a document transfer](https://developers.myhero.so/api-reference/documents/decline-document-transfer.md): Marks a pending transfer as declined. - [Delete documents](https://developers.myhero.so/api-reference/documents/delete-documents-many.md): Soft-deletes the given documents and all of their descendants by setting `isDeleted: true`. - [Stream the latest .docx blob](https://developers.myhero.so/api-reference/documents/export-docx-blob.md): Streams the .docx blob directly with an attachment Content-Disposition header. - [Retrieve document preview content](https://developers.myhero.so/api-reference/documents/get-doc-preview-content-by-document-id.md): Returns the ProseMirror JSON content of a document, derived from its Y.js collaborative state. - [Retrieve a document](https://developers.myhero.so/api-reference/documents/get-document.md): Retrieves a single document by `documentId`. - [Retrieve document editor data](https://developers.myhero.so/api-reference/documents/get-document-initial-data.md): Returns the aggregated payload required to bootstrap the document editor for `documentId`. - [Retrieve PDF template data](https://developers.myhero.so/api-reference/documents/get-document-pdfdata.md): Retrieves the stored PDF template payload for a document of type `EXTERNAL/PDF`. - [Retrieve document settings](https://developers.myhero.so/api-reference/documents/get-document-settings.md): Returns the settings record for the document identified by `documentId`, including `listTemplateId` and `importedTermsFileId`. - [List document transfers](https://developers.myhero.so/api-reference/documents/get-document-transfers.md): Returns all document transfers where the authenticated user is either the sender or the recipient. - [Retrieve multiple documents](https://developers.myhero.so/api-reference/documents/get-documents.md): Fetches a batch of documents by their `_id`s. - [List documents in a project](https://developers.myhero.so/api-reference/documents/get-documents-by-project-id.md): Lists all documents belonging to `projectId`. - [List interconnected document IDs](https://developers.myhero.so/api-reference/documents/get-documents-interconnection.md): Traverses the document graph starting from the provided `documentIds` and returns all reachable related document IDs. - [Get signed URL for the .docx blob](https://developers.myhero.so/api-reference/documents/get-docx-download-url.md): Returns a short-lived signed URL the browser can use to fetch the .docx blob from object storage, plus the `seededAt` timestamp (or null) used to coordinate first-open seeding. - [Retrieve PDF initial data](https://developers.myhero.so/api-reference/documents/get-pdfinitial-data.md): Returns the table references and referenced rows associated with a PDF document. - [Invite a user to a document](https://developers.myhero.so/api-reference/documents/invite-user-to-document.md): Invites a single user by `email` to a document with the specified `role`. - [Invite users to documents](https://developers.myhero.so/api-reference/documents/invite-users-to-documents.md): Invites one or more users by `emails` to one or more `documentIds` at the specified `role`. - [Mark a DOCX as Y.Doc-seeded](https://developers.myhero.so/api-reference/documents/mark-docx-seeded.md): Sets `external.seededAt` on the DocumentDoc after the browser has converted the .docx blob into the collaborative Y.Doc. - [Copy documents to a location](https://developers.myhero.so/api-reference/documents/paste-documents.md): Creates deep copies of the specified documents (and their children) under a new `parentId`. - [Remove a document collaborator](https://developers.myhero.so/api-reference/documents/remove-collaborator.md): Removes a collaborator by `userId` from a single document and cleans up their access from any parent folder hierarchy if they no longer have access to other documents in those folders. - [Remove a collaborator from documents](https://developers.myhero.so/api-reference/documents/remove-collaborator-from-documents.md): Removes a collaborator by `userId` from multiple documents at once. - [Persist updated .docx blob](https://developers.myhero.so/api-reference/documents/save-docx-blob.md): Accepts a base64-encoded .docx produced by the browser DOCX instance and writes it to object storage, replacing the previous blob in-place. - [Update a collaborator's role](https://developers.myhero.so/api-reference/documents/update-collaborator-role.md): Changes the role of a collaborator on a single document. - [Update document settings](https://developers.myhero.so/api-reference/documents/update-document-settings.md): Applies a partial settings update to the document identified by `documentId`. - [Update many documents](https://developers.myhero.so/api-reference/documents/update-documents-many.md): Updates metadata (name, parentId, icon, published settings, etc.) for one or more documents in a single call. - [Export to PDF](https://developers.myhero.so/api-reference/export/convert-doc-to-pdf.md): Converts one or more base64-encoded DOCX files to PDF via LibreOffice and returns the results as base64-encoded PDF strings. - [Retrieve export data for documents](https://developers.myhero.so/api-reference/export/get-export-documents-data.md): Assembles full export payloads for the requested `documentIds` within a project. - [Begin OAuth authorization](https://developers.myhero.so/api-reference/integrations/begin-authorize.md): Initiates the OAuth authorization flow for the specified `provider` (e.g. `gmail`, `google_drive`). - [Disconnect an integration](https://developers.myhero.so/api-reference/integrations/disconnect-integration.md): Revokes and removes the OAuth connection for the specified `provider` from the authenticated user's account. - [Handle OAuth callback](https://developers.myhero.so/api-reference/integrations/handle-integration-callback.md): Receives the OAuth authorization callback from the provider, exchanges the `code` and `state` for tokens, and responds with an HTML bounce page that JS-redirects the user back to the web or desktop app. - [List connected integrations](https://developers.myhero.so/api-reference/integrations/list-integrations.md): Returns all OAuth integration connections for the authenticated user. - [Download Claude Desktop extension](https://developers.myhero.so/api-reference/mcp/mcp-download-claude-desktop-extension.md): Downloads the HERO Claude Desktop Extension package (`hero.dxt`) as an `application/zip` binary. - [Terminate an MCP session](https://developers.myhero.so/api-reference/mcp/mcp-http-delete.md): Terminates the active MCP session identified by the required `mcp-session-id` header, freeing server-side resources. - [Open an MCP server-sent event stream](https://developers.myhero.so/api-reference/mcp/mcp-http-get.md): Opens a server-sent event stream for an existing MCP session identified by the required `mcp-session-id` header. - [Send a JSON-RPC request to the MCP server](https://developers.myhero.so/api-reference/mcp/mcp-http-post.md): Implements the MCP Streamable HTTP transport (spec 2025-03-26). - [Redirect to MCP install deeplink](https://developers.myhero.so/api-reference/mcp/mcp-install-client.md): Issues a 302 redirect to the client-specific deeplink URL for installing the HERO MCP server (e.g. `cursor`, `vscode`). - [Invoke an MCP tool](https://developers.myhero.so/api-reference/mcp/mcp-invoke-tool.md): Executes the MCP tool identified by `toolName` with the key-value `args` map provided in the request body. - [List MCP tools](https://developers.myhero.so/api-reference/mcp/mcp-list-tools.md): Returns the catalog of MCP tools available to the authenticated user along with system `instructions`. - [Connect via legacy SSE transport](https://developers.myhero.so/api-reference/mcp/mcp-sse-connect.md): Opens a server-sent event stream using the legacy MCP SSE transport. - [Post a message to a legacy SSE session](https://developers.myhero.so/api-reference/mcp/mcp-sse-message.md): Delivers a JSON-RPC message to an active legacy SSE session identified by the `sessionId` query parameter. - [Upload an image](https://developers.myhero.so/api-reference/media/create-image.md): Uploads an image asset and stores its metadata. - [Upload a video](https://developers.myhero.so/api-reference/media/create-video.md): Uploads a video asset (mp4/webm/quicktime up to 100MB) and stores its metadata. - [Delete an image](https://developers.myhero.so/api-reference/media/delete-image.md): Deletes the image record identified by `imageId` and removes it from object storage. - [Retrieve image URL](https://developers.myhero.so/api-reference/media/get-image-by-id.md): Returns a signed Supabase URL for the image identified by `imageId`. - [Retrieve video URL](https://developers.myhero.so/api-reference/media/get-video-by-id.md): Returns a signed Supabase URL for the video identified by `videoId`. - [Replace image content](https://developers.myhero.so/api-reference/media/update-image.md): Replaces the binary content of an existing image in object storage and refreshes its signed URL. - [List organizations](https://developers.myhero.so/api-reference/organizations/get-all-organizations.md): Returns all organizations the authenticated user is a member of, including personal and shared organizations. - [Retrieve an organization](https://developers.myhero.so/api-reference/organizations/get-organization-by-id.md): Returns the full organization document for `orgId`. - [Retrieve default organization](https://developers.myhero.so/api-reference/organizations/get-user-default-organization.md): Returns the authenticated user's personal (default) organization, or `null` if none has been created yet. - [Copy projects to a location](https://developers.myhero.so/api-reference/projects/create-pasted-projects.md): Creates deep copies of one or more projects (and all their documents) into the target workspace or project. - [Create a project](https://developers.myhero.so/api-reference/projects/create-project.md): Creates a new project inside the specified workspace. - [Delete projects](https://developers.myhero.so/api-reference/projects/delete-many-projects.md): Soft-deletes multiple projects supplied as a comma-separated list of IDs in the path. - [Delete a project](https://developers.myhero.so/api-reference/projects/delete-project.md): Soft-deletes a project by setting `isDeleted: true` and asynchronously cleans up its inner data. - [Retrieve project initial data](https://developers.myhero.so/api-reference/projects/get-project-initial-data.md): Returns the full aggregated payload needed to initialize the project view, including documents, tables, rows, columns, cells, and blocks for `projectId`. - [Retrieve project tree data](https://developers.myhero.so/api-reference/projects/get-project-tree-data.md): Returns the project metadata and its flat list of documents in a single response. - [List projects in a workspace](https://developers.myhero.so/api-reference/projects/get-projects-in-workspace.md): Returns all projects the caller has access to within the given `workspaceId`. - [Retrieve a project](https://developers.myhero.so/api-reference/projects/get-single-project.md): Retrieves a single project by `projectId`. - [Update a project](https://developers.myhero.so/api-reference/projects/update-project.md): Updates one or more metadata fields (`name`, `description`, `reference`, `icon`, `emoji`) for the given project. - [Authenticate to a published doc](https://developers.myhero.so/api-reference/published/authenticate-published-document.md): Validates a viewer's password against a password-protected published portal. - [Retrieve published dashboard info](https://developers.myhero.so/api-reference/published/get-published-dashboard-info.md): Returns the list of published documents, their publishers' profiles, project branding, and configured published domains for `projectId`. - [Retrieve a published document](https://developers.myhero.so/api-reference/published/get-published-document-data.md): Returns the ProseMirror content and metadata for a single published document identified by `publishedId`. - [List published domains](https://developers.myhero.so/api-reference/published/get-published-domains.md): Returns the project document with its `published` domain array for `projectId`. - [Retrieve published homepage ID](https://developers.myhero.so/api-reference/published/get-published-homepage.md): Resolves the portal slug from the request and returns the `homepageId` of its first published domain. 404 when the portal has no homepage configured. - [Retrieve a published media file](https://developers.myhero.so/api-reference/published/get-published-media.md): Streams the raw image bytes for `imageId` attached to the published document `publishedId`. - [Retrieve branding for the current portal](https://developers.myhero.so/api-reference/published/get-published-portal-branding.md): Returns the `company` and `callToAction` branding for the portal resolved from the request host. - [Retrieve published project data for the current portal](https://developers.myhero.so/api-reference/published/get-published-portal-data.md): Returns the project-level aggregate data (`projectData`) for the portal resolved from the request host. - [Retrieve published project branding](https://developers.myhero.so/api-reference/published/get-published-project-branding.md): Returns the `company` and `callToAction` branding for the project that owns the given `publishedId` (or the slug-resolved portal when `publishedId` is `home`). - [Retrieve published project data](https://developers.myhero.so/api-reference/published/get-published-project-initial-data.md): Returns the project-level aggregate data (`projectData`) for the portal that owns the given `publishedId`. - [Retrieve a published tooltip](https://developers.myhero.so/api-reference/published/get-published-tooltip.md): Returns the title and ProseMirror content for a term-definition or clause-reference block identified by `tooltipId`. - [Check if a slug is available on a published domain](https://developers.myhero.so/api-reference/published/get-slug-availability.md): Returns whether the given `slug` is available for use on the given `domainSlug`. - [Publish or unpublish documents](https://developers.myhero.so/api-reference/published/publish-documents.md): Sets `isPublished` on each document in `documentIds` and returns the updated publish settings. - [Update published branding](https://developers.myhero.so/api-reference/published/update-published-branding.md): Updates the company info and call-to-action branding stored on a project's published portal. - [Update published document settings](https://developers.myhero.so/api-reference/published/update-published-doc-settings.md): Persists per-document published settings — custom styling key/value pairs and the `domainSlug` — for the document identified by `publishedId`. - [Update a published domain](https://developers.myhero.so/api-reference/published/update-published-domain.md): Updates the slug, password, disabled state, or homepage document for the domain identified by `slug`. - [List referenced rows for a document](https://developers.myhero.so/api-reference/references/get-referenced-rows-by-document-id.md): Returns all `ReferencedRowInDocument` records associated with the specified `documentId`. - [Retrieve referenced rows by IDs](https://developers.myhero.so/api-reference/references/get-referenced-rows-in-document-by-ids.md): Bulk-fetches `ReferencedRowInDocument` records for the IDs supplied in `data`. - [Update a referenced row ID](https://developers.myhero.so/api-reference/references/update-referenced-row-in-document.md): Updates the `rowId` on an existing `ReferencedRowInDocument` record identified by the `tableId` + `documentId` + `workspaceId` combination. - [Upsert a referenced row](https://developers.myhero.so/api-reference/references/upsert-referenced-row-in-document.md): Creates or updates a record linking a table row to a document. - [Add a snapshot comment](https://developers.myhero.so/api-reference/snapshots/add-snapshot-comment.md): Appends a new comment to the snapshot's `comments` array. - [Create a snapshot](https://developers.myhero.so/api-reference/snapshots/create-snapshot.md): Captures the current Y.js state of a document as a restorable snapshot. - [Delete a snapshot](https://developers.myhero.so/api-reference/snapshots/delete-snapshot.md): Permanently deletes the snapshot. - [Delete a snapshot comment](https://developers.myhero.so/api-reference/snapshots/delete-snapshot-comment.md): Removes a comment from a snapshot. - [Update a snapshot comment](https://developers.myhero.so/api-reference/snapshots/edit-snapshot-comment.md): Replaces the text of a snapshot comment. - [Retrieve a snapshot](https://developers.myhero.so/api-reference/snapshots/get-snapshot-by-id.md): Returns a single snapshot including the full Y.js-encoded `state` binary, suitable for rendering or restoring the document at that point in time. - [List snapshots for a document](https://developers.myhero.so/api-reference/snapshots/get-snapshots-by-document-id.md): Returns all snapshots for the given document, sorted newest-first. - [Rename a snapshot](https://developers.myhero.so/api-reference/snapshots/update-snapshot-name.md): Sets a new `name` for the snapshot. - [Update a snapshot](https://developers.myhero.so/api-reference/snapshots/update-snapshot-partial.md): Updates a snapshot's `name`, `description`, or both. - [Create a column](https://developers.myhero.so/api-reference/tables/create-column.md): Adds a new typed column to the given table and creates blank cells for every existing row. - [Duplicate pasted table references](https://developers.myhero.so/api-reference/tables/create-pasted-table-references.md): Re-creates table references for a document block that was pasted into `documentId`. - [Create a row](https://developers.myhero.so/api-reference/tables/create-row.md): Appends a new row to the given table and creates blank cells for every existing column. - [Create a table](https://developers.myhero.so/api-reference/tables/create-table.md): Creates a new table inside the given project. - [Create tables from a spreadsheet](https://developers.myhero.so/api-reference/tables/create-table-from-csv.md): Parses a CSV, TSV, or XLSX file (provided as a base64-encoded string in `csvData`) and creates one table per sheet. - [Create a table reference](https://developers.myhero.so/api-reference/tables/create-table-reference.md): Links a table column into a document, optionally binding it to a specific row. - [Delete a column](https://developers.myhero.so/api-reference/tables/delete-column.md): Permanently deletes a column and all its cells. - [Delete a row](https://developers.myhero.so/api-reference/tables/delete-row.md): Permanently deletes a row and all its cells. - [Delete a table](https://developers.myhero.so/api-reference/tables/delete-table.md): Permanently deletes the table and all its associated rows, columns, and cells. - [List tables in a project](https://developers.myhero.so/api-reference/tables/get-all-tables-by-project-id.md): Returns all table documents the authenticated user can access within the given project. - [List table IDs in a project](https://developers.myhero.so/api-reference/tables/get-all-tables-ids-by-project-id.md): Returns the `_id` of every table in the given project, ordered newest-first. - [Retrieve multiple cells](https://developers.myhero.so/api-reference/tables/get-cells-by-ids.md): Accepts an array of cell IDs and returns the subset the caller can access. - [Retrieve multiple columns](https://developers.myhero.so/api-reference/tables/get-columns-by-ids.md): Accepts an array of column IDs and returns the subset belonging to tables the caller can access. - [List cells in a row](https://developers.myhero.so/api-reference/tables/get-row-cells.md): Returns all cells belonging to a specific row. - [Retrieve row permissions](https://developers.myhero.so/api-reference/tables/get-row-permissions.md): Returns the caller's highest effective role for the given row and a `canEdit` flag indicating whether the user may write to cells in that row. - [Retrieve multiple rows](https://developers.myhero.so/api-reference/tables/get-rows-by-ids.md): Accepts an array of row IDs and returns the subset the caller can access. - [Retrieve a table](https://developers.myhero.so/api-reference/tables/get-table-by-id.md): Returns a single table document. - [Retrieve a cell](https://developers.myhero.so/api-reference/tables/get-table-cell.md): Returns a single cell document including its typed `data` value. - [List cells in a table](https://developers.myhero.so/api-reference/tables/get-table-cells.md): Returns all cells for the given table that the caller can access. - [Retrieve a column](https://developers.myhero.so/api-reference/tables/get-table-column.md): Returns a single column document including its data type and type-specific options. - [List columns in a table](https://developers.myhero.so/api-reference/tables/get-table-columns.md): Returns all column documents for the given table, including their types and type-specific options. - [Retrieve table permissions](https://developers.myhero.so/api-reference/tables/get-table-permissions.md): Returns the caller's highest effective role (`owner`, `admin`, `member`, `editor`, or `viewer`) for the given table, together with whether access is granted via workspace membership and the list of referencing document IDs. - [Retrieve a table reference](https://developers.myhero.so/api-reference/tables/get-table-reference-by-id.md): Returns a single table reference document. - [List table references in a document](https://developers.myhero.so/api-reference/tables/get-table-references-by-document-id.md): Returns all table references embedded in the given document. - [Retrieve multiple table references](https://developers.myhero.so/api-reference/tables/get-table-references-by-ids.md): Accepts an array of table reference IDs and returns matching documents. - [Retrieve a row](https://developers.myhero.so/api-reference/tables/get-table-row.md): Returns a single row document. - [List rows in a table](https://developers.myhero.so/api-reference/tables/get-table-rows.md): Returns all rows the caller can access within the given table. - [Retrieve multiple tables](https://developers.myhero.so/api-reference/tables/get-tables-by-ids.md): Accepts an array of table IDs and returns the subset the caller can access. - [Update a cell](https://developers.myhero.so/api-reference/tables/update-cell.md): Updates the `value` of a single cell. - [Update a column](https://developers.myhero.so/api-reference/tables/update-column.md): Updates a column's `name`, `description`, data `type`, or type-specific options (`number`, `oneMany`, `selectItems`). - [Update a table](https://developers.myhero.so/api-reference/tables/update-table.md): Updates a table's `name`, `description`, `columns` order array, or `icon`. - [Update a table reference](https://developers.myhero.so/api-reference/tables/update-table-reference.md): Updates the `oneToManyColumnId` and/or `oneToManyInstanceIds` of a table reference. - [Copy document templates to a project](https://developers.myhero.so/api-reference/templates/copy-template-documents-to-user.md): Copies up to 10 document templates into a user's project, refreshing all internal IDs in the process. - [Copy project templates to a workspace](https://developers.myhero.so/api-reference/templates/copy-template-projects-to-user.md): Copies one or more project templates into the specified workspace, creating new projects for each. - [Import SEC EDGAR filings as templates](https://developers.myhero.so/api-reference/templates/create-sec-gov-documents.md): Fetches and parses SEC EDGAR `.htm` filing URLs, converts them to Scribe document format, and stores them as document templates. - [List all templates](https://developers.myhero.so/api-reference/templates/get-all-templates.md): Returns all available project templates and document templates in a single response. - [List document templates](https://developers.myhero.so/api-reference/templates/get-document-templates.md): Returns all available document templates. - [List project templates](https://developers.myhero.so/api-reference/templates/get-project-templates.md): Returns all available project templates including their name, icon, emoji, and metadata. - [Retrieve clause tooltip](https://developers.myhero.so/api-reference/tooltips/get-tooltip-clause-reference.md): Returns the tooltip content for a clause reference, including the referenced block's `title`, ProseMirror `content` nodes, and `blockId`. - [Retrieve term tooltip](https://developers.myhero.so/api-reference/tooltips/get-tooltip-term.md): Returns the tooltip content for a term definition identified by `termId`, including a `title` and ProseMirror `content` array. - [List TTS voices](https://developers.myhero.so/api-reference/tts/get-tts-voices.md): Returns the catalog of available text-to-speech voices, each with a `key`, display `name`, and `gender` (`female` | `male`). - [Synthesize conversational speech](https://developers.myhero.so/api-reference/tts/synthesize-conversational.md): Generates text-to-speech audio in a conversational style and returns the result as a binary `audio/mpeg` stream. - [Synthesize speech](https://developers.myhero.so/api-reference/tts/synthesize-speech.md): Generates text-to-speech audio for the given `text` using the configured Gemini TTS provider. - [Create documents from a file tree](https://developers.myhero.so/api-reference/upload/create-uploaded-documents.md): Ingests a nested file-tree map of base64-encoded file contents (`uploaded`) and creates corresponding Scribe documents in the specified workspace or project. - [Validate an embed URL](https://developers.myhero.so/api-reference/upload/validate-embed-url.md): Checks whether the given `url` is safe and suitable for embedding in the editor. - [Create a user account](https://developers.myhero.so/api-reference/users/create-user.md): Creates a new Firebase and database user record from the provided `email` and `password`. - [Retrieve entity owner](https://developers.myhero.so/api-reference/users/get-doc-owner.md): Returns the `CollaboratorUser` who owns the document, project, or workspace identified by `docId`. - [Retrieve own user profile](https://developers.myhero.so/api-reference/users/get-self-user-info.md): Returns the full user document for the authenticated caller, including profile fields and editor settings such as font size, theme, tree ordering, and signature preferences. - [List collaborators](https://developers.myhero.so/api-reference/users/get-user-collaborators.md): Returns all users who share at least one organization or workspace with the authenticated user. - [Retrieve collaborators by IDs or emails](https://developers.myhero.so/api-reference/users/get-user-collaborators-by-ids.md): Looks up users by comma-separated `userIds` and/or `emails` query params and returns the matching `CollaboratorUser` records. - [Complete user onboarding](https://developers.myhero.so/api-reference/users/setup-user-default-data.md): Finalizes account setup for a newly registered user: creates a default organization and workspace, provisions a Stripe customer and billing seat, applies any early-bird coupon, and optionally seeds template projects and sends invitation emails. - [Update user profile](https://developers.myhero.so/api-reference/users/update-user-info.md): Updates one or more profile fields (`firstName`, `lastName`, `pictureUrl`, `avatarId`) for the authenticated user. - [Update user settings](https://developers.myhero.so/api-reference/users/update-user-settings.md): Persists editor and display preferences — font size, theme, tree ordering, selected signature, or custom signature — for the authenticated user. - [Update a collaborator's workspace role](https://developers.myhero.so/api-reference/workspaces/change-workspace-user-role.md): Changes the role of a workspace collaborator identified by `userId`. - [Create a workspace](https://developers.myhero.so/api-reference/workspaces/create-workspace.md): Creates a new workspace under the authenticated user's default organization. - [Delete a workspace](https://developers.myhero.so/api-reference/workspaces/delete-workspace.md): Soft-deletes the workspace and all of its projects. - [List workspaces](https://developers.myhero.so/api-reference/workspaces/get-all-user-workspaces.md): Returns all workspaces the authenticated user is a member of, across all organizations. - [List workspaces in an organization](https://developers.myhero.so/api-reference/workspaces/get-all-user-workspaces-by-org-id.md): Returns all workspaces the authenticated user belongs to within the specified `orgId`. - [Retrieve the default workspace](https://developers.myhero.so/api-reference/workspaces/get-default-workspace.md): Returns the default workspace for the authenticated user's default organization. - [Retrieve a workspace](https://developers.myhero.so/api-reference/workspaces/get-workspace-by-id.md): Retrieves a single workspace by `workspaceId`. - [Retrieve workspace dashboard info](https://developers.myhero.so/api-reference/workspaces/get-workspace-dashboard-info.md): Returns aggregated information for the workspace dashboard, including the workspace record, member profiles, and teams. - [Invite a user to a workspace](https://developers.myhero.so/api-reference/workspaces/invite-user-to-workspace.md): Sends a workspace invitation to the given `email` address at the specified `role`. - [Leave a workspace](https://developers.myhero.so/api-reference/workspaces/remove-self-from-workspace.md): Removes the authenticated user from the workspace. - [Remove a user from a workspace](https://developers.myhero.so/api-reference/workspaces/remove-user-from-workspace.md): Removes a collaborator from the workspace. - [Update a workspace](https://developers.myhero.so/api-reference/workspaces/update-workspace.md): Updates the `name` and/or `description` of a workspace. - [Authentication](https://developers.myhero.so/authentication.md): Authenticate to the HERO REST API and MCP server with Bearer API keys. Generate, scope, and revoke keys from your account settings. - [Changelog](https://developers.myhero.so/changelog.md): Updates to the HERO API. - [Demos](https://developers.myhero.so/demos.md): End-to-end walkthroughs for the most common HERO integrations. - [Errors](https://developers.myhero.so/errors.md): HERO REST API error response shape and status codes — a JSON envelope with error, message, and details fields, listed by HTTP status. - [Overview](https://developers.myhero.so/introduction.md): Build with documents, projects, tables, and AI. - [MCP Authentication](https://developers.myhero.so/mcp/authentication.md): Authenticate MCP clients with a personal access token or via OAuth. - [Connect HERO to your AI tool](https://developers.myhero.so/mcp/overview.md): Connect Cursor, VS Code, Claude Desktop, and other MCP clients to HERO. Install links, manual config, and the remote MCP endpoint. - [Append markdown to document](https://developers.myhero.so/mcp/tools/editor/append-markdown-to-document.md): Append content to the END of an existing document. Existing content is PRESERVED — new content is added after it. Use when the user asks to ADD, INSERT… - [Create document snapshot](https://developers.myhero.so/mcp/tools/editor/create-document-snapshot.md): Create a named version/snapshot of a document's current state before making significant edits. Use this before large rewrites or restructures of documents… - [List document blocks](https://developers.myhero.so/mcp/tools/editor/list-document-blocks.md): WHEN TO USE: Before calling patch_document to get block IDs. List all blocks in a document with their blockId, type, and text excerpt. Use this to… - [Patch document](https://developers.myhero.so/mcp/tools/editor/patch-document.md): Surgically edit a document by applying block-level operations. Each operation targets a specific block by its blockId (use list_document_blocks to find… - [Read document content](https://developers.myhero.so/mcp/tools/editor/read-document-content.md): WHEN TO USE: You need raw TipTap JSON for programmatic manipulation. For reading/understanding content, prefer read_document_text instead. Read a… - [Write document markdown](https://developers.myhero.so/mcp/tools/editor/write-document-markdown.md): ⚠️ REPLACES ALL existing content with new Markdown-based content. To ADD content to an existing document, use append_markdown_to_document instead… - [Get hero writing guide](https://developers.myhero.so/mcp/tools/general/get-hero-writing-guide.md): Get the complete HERO writing reference: extended markdown DSL, clause depth rules, placeholder usage, legal writing style, and tool selection guidance… - [Tool catalog](https://developers.myhero.so/mcp/tools/index.md): Full catalog of 87 HERO MCP tools — editor, knowledge, project tree, tables, web, workflows, and integrations (Gmail, Drive, Outlook, OneDrive, Dropbox, Notion). - [Dropbox get file content](https://developers.myhero.so/mcp/tools/integrations-dropbox/dropbox-get-file-content.md): Fetch the text content of a Dropbox file. Only text-like extensions are supported (txt, md, json, csv, log, yml, yaml, html, xml, common code files). PDFs… - [Dropbox list folder](https://developers.myhero.so/mcp/tools/integrations-dropbox/dropbox-list-folder.md): List files and subfolders inside a Dropbox path. Pass empty string for the Dropbox root. - [Dropbox search](https://developers.myhero.so/mcp/tools/integrations-dropbox/dropbox-search.md): Search the user's Dropbox by filename and (for supported text formats) content. Returns file/folder metadata. Follow up with dropbox_get_file_content for… - [Gmail get attachment](https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-get-attachment.md): Download and read the content of an email attachment from Gmail. Requires the messageId and attachmentId from the attachments list returned by… - [Gmail get message](https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-get-message.md): Fetch a single Gmail message with its full body text. Use the id returned by gmail_search. Returns headers, snippet, full plain-text body (capped at 10… - [Gmail get thread](https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-get-thread.md): Fetch an entire Gmail conversation thread given a threadId (from gmail_search results). Returns all messages in the thread with their full plain-text… - [Gmail search](https://developers.myhero.so/mcp/tools/integrations-gmail/gmail-search.md): Search the user's Gmail using Gmail's native query syntax. Returns message headers + snippets (NOT full bodies). Gmail query examples: … - [Drive get file content](https://developers.myhero.so/mcp/tools/integrations-google-drive/drive-get-file-content.md): Fetch the text content of a Drive file. Native Google Docs/Sheets/Slides are exported to plain text/CSV. Text files are fetched directly. PDFs and binary… - [Drive list folder](https://developers.myhero.so/mcp/tools/integrations-google-drive/drive-list-folder.md): List files and subfolders directly inside a Google Drive folder. Pass the folder's id, or omit folderId to list the root. - [Drive search](https://developers.myhero.so/mcp/tools/integrations-google-drive/drive-search.md): Search the user's Google Drive using Drive's native query syntax. Returns file metadata only (no content — follow up with drive_get_file_content). Drive… - [Notion get page](https://developers.myhero.so/mcp/tools/integrations-notion/notion-get-page.md): Fetch a Notion page's full content. Walks the top-level blocks and flattens them to plain text. Content is truncated to 15 KB. Use id from notion_search… - [Notion query database](https://developers.myhero.so/mcp/tools/integrations-notion/notion-query-database.md): Query a Notion database with optional filter and sort. Returns rows (each is a Notion page) with their property values. Use this when the user asks for… - [Notion search](https://developers.myhero.so/mcp/tools/integrations-notion/notion-search.md): Search the user's Notion workspace for pages and databases by TITLE. IMPORTANT: Notion's search only matches titles, NOT page content. To search content… - [Onedrive get file content](https://developers.myhero.so/mcp/tools/integrations-onedrive/onedrive-get-file-content.md): Fetch the text content of a OneDrive file. Only text-like files (text/*, json, xml, javascript) are supported. PDFs, Office docs, and binary formats… - [Onedrive list folder](https://developers.myhero.so/mcp/tools/integrations-onedrive/onedrive-list-folder.md): List files and subfolders directly inside a OneDrive folder. Omit folderId to list the root. - [Onedrive search](https://developers.myhero.so/mcp/tools/integrations-onedrive/onedrive-search.md): Search the user's OneDrive for files by name and content. The query is a single free-text string — Graph matches it against filenames, content, and… - [Outlook get attachment](https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-get-attachment.md): Download and read the content of an email attachment from Outlook. Requires the messageId and attachmentId from the attachments list returned by… - [Outlook get conversation](https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-get-conversation.md): Fetch all Outlook messages in a conversation, sorted chronologically, with full bodies (each capped at 5 KB). Pass the conversationId from outlook_search… - [Outlook get message](https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-get-message.md): Fetch a single Outlook message with its full body (capped at 10 KB). Use id from outlook_search. If the message has attachments, returns their IDs and… - [Outlook search](https://developers.myhero.so/mcp/tools/integrations-outlook/outlook-search.md): Search the user's Outlook / Microsoft 365 mailbox via Microsoft Graph. Returns message headers + snippets (not full bodies — follow up with… - [Build document map](https://developers.myhero.so/mcp/tools/knowledge/build-document-map.md): WHEN TO USE: You need a structural overview (table of contents, section list, defined terms) without reading full content. Build a structural map of a… - [Create clause reference](https://developers.myhero.so/mcp/tools/knowledge/create-clause-reference.md): Create a clause reference record in the database. Returns a clauseReferenceId that you can embed in document content using (in extended Markdown) or as a… - [Explain term definition](https://developers.myhero.so/mcp/tools/knowledge/explain-term-definition.md): Explain a defined term (e.g. "Party", "Effective Date") in a specific document. Returns the definition content. - [Find documents with clause blocks](https://developers.myhero.so/mcp/tools/knowledge/find-documents-with-clause-blocks.md): Find all documents in a project that contain clause blocks (structured legal sections). - [Get document clauses](https://developers.myhero.so/mcp/tools/knowledge/get-document-clauses.md): Return all clause blocks from a document as structured JSON. - [Get document maps](https://developers.myhero.so/mcp/tools/knowledge/get-document-maps.md): Build document maps (sections + terms) for ALL documents in a project. Useful for cross-document search. - [Get document metadata](https://developers.myhero.so/mcp/tools/knowledge/get-document-metadata.md): Get metadata for a specific document: name, type, description, collaborators, timestamps, parent folder, published status. - [Get section by numbering](https://developers.myhero.so/mcp/tools/knowledge/get-section-by-numbering.md): Find a clause section by its numbering (e.g. "1.1", "22.1"). Returns numbering, title, depth, and full content. - [Get section titles](https://developers.myhero.so/mcp/tools/knowledge/get-section-titles.md): List clause section titles at a given depth (0 = top-level). Useful for getting a table of contents. - [Get table schema](https://developers.myhero.so/mcp/tools/knowledge/get-table-schema.md): Get the column schema of a table by table ID. - [List clause blocks for reference](https://developers.myhero.so/mcp/tools/knowledge/list-clause-blocks-for-reference.md): List all clause blocks in a document with their blockId, hierarchy, depth, numbering, and text preview. Use this to find the blockId needed to create a… - [List project documents](https://developers.myhero.so/mcp/tools/knowledge/list-project-documents.md): List all documents (files, subfiles, and external PDFs) in a project. Returns name, id, type, and externalType (e.g. 'PDF') for each. - [List project folders](https://developers.myhero.so/mcp/tools/knowledge/list-project-folders.md): List all folders in a project. - [Read document text](https://developers.myhero.so/mcp/tools/knowledge/read-document-text.md): WHEN TO USE: You need to understand content for questions, analysis, or summarization. Works for editor documents and PDFs. Prefer this over… - [Resolve table by name](https://developers.myhero.so/mcp/tools/knowledge/resolve-table-by-name.md): Resolve a table ID from its name within a project. - [Lookup table columns](https://developers.myhero.so/mcp/tools/placeholders/lookup-table-columns.md): Look up a table's columns by table name or ID. Returns column metadata (columnId, name, type, isIdentifier) so you can decide which columns to use as… - [Lookup table rows](https://developers.myhero.so/mcp/tools/placeholders/lookup-table-rows.md): Look up rows in a table. Returns each row's ID and identifier (primary key) value, plus a preview of cell values for the first few columns. Use this to… - [Prepare placeholder references](https://developers.myhero.so/mcp/tools/placeholders/prepare-placeholder-references.md): Create TableReference entries for one or more columns so you can insert placeholderNode nodes in document content. Call this BEFORE generating document… - [Update referenced row](https://developers.myhero.so/mcp/tools/placeholders/update-referenced-row.md): Change which row the placeholders display for a given table in a document. Updates the ReferencedRowInDocument link so all existing placeholderNode nodes… - [Copy documents to](https://developers.myhero.so/mcp/tools/project-tree/copy-documents-to.md): Copy one or more documents/folders into a specific destination folder (or project root). Folders are copied recursively — every nested document and… - [Create document](https://developers.myhero.so/mcp/tools/project-tree/create-document.md): Create a new document (file) or folder in a project. Set type to "FOLDER" for folders, "FILE" for documents. - [Create document batch](https://developers.myhero.so/mcp/tools/project-tree/create-document-batch.md): Create multiple documents/folders in one operation. Useful for scaffolding a project structure. Items are created in order so you can reference earlier… - [Create project](https://developers.myhero.so/mcp/tools/project-tree/create-project.md): Create a new project in the current workspace. - [Delete documents](https://developers.myhero.so/mcp/tools/project-tree/delete-documents.md): Delete one or more documents/folders (and their children). THIS IS DESTRUCTIVE — only call after confirming with the user. - [Delete project](https://developers.myhero.so/mcp/tools/project-tree/delete-project.md): Delete an entire project and all its documents. THIS IS DESTRUCTIVE — only call after confirming with the user. - [Duplicate documents](https://developers.myhero.so/mcp/tools/project-tree/duplicate-documents.md): Duplicate one or more documents/folders in place (same parent, same project). Folders are duplicated recursively — every nested document and subfolder is… - [List project tree](https://developers.myhero.so/mcp/tools/project-tree/list-project-tree.md): Get the full document tree for a project: all folders and files with their parent-child relationships. Returns id, name, type, parentId, createdAt… - [List user workspaces](https://developers.myhero.so/mcp/tools/project-tree/list-user-workspaces.md): List all workspaces the current user has access to. Returns each workspace's id, name, and metadata. Use this when the user asks about their workspaces or… - [List workspace projects](https://developers.myhero.so/mcp/tools/project-tree/list-workspace-projects.md): List all projects in a workspace with their names, ids, and timestamps. - [Move document](https://developers.myhero.so/mcp/tools/project-tree/move-document.md): Move a document or folder to a different parent. Omit newParentId to move to project root. - [Move document batch](https://developers.myhero.so/mcp/tools/project-tree/move-document-batch.md): Move multiple documents/folders in one operation. Provide a shared newParentId to move all items to the same folder, or specify a per-item newParentId to… - [Rename document](https://developers.myhero.so/mcp/tools/project-tree/rename-document.md): Rename a document or folder. - [Rename project](https://developers.myhero.so/mcp/tools/project-tree/rename-project.md): Rename an existing project. - [Search documents](https://developers.myhero.so/mcp/tools/project-tree/search-documents.md): Search for documents and folders by name across all workspaces the user has access to. Returns up to 20 matches with full path context (workspace… - [Search projects](https://developers.myhero.so/mcp/tools/project-tree/search-projects.md): Search for projects by name across all workspaces the user has access to. Returns each match's _id, name, description, workspaceId, and workspaceName so… - [Update documents meta batch](https://developers.myhero.so/mcp/tools/project-tree/update-documents-meta-batch.md): Update metadata (icon, emoji, name, description, reference) for one or more documents, folders, or projects in a single call. Each item targets either a… - [Add row](https://developers.myhero.so/mcp/tools/tables-data/add-row.md): Add a SINGLE row to a table. For adding 2+ rows, use add_row_batch instead — it is faster and more reliable. Pass cellValues as an object mapping column… - [Add row batch](https://developers.myhero.so/mcp/tools/tables-data/add-row-batch.md): Add multiple rows to a table at once. Each item in rows is a map of column name → value. For linked identifiers: pass instead of a plain string for the… - [Batch update column](https://developers.myhero.so/mcp/tools/tables-data/batch-update-column.md): Apply a transformation to all cell values in a column. Supports operations: "set" (set all to a value), "add" (add a number), "subtract" (subtract a… - [Delete row](https://developers.myhero.so/mcp/tools/tables-data/delete-row.md): Delete a row from a table. DESTRUCTIVE — confirm first. - [Lookup table cells](https://developers.myhero.so/mcp/tools/tables-data/lookup-table-cells.md): Look up cells in a table, returning cell IDs and row IDs alongside their values. Essential before setting linked identifiers, linkCell values, oneMany… - [Update cells](https://developers.myhero.so/mcp/tools/tables-data/update-cells.md): Update cell values for a specific row. Pass values as column name → new value. For linked identifiers: pass to link to a row in another table. - [Create table reference](https://developers.myhero.so/mcp/tools/tables-references/create-table-reference.md): Create a table reference linking a table column to a document. This enables placeholder values from the table to appear in the document. Returns reference… - [Get document table references](https://developers.myhero.so/mcp/tools/tables-references/get-document-table-references.md): Get all table references (placeholder links) used within a document. - [Set formula](https://developers.myhero.so/mcp/tools/tables-references/set-formula.md): Configure a formula for a formula-type column. The expression uses column names wrapped in curly braces, e.g. " + " or " * - ". The tool resolves column… - [Add column](https://developers.myhero.so/mcp/tools/tables-schema/add-column.md): Add a new column to an existing table. Also creates empty cells for all existing rows. For select/multiSelect: provide selectOptions (array of label… - [Create table](https://developers.myhero.so/mcp/tools/tables-schema/create-table.md): Create a new table with a name and an initial set of columns. Exactly ONE column must have isIdentifier: true — this is the primary key column (e.g. a… - [Delete column](https://developers.myhero.so/mcp/tools/tables-schema/delete-column.md): Delete a column and all its cells. DESTRUCTIVE — confirm first. - [Delete table](https://developers.myhero.so/mcp/tools/tables-schema/delete-table.md): Delete a table and all its data. DESTRUCTIVE — confirm with user first. - [Get table data](https://developers.myhero.so/mcp/tools/tables-schema/get-table-data.md): Read the full data of a table: all rows with their cell values. Returns column schema and rows as maps of column name to value. - [List project tables](https://developers.myhero.so/mcp/tools/tables-schema/list-project-tables.md): List all tables in a project with column summaries. - [Rename table](https://developers.myhero.so/mcp/tools/tables-schema/rename-table.md): Rename an existing table. - [Update column](https://developers.myhero.so/mcp/tools/tables-schema/update-column.md): Update a column's name, type, selectOptions, or linkedTableId. For select/multiSelect: pass selectOptions to replace the available options. For oneMany… - [Fetch url content](https://developers.myhero.so/mcp/tools/web/fetch-url-content.md): Fetch and extract text content from a web URL. Returns clean text from HTML pages. Use this when the user provides a link and wants you to read or use its… - [Search web](https://developers.myhero.so/mcp/tools/web/search-web.md): Search the web for information. Returns results with titles, URLs, and snippets. Use when you need external information or to find a specific page. - [Web cache get meta](https://developers.myhero.so/mcp/tools/web/web-cache-get-meta.md): Get metadata for a cached web document by id (length, title). - [Web cache read chunk](https://developers.myhero.so/mcp/tools/web/web-cache-read-chunk.md): Read a chunk of cached web document HTML by character range. Use iteratively for large documents. - [Web cache read tail](https://developers.myhero.so/mcp/tools/web/web-cache-read-tail.md): Read the last N characters of a cached web document to verify and process tail content. - [Finish with summary](https://developers.myhero.so/mcp/tools/workflows/finish-with-summary.md): Call this when you have completed all requested work. Provide a brief summary of what was done. This signals to the frontend that the agent run is… - [Plan](https://developers.myhero.so/mcp/tools/workflows/plan.md): Create or update an execution plan with numbered steps. Call this BEFORE starting a multi-step task to show the user what you intend to do. You can call… - [Webhooks](https://developers.myhero.so/webhooks.md): Outbound webhooks let HERO notify your endpoint when documents, tables, or projects change. On the roadmap — subscribe to the changelog for updates. - [Working with the API](https://developers.myhero.so/working-with-the-api.md): Conventions, base URL, and your first request. ## OpenAPI Specs - [openapi](https://developers.myhero.so/openapi.json)