# Authentication Source: https://docs.autype.com/api-reference/authentication How to authenticate your API requests Direct Developer API requests use an Autype API key. Interactive remote MCP clients such as ChatGPT and Claude authenticate against the MCP server with OAuth; Autype then performs a server-side token exchange before the MCP server calls the Developer API. ## Providing your API key Include your API key in the `X-API-Key` header (case-insensitive): ```bash theme={null} curl -H "X-API-Key: ak_your_api_key_here" https://api.autype.com/api/v1/dev/... ``` Never place an API key in browser code or a committed MCP configuration file. OAuth-capable clients should connect to `https://mcp.autype.com/mcp` and complete browser consent instead. The trailing-slash form is accepted and normalized to the same protected resource. ## OAuth through the MCP server Remote MCP clients discover Autype's OAuth 2.1 endpoints automatically. After browser consent they receive a short-lived token bound to the MCP resource. The trusted Autype MCP service exchanges it for a separate, short-lived Developer API audience token before making internal API calls. ```http theme={null} MCP client -> Authorization: Bearer mcp_at_ MCP service -> Authorization: Bearer mcp_at_ ``` The first token is bound to the approved user, organization, client, scopes, and MCP resource. The second is bound to the same identity and equal or narrower scopes, but to the Developer API audience. Raw MCP resource tokens, Autype login JWTs, and third-party Bearer tokens are rejected by the Developer API. End users never need to perform this exchange manually. See the [MCP integration overview](/automation/integrations/mcp/overview) for the complete connection flow. Users can review and revoke their own grants under **Settings → Connected Apps**. A disconnect is scoped to the selected OAuth client and organization and immediately revokes both foreground and background access. It does not delete the globally registered OAuth client or affect grants made by other users. ## API key scopes * API keys are bound to your organization * All operations and resources are scoped to your organization * Credit costs are deducted from your organization's balance * Every protected endpoint declares the scopes it requires Choose only the permissions the integration needs: | Scope | Grants access to | | ------------------ | ------------------------------------------------------------------------- | | `read:documents` | Read projects, documents, templates, styles, reusable blocks, and records | | `write:documents` | Create or update projects, documents, and records | | `render:documents` | Validate, render, export, and bulk render documents | | `manage:resources` | Create, update, and delete styles and reusable blocks | | `manage:files` | Upload images and use file, PDF, and conversion tools | When scopes are omitted while creating a key, Autype grants all currently available scopes for backward compatibility. An explicitly empty scope list is rejected. Requests to endpoints outside the granted scopes return `403`. ## Security best practices API keys should only be used in server-side applications. Never include them in JavaScript that runs in the browser. Store your API key in environment variables rather than hardcoding it in your source code. ```bash theme={null} export AUTYPE_API_KEY=ak_your_api_key_here ``` Create new API keys periodically and revoke old ones. You can manage keys in your dashboard. Create separate API keys for development, staging, and production environments. ## Error responses | Status Code | Message | Description | | ----------- | -------------------------------------- | --------------------------------------------------------------------------------------------------- | | 401 | `Authentication is required` | No `X-API-Key` or supported OAuth Bearer token was provided | | 401 | `Invalid or expired credential` | The API key or Developer-API-audience token is invalid, expired, revoked, or has the wrong audience | | 403 | `Credential is missing required scope` | The credential does not grant every scope required by the endpoint | # Add PDF watermark Source: https://docs.autype.com/api-reference/developer-api/add-pdf-watermark /api-reference/openapi.json post /api/v1/dev/tools/pdf/watermark Add a text watermark to all or specific pages of a PDF. # Archive a saved record Source: https://docs.autype.com/api-reference/developer-api/archive-a-saved-record /api-reference/openapi.json delete /api/v1/dev/records/{recordId} # Build insert payload for snapshot/reference insertion Source: https://docs.autype.com/api-reference/developer-api/build-insert-payload-for-snapshotreference-insertion /api-reference/openapi.json post /api/v1/dev/reusable-blocks/{blockId}/insert # Check Extended Markdown export readiness Source: https://docs.autype.com/api-reference/developer-api/check-extended-markdown-export-readiness /api-reference/openapi.json post /api/v1/dev/render/readiness/markdown Converts Extended Markdown through the central AST pipeline and checks metadata, images, headings and tables without rendering or charging credits. # Check JSON document export readiness Source: https://docs.autype.com/api-reference/developer-api/check-json-document-export-readiness /api-reference/openapi.json post /api/v1/dev/render/readiness Checks required metadata, image descriptions, heading hierarchy and table headers without rendering or charging credits. This is not PDF/A or PDF/UA certification. # Classify document Source: https://docs.autype.com/api-reference/developer-api/classify-document /api-reference/openapi.json post /api/v1/dev/tools/lens/classify Classify a document into one of the provided categories using AI. The AI reads the first 3 pages of the document and picks the best matching category. Supports PDF, DOCX, ODT, and Markdown files. Cost: 6 credits per request. # Compress PDF Source: https://docs.autype.com/api-reference/developer-api/compress-pdf /api-reference/openapi.json post /api/v1/dev/tools/pdf/compress Compress a PDF to reduce file size. Choose from three compression levels: low (light), medium (balanced), high (maximum). # Convert DOCX to PDF Source: https://docs.autype.com/api-reference/developer-api/convert-docx-to-pdf /api-reference/openapi.json post /api/v1/dev/tools/convert/docx-to-pdf Convert a DOCX file to PDF or other formats like ODT. # Convert HTML to PDF Source: https://docs.autype.com/api-reference/developer-api/convert-html-to-pdf /api-reference/openapi.json post /api/v1/dev/tools/convert/html-to-pdf Convert an HTML file to a high-quality PDF. Supports custom page settings, margins, headers, footers with page numbers, and CSS media emulation for framework compatibility. # Convert images to PDF Source: https://docs.autype.com/api-reference/developer-api/convert-images-to-pdf /api-reference/openapi.json post /api/v1/dev/tools/convert/image-to-pdf Convert one or more images (PNG, JPEG, GIF, BMP) into a single PDF. Each image becomes one page. Images are scaled to fit the page while maintaining aspect ratio. # Convert ODT to PDF Source: https://docs.autype.com/api-reference/developer-api/convert-odt-to-pdf /api-reference/openapi.json post /api/v1/dev/tools/convert/odt-to-pdf Convert an ODT file to PDF or other formats like DOCX. # Create a saved record for a document Source: https://docs.autype.com/api-reference/developer-api/create-a-saved-record-for-a-document /api-reference/openapi.json post /api/v1/dev/documents/{documentId}/records # Create an organization reusable block Source: https://docs.autype.com/api-reference/developer-api/create-an-organization-reusable-block /api-reference/openapi.json post /api/v1/dev/reusable-blocks # Create an organization style preset Source: https://docs.autype.com/api-reference/developer-api/create-an-organization-style-preset /api-reference/openapi.json post /api/v1/dev/styles # Create bulk render job from file Source: https://docs.autype.com/api-reference/developer-api/create-bulk-render-job-from-file /api-reference/openapi.json post /api/v1/dev/bulk-render/file Create a bulk render job by uploading a CSV, Excel, or JSON file with variable data. # Create bulk render job from JSON Source: https://docs.autype.com/api-reference/developer-api/create-bulk-render-job-from-json /api-reference/openapi.json post /api/v1/dev/bulk-render Create a bulk render job with an array of variable sets. Each item generates one document. # Create document Source: https://docs.autype.com/api-reference/developer-api/create-document /api-reference/openapi.json post /api/v1/dev/documents Create a new document in a project. The document is attributed to the API key creator. Optionally provide initial document content following the Autype document JSON schema. If no content is provided, a default document with the title as heading is created. **Image handling:** If the document content contains `/temp-image/{id}` references (from temporary image uploads), they are automatically converted to permanent `/image/{assetId}` assets attached to the new document. This allows you to upload images first via `POST /images/upload`, then reference them in the document content — the conversion happens transparently on creation. # Create document from Extended Markdown Source: https://docs.autype.com/api-reference/developer-api/create-document-from-extended-markdown /api-reference/openapi.json post /api/v1/dev/documents/markdown Create a persistent document from Extended Markdown. This is the recommended endpoint for AI agents and automation: send human-readable markdown plus compact JSON metadata (`document`, `variables`, `stylePresetId`, etc.). Autype stores the result as validated document JSON internally, so the full JSON API remains available for advanced clients. # Create project Source: https://docs.autype.com/api-reference/developer-api/create-project /api-reference/openapi.json post /api/v1/dev/projects Create a new project in the organization. Projects created via the API are always PUBLIC (visible to all org members). # Delete a file Source: https://docs.autype.com/api-reference/developer-api/delete-a-file /api-reference/openapi.json delete /api/v1/dev/tools/files/{fileId} Delete a tool file. The file is removed from storage immediately. # Delete a temporary image Source: https://docs.autype.com/api-reference/developer-api/delete-a-temporary-image /api-reference/openapi.json delete /api/v1/dev/images/{imageId} Delete a temporary image before it expires. # Delete an organization reusable block Source: https://docs.autype.com/api-reference/developer-api/delete-an-organization-reusable-block /api-reference/openapi.json delete /api/v1/dev/reusable-blocks/{blockId} # Delete an organization style preset Source: https://docs.autype.com/api-reference/developer-api/delete-an-organization-style-preset /api-reference/openapi.json delete /api/v1/dev/styles/{styleId} # Download a file Source: https://docs.autype.com/api-reference/developer-api/download-a-file /api-reference/openapi.json get /api/v1/dev/tools/files/{fileId}/download Download a tool file by ID. Returns the raw file stream. # Download bulk render output ZIP Source: https://docs.autype.com/api-reference/developer-api/download-bulk-render-output-zip /api-reference/openapi.json get /api/v1/dev/bulk-render/{bulkJobId}/download Download the bulk render output as a ZIP file. Supports two authentication methods: (1) API key via X-API-Key header, or (2) signed download token via ?token= query parameter. The token is included in the downloadUrl returned by the bulk job status endpoint. # Download render output file Source: https://docs.autype.com/api-reference/developer-api/download-render-output-file /api-reference/openapi.json get /api/v1/dev/render/{jobId}/download Download the rendered document file. Supports two authentication methods: (1) API key via X-API-Key header, or (2) signed download token via ?token= query parameter. The token is included in the downloadUrl returned by the job status endpoint. # Extract structured data Source: https://docs.autype.com/api-reference/developer-api/extract-structured-data /api-reference/openapi.json post /api/v1/dev/tools/lens/extract Extract structured data from a document based on a user-defined field schema. Define field names, types (string, number, boolean, date, array), and optional descriptions. The AI reads the document and returns a JSON object with the extracted values. For PDF files, you can optionally specify which pages to process. Cost: 14 credits per processed page. # Fill PDF form fields Source: https://docs.autype.com/api-reference/developer-api/fill-pdf-form-fields /api-reference/openapi.json post /api/v1/dev/tools/pdf/fill-form Fill form fields in a PDF with provided values. Supports text fields, checkboxes, dropdowns, and radio groups. Optionally flatten fields to make them non-editable. # Flatten PDF Source: https://docs.autype.com/api-reference/developer-api/flatten-pdf /api-reference/openapi.json post /api/v1/dev/tools/pdf/flatten Flatten a PDF by merging all annotations, form fields, and interactive elements into the page content, making them non-editable. # Generate document filename Source: https://docs.autype.com/api-reference/developer-api/generate-document-filename /api-reference/openapi.json post /api/v1/dev/tools/lens/generate-filename Generate a structured filename for a document based on a naming schema with placeholders (e.g. "invoice-{invoiceNr}-{dateCreated}"). The AI reads up to the first three PDF pages and uses an LLM to fill in the placeholder values. Cost: 6 credits per request. # Get a reusable block with versions Source: https://docs.autype.com/api-reference/developer-api/get-a-reusable-block-with-versions /api-reference/openapi.json get /api/v1/dev/reusable-blocks/{blockId} # Get a saved record Source: https://docs.autype.com/api-reference/developer-api/get-a-saved-record /api-reference/openapi.json get /api/v1/dev/records/{recordId} # Get a style preset by ID Source: https://docs.autype.com/api-reference/developer-api/get-a-style-preset-by-id /api-reference/openapi.json get /api/v1/dev/styles/{styleId} # Get bulk render job status Source: https://docs.autype.com/api-reference/developer-api/get-bulk-render-job-status /api-reference/openapi.json get /api/v1/dev/bulk-render/{bulkJobId} Poll for bulk render job status. When completed, includes a download URL for the ZIP file. # Get document Source: https://docs.autype.com/api-reference/developer-api/get-document /api-reference/openapi.json get /api/v1/dev/documents/{documentId} Get a document by ID including its latest content (JSON snapshot). Only documents in PUBLIC projects belonging to the organization are accessible. # Get document as Extended Markdown Source: https://docs.autype.com/api-reference/developer-api/get-document-as-extended-markdown /api-reference/openapi.json get /api/v1/dev/documents/{documentId}/markdown Read a persistent document as Extended Markdown plus compact JSON metadata. This is the preferred read format for MCP and AI agents. Use `GET /documents/{id}` when a client needs the full JSON snapshot. # Get document variables Source: https://docs.autype.com/api-reference/developer-api/get-document-variables /api-reference/openapi.json get /api/v1/dev/documents/{documentId}/variables Get the variable definitions for a document. Use this to understand what variables are required for bulk rendering. # Get file details Source: https://docs.autype.com/api-reference/developer-api/get-file-details /api-reference/openapi.json get /api/v1/dev/tools/files/{fileId} Get metadata for a specific tool file. # Get job status Source: https://docs.autype.com/api-reference/developer-api/get-job-status /api-reference/openapi.json get /api/v1/dev/tools/jobs/{jobId} Get the current status of a tool job. Poll this endpoint until status is COMPLETED or FAILED. # Get one template as Extended Markdown Source: https://docs.autype.com/api-reference/developer-api/get-one-template-as-extended-markdown /api-reference/openapi.json get /api/v1/dev/templates/{templateId}/markdown Returns an organization-owned template or an active built-in catalog template with Markdown content plus the original JSON config. The response explicitly marks whether productive filling is permitted. # Get PDF form fields Source: https://docs.autype.com/api-reference/developer-api/get-pdf-form-fields /api-reference/openapi.json post /api/v1/dev/tools/pdf/form-fields Extract form field names, types, and current values from a PDF. Result is returned in the job metadata — no output file is created. # Get PDF metadata Source: https://docs.autype.com/api-reference/developer-api/get-pdf-metadata /api-reference/openapi.json post /api/v1/dev/tools/pdf/metadata Extract metadata from a PDF (page count, title, author, etc.). Result is returned in the job metadata field — no output file is created. # Get render job status Source: https://docs.autype.com/api-reference/developer-api/get-render-job-status /api-reference/openapi.json get /api/v1/dev/render/{jobId} Poll for render job status. When completed, includes a download URL. # Inspect document variables before creating or updating a saved record Source: https://docs.autype.com/api-reference/developer-api/inspect-document-variables-before-creating-or-updating-a-saved-record /api-reference/openapi.json post /api/v1/dev/documents/{documentId}/records/prepare # Keep or remove PDF pages Source: https://docs.autype.com/api-reference/developer-api/keep-or-remove-pdf-pages /api-reference/openapi.json post /api/v1/dev/tools/pdf/pages Keep or remove specific pages from a PDF. Use page specs like "1", "2-5", "3-". # Lens OCR Source: https://docs.autype.com/api-reference/developer-api/lens-ocr /api-reference/openapi.json post /api/v1/dev/tools/lens/ocr Extract text from a document using AI. Supports PDF, DOCX, ODT, and Markdown files. Output formats: "md" (raw standard markdown, 2 credits per page), "mdd" (Autype extended markdown, 18 credits per page), and "json" (full Autype document JSON, 18 credits per page). For PDF files with "md" format you can optionally specify which pages to process. # List compact template summaries Source: https://docs.autype.com/api-reference/developer-api/list-compact-template-summaries /api-reference/openapi.json get /api/v1/dev/templates Defaults to templates owned by the API-key organization for productive filling and export. Pass scope=catalog only to browse built-in system templates as inspiration. The two sets are never mixed in one response. # List documents Source: https://docs.autype.com/api-reference/developer-api/list-documents /api-reference/openapi.json get /api/v1/dev/documents List all documents for the organization. Optionally filter by project ID. Results are paginated and sorted by last updated date (newest first). # List files Source: https://docs.autype.com/api-reference/developer-api/list-files /api-reference/openapi.json get /api/v1/dev/tools/files List all non-expired tool files for the organization. # List jobs Source: https://docs.autype.com/api-reference/developer-api/list-jobs /api-reference/openapi.json get /api/v1/dev/tools/jobs List tool jobs for the organization, ordered by creation date (newest first). # List organization reusable blocks Source: https://docs.autype.com/api-reference/developer-api/list-organization-reusable-blocks /api-reference/openapi.json get /api/v1/dev/reusable-blocks Returns reusable document blocks. Use their markdown for AI workflows or insert them as snapshot/reference blocks. # List projects Source: https://docs.autype.com/api-reference/developer-api/list-projects /api-reference/openapi.json get /api/v1/dev/projects List all projects for the organization. Results are paginated and sorted by creation date (oldest first). # List render jobs Source: https://docs.autype.com/api-reference/developer-api/list-render-jobs /api-reference/openapi.json get /api/v1/dev/render List all render jobs for the organization. Jobs are retained for 1 hour after completion (DOCX/ODT) or until cleanup (PDF keeps last 5 per document). # List reusable workspace and system styles Source: https://docs.autype.com/api-reference/developer-api/list-reusable-workspace-and-system-styles /api-reference/openapi.json get /api/v1/dev/styles Returns reusable workspace styles and immutable built-in system style templates. Every item includes an explicit source; use source=workspace or source=system to avoid mixing them. # List saved records for a document Source: https://docs.autype.com/api-reference/developer-api/list-saved-records-for-a-document /api-reference/openapi.json get /api/v1/dev/documents/{documentId}/records # List templates as Extended Markdown (legacy) Source: https://docs.autype.com/api-reference/developer-api/list-templates-as-extended-markdown-legacy /api-reference/openapi.json get /api/v1/dev/templates/markdown Legacy bulk response retained for API compatibility. New AI and MCP clients should use GET /dev/templates and fetch one selected template through /:templateId/markdown. # List temporary images Source: https://docs.autype.com/api-reference/developer-api/list-temporary-images /api-reference/openapi.json get /api/v1/dev/images List all non-expired temporary images for the organization. # Merge PDFs Source: https://docs.autype.com/api-reference/developer-api/merge-pdfs /api-reference/openapi.json post /api/v1/dev/tools/pdf/merge Merge 2–20 PDF files into a single PDF. Pages are concatenated in the order of the provided file IDs. # PDF to image Source: https://docs.autype.com/api-reference/developer-api/pdf-to-image /api-reference/openapi.json post /api/v1/dev/tools/pdf/toimage Convert PDF pages to images (PNG or JPEG). Single-page output is a direct image file, multi-page output is a ZIP archive. # Protect PDF Source: https://docs.autype.com/api-reference/developer-api/protect-pdf /api-reference/openapi.json post /api/v1/dev/tools/pdf/protect Encrypt a PDF with password protection. Provide a user password (to open) and/or an owner password (to edit). At least one is required. # Render a document from Extended Markdown as page images (temporary) Source: https://docs.autype.com/api-reference/developer-api/render-a-document-from-extended-markdown-as-page-images-temporary /api-reference/openapi.json post /api/v1/dev/render/markdown/images Submit Extended Markdown content for rendering to page images. This is the recommended image render endpoint for MCP/AI clients. The Markdown is converted to document sections, rendered to PDF internally, and converted to PNG/JPEG pages. Single-page output is a direct image; multi-page output is a ZIP archive. # Render a document from Extended Markdown (temporary) Source: https://docs.autype.com/api-reference/developer-api/render-a-document-from-extended-markdown-temporary /api-reference/openapi.json post /api/v1/dev/render/markdown Submit Extended Markdown content for rendering to PDF, DOCX, or ODT. This is a **temporary render** — the Markdown is not persisted and the render output expires. No document is created in your Autype workspace. The Markdown is converted to document sections automatically. Supports all Autype extended Markdown syntax (directives, charts, math, tables, etc.). Returns a job ID for status polling. Credits are charged on successful completion. # Render a document from JSON as page images (temporary) Source: https://docs.autype.com/api-reference/developer-api/render-a-document-from-json-as-page-images-temporary /api-reference/openapi.json post /api/v1/dev/render/images Submit a document JSON for rendering to page images. The document is rendered to PDF internally and converted with the same PDF image conversion pipeline used by PDF tools. Single-page output is a PNG/JPEG file; multi-page output is a ZIP archive. # Render a document from JSON (temporary) Source: https://docs.autype.com/api-reference/developer-api/render-a-document-from-json-temporary /api-reference/openapi.json post /api/v1/dev/render Submit a document JSON for rendering to PDF, DOCX, or ODT. This is a **temporary render** — the document JSON is not persisted and the render output expires. No document is created in your Autype workspace. Use POST /render/document/{documentId} to render a persistent document instead. Returns a job ID for status polling. Credits are charged on successful completion. # Render a persistent document Source: https://docs.autype.com/api-reference/developer-api/render-a-persistent-document /api-reference/openapi.json post /api/v1/dev/render/document/{documentId} Render a pre-existing document from your Autype workspace by its ID. The document must belong to a PUBLIC project in your organization. Uses the latest saved document content (snapshot). You can optionally override variables or output format. Images stored in the document are resolved automatically. Returns a job ID for status polling. Credits are charged on successful completion. # Render/export a saved record Source: https://docs.autype.com/api-reference/developer-api/renderexport-a-saved-record /api-reference/openapi.json post /api/v1/dev/records/{recordId}/render # Replace placeholders in DOCX/ODT Source: https://docs.autype.com/api-reference/developer-api/replace-placeholders-in-docxodt /api-reference/openapi.json post /api/v1/dev/tools/docx/replace-placeholders Replace {{placeholder}} tags in a DOCX or ODT document with provided values. Supports text, images, lists, and tables. Output format is configurable. # Rotate PDF pages Source: https://docs.autype.com/api-reference/developer-api/rotate-pdf-pages /api-reference/openapi.json post /api/v1/dev/tools/pdf/rotate Rotate specific pages of a PDF by 90, 180, or 270 degrees. # Split PDF Source: https://docs.autype.com/api-reference/developer-api/split-pdf /api-reference/openapi.json post /api/v1/dev/tools/pdf/split Split a PDF into multiple parts by page ranges. Each range produces a separate PDF. Output is a ZIP file. # Unlock PDF Source: https://docs.autype.com/api-reference/developer-api/unlock-pdf /api-reference/openapi.json post /api/v1/dev/tools/pdf/unlock Remove password protection from a PDF. Provide the password used to protect it. # Update a saved record Source: https://docs.autype.com/api-reference/developer-api/update-a-saved-record /api-reference/openapi.json patch /api/v1/dev/records/{recordId} # Update an organization reusable block Source: https://docs.autype.com/api-reference/developer-api/update-an-organization-reusable-block /api-reference/openapi.json patch /api/v1/dev/reusable-blocks/{blockId} # Update an organization style preset Source: https://docs.autype.com/api-reference/developer-api/update-an-organization-style-preset /api-reference/openapi.json patch /api/v1/dev/styles/{styleId} # Update document from Extended Markdown Source: https://docs.autype.com/api-reference/developer-api/update-document-from-extended-markdown /api-reference/openapi.json patch /api/v1/dev/documents/{documentId}/markdown Replace the latest document content from Extended Markdown while preserving omitted metadata. This is the preferred persistent edit endpoint for AI agents. Internally Autype converts the markdown back to validated JSON and stores a normal document snapshot. # Upload a file Source: https://docs.autype.com/api-reference/developer-api/upload-a-file /api-reference/openapi.json post /api/v1/dev/tools/files/upload Upload a file (PDF, DOCX, ODT, PNG, or JPEG, max 50 MB) for use with tool actions. Files expire after 60 minutes. # Upload a temporary image Source: https://docs.autype.com/api-reference/developer-api/upload-a-temporary-image /api-reference/openapi.json post /api/v1/dev/images/upload Upload an image and use the returned refPath (for example `/temp-image/{id}`) in Autype Extended Markdown or document JSON. Unused temporary images expire after 24 hours. Ad-hoc renders resolve the temporary reference directly; creating or updating a persistent document automatically promotes every referenced temporary image to protected permanent storage and rewrites the document reference. # Validate a document JSON Source: https://docs.autype.com/api-reference/developer-api/validate-a-document-json /api-reference/openapi.json post /api/v1/dev/render/validate Validate a document JSON against the Autype document schema without rendering it. No credits are charged. Returns validation errors and warnings. Use `strict=true` to also check anchors, references, citations, abbreviations, and footnotes. # Validate Extended Markdown content Source: https://docs.autype.com/api-reference/developer-api/validate-extended-markdown-content /api-reference/openapi.json post /api/v1/dev/render/validate/markdown Validate Extended Markdown content by converting it to document JSON and validating the result. No credits are charged. Returns validation errors and warnings. Use `strict=true` to also check anchors, references, citations, abbreviations, and footnotes. # Developer API Source: https://docs.autype.com/api-reference/introduction Programmatic access to Autype's document generation capabilities The Autype Developer API lets you generate PDFs, DOCX, and ODT documents at scale. Perfect for automating document workflows, batch processing, and integrating document generation into your applications. ## Base URL ``` https://api.autype.com/api/v1/dev ``` ## Key capabilities Create and manage documents that are saved in your Autype workspace — visible in the app and editable by your team. Render persistent documents or ad-hoc JSON/Markdown to PDF, DOCX, or ODT. Create up to 100 documents at once from a template with different variable sets. Use `{{ variables }}` or `${variables}` for dynamic content substitution. Browse immutable built-in styles or manage organization-owned presets, then reference either from JSON or Markdown renders via `stylePresetId`. Keep productive workspace templates separate from the browse-only built-in catalog and fetch Extended Markdown only for the selected template. Manage versioned organization content and insert it as a linked reference or editable snapshot. Save customer or case values against document versions and retain their export history. Author styled form fields that become AcroForm widgets in PDF exports. Merge, split, rotate, watermark, and extract metadata from PDFs. Import editable Word documents as validated Autype JSON, modify them, and render them back to DOCX. ## Persistent vs. temporary resources The API works with two types of resources. Understanding the difference is important: ### Persistent resources (visible in the Autype app) | Resource | Endpoints | Description | | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Projects** | `POST /projects`, `GET /projects` | Workspaces that organize documents. Created via the API as PUBLIC projects. | | **Documents** | `POST /documents/markdown`, `GET /documents/{id}/markdown`, `PATCH /documents/{id}/markdown`, `POST /documents`, `GET /documents`, `GET /documents/{id}` | Documents stored in your workspace. Markdown endpoints are recommended for AI/API authoring; JSON endpoints remain available for advanced clients. | | **Style presets** | `GET /styles`, `GET /styles/{id}`, `POST /styles`, `PATCH /styles/{id}` | Immutable built-in system styles and editable organization styles. Filter by `source=workspace`, `source=system`, or `source=all`; both can be reused through `stylePresetId`. | | **Template catalogs** | `GET /templates`, `GET /templates/{id}/markdown` | Productive organization templates use `scope=workspace`; browse-only built-in quick starts use `scope=catalog`. | | **Reusable blocks** | `GET /reusable-blocks`, `POST /reusable-blocks`, `PATCH /reusable-blocks/{id}`, `POST /reusable-blocks/{id}/versions/{version}/restore` | Versioned Extended Markdown with immutable changelogs and auditable restore shared across organization documents. | | **Records** | `GET /documents/{id}/records`, `POST /documents/{id}/records`, `POST /records/{id}/render` | Version-aware variable datasets and their render history. | | **Document images** | Auto-converted on document creation | Permanent images attached to a document (referenced as `/image/{assetId}` in document JSON). See [Images in documents](#images-in-documents). | ### Temporary resources (API-only, not visible in the app) | Resource | Endpoints | Lifetime | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | | **Temporary images** | `POST /images/upload`, `GET /images`, `DELETE /images/{id}` | 24 hours | Short-lived images for use in temporary renders. Referenced as `/temp-image/{id}` in document JSON. **Not visible in the Autype app.** | | **Render jobs** | `POST /render`, `POST /render/markdown`, `POST /render/images`, `POST /render/markdown/images`, `GET /render/{id}` | Transient | Ad-hoc PDF/DOCX/ODT or PNG/JPEG page renders from inline JSON or Markdown. The input document is not saved. **Not visible in the Autype app.** | | **Bulk render jobs** | `POST /bulk-render`, `GET /bulk-render/{id}` | Transient | Bulk render outputs. **Not visible in the Autype app.** | | **Tool files** | `POST /tools/files/upload`, `GET /tools/files`, `DELETE /tools/files/{id}` | 60 minutes | Temporary files for PDF tools (merge, split, etc.). **Not visible in the Autype app.** | | **DOCX imports** | `POST /import/docx`, `POST /import/docx/file` | Request / 24-hour images | Convert Word to validated editable Autype JSON; embedded images use protected temporary references. | | **Tool jobs** | `POST /tools/pdf/*`, `GET /tools/jobs/{id}` | Transient | PDF processing jobs (merge, split, rotate, watermark, metadata). **Not visible in the Autype app.** | Use **POST /render/document/** to render a persistent document. This uses the document's saved content and its permanent images — no temporary image uploads needed. ## Recommended AI/API workflow For AI agents and API automation, prefer **Extended Markdown plus reusable styles** when possible: 1. List styles with `GET /styles?source=workspace`, `source=system`, or `source=all`, then fetch the selected definition with `GET /styles/{id}`. 2. Create an organization style only when the built-in catalog does not fit. 3. For saved workspace documents, use `POST /documents/markdown`. 4. For ad-hoc output that should not be saved, use `POST /render/markdown`. 5. Pass the selected workspace UUID or immutable `system:` as `stylePresetId`. 6. Add inline `defaults` only for request-specific overrides. To inspect layout with a vision-capable client, use `POST /render/markdown/images`. One selected page is returned directly as PNG or JPEG; multiple pages are returned as a ZIP archive. Markdown document requests keep content readable while still accepting structured metadata: ```json theme={null} { "projectId": "project-id", "title": "Quarterly Report", "content": "# Report\n\nHello {{companyName}}.", "document": { "type": "pdf", "size": "A4" }, "stylePresetId": "system:executive-annual-report", "variables": { "companyName": "Acme GmbH" } } ``` You can read the saved document back with `GET /documents/{id}/markdown` and update it with `PATCH /documents/{id}/markdown`. The full document JSON remains supported for advanced clients, editors, and integrations that need complete structural control. `stylePresetId` is additive: existing inline `defaults` still work, and inline values override the referenced style preset. Built-in `system:` styles are immutable and can be used directly in temporary renders as well as persistent documents; organization style UUIDs remain editable. Applying a built-in style does not create a workspace preset. Customizing one creates an explicit independent copy. Template scopes are intentionally separate. Use `scope=workspace` for organization-owned templates that can drive production document generation. Use `scope=catalog` to browse built-in quick starts, then create a workspace copy before treating one as an organization template. Fetch the Extended Markdown only after selecting a template through `GET /templates/{id}/markdown`. ### Temporary render shortcut For temporary render jobs: 1. Send the document content as Extended Markdown to `POST /render/markdown`. 2. Pass the selected style as `stylePresetId`. 3. Add inline `defaults` only for request-specific overrides. ## Images in documents How you handle images depends on whether you're working with persistent or temporary resources: ### Persistent documents with images When creating a persistent document via `POST /documents`, you can embed images using the following workflow: 1. **Upload images** via `POST /images/upload` — you receive `/temp-image/{id}` reference paths. 2. **Create the document** via `POST /documents` with the `/temp-image/{id}` paths in your document JSON. 3. **Automatic conversion** — the API detects all `/temp-image/{id}` references in the document content, copies them to permanent storage, and replaces the paths with `/image/{assetId}`. The resulting document contains only permanent image references. The conversion happens transparently. The temporary images remain available for their 24-hour lifetime, but the document itself now references permanent copies that will not expire. ### Temporary renders with images For ad-hoc renders (`POST /render`, `POST /render/markdown`), use `POST /images/upload` to upload temporary images and reference them as `/temp-image/{id}` in your document JSON. These images are valid for 24 hours and are resolved at render time. ### External URLs You can also use full `https://` URLs for images in any context — both persistent documents and temporary renders. External URLs are fetched at render time. ## Credit costs Operations consume credits from your organization's balance. Credits are only charged on successful completion. | Operation | Credit Cost | | ---------------------- | ----------------- | | Temporary Image Upload | Free | | Single Render | 1 credit | | Bulk Render | 1 credit per item | | Tool File Upload | Free | | Tool PDF Action | 1 credit | ## Quick example Render a persistent document: ```bash theme={null} curl -X POST "https://api.autype.com/api/v1/dev/render/document/YOUR_DOCUMENT_ID" \ -H "X-API-Key: ak_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "variables": { "clientName": "Acme Inc" } }' ``` Or render from inline JSON (temporary, not saved): ```bash theme={null} curl -X POST "https://api.autype.com/api/v1/dev/render" \ -H "X-API-Key: ak_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "config": { "document": { "type": "pdf", "size": "A4" }, "variables": { "name": "World" }, "sections": [{ "id": "main", "type": "flow", "content": [ { "type": "h1", "text": "Hello, {{name}}!" } ] }] } }' ``` ## Next steps Learn how to authenticate your API requests. Understand usage limits and quotas. Download the full OpenAPI 3.0 spec as JSON — for code generation, Postman import, or AI context. # Abbreviations Source: https://docs.autype.com/api-reference/json-syntax/abbreviations Define abbreviation short forms and generate automatic abbreviation lists Abbreviations let you define short forms (e.g., "API") and their full text (e.g., "Application Programming Interface"). They can be automatically collected into a List of Abbreviations in your document. ## Defining abbreviations The top-level `abbreviations` object is a key-value map where each key is the short form and the value is the full text. ```json theme={null} { "abbreviations": { "API": "Application Programming Interface", "HTML": "Hypertext Markup Language", "CSS": "Cascading Style Sheets", "R&D": "Research and Development", "REST": "Representational State Transfer" } } ``` ### Key format Abbreviation keys (short forms) must: * Start with a letter (including Unicode letters like `Ä`, `ö`, `Ü`) * Contain only letters, digits, spaces, and the characters `& _ - . , ( ) / ' "` * Be 1–20 characters long ### Value format | Property | Type | Constraints | | --------- | ------ | ------------------------------------------------ | | *(value)* | string | Full text of the abbreviation. 1–200 characters. | ## Using abbreviations in sections To mark an abbreviation in your text content, wrap the abbreviation key with tildes: `~ABK~`. The abbreviation must be defined in the top-level `abbreviations` object. ```json theme={null} { "sections": [{ "type": "flow", "content": [ { "type": "text", "text": "The ~API~ uses ~JSON~ over ~HTTP~ for all requests." }, { "type": "text", "text": "Our ~REST~ endpoints follow standard conventions." } ] }] } ``` When rendered, `~API~` will display the abbreviation with a tooltip or annotation showing the full text "Application Programming Interface" (depending on the output format). The `~ABK~` syntax works in all text content within sections: headings, paragraphs (`text`, `text2`), list items, and table cells. When using `?strict=true` on the render endpoint, any `~ABK~` reference to an abbreviation that is **not defined** in the `abbreviations` object will cause a validation error. Without strict mode, undefined abbreviations produce warnings but do not block rendering. ## List of Abbreviations element To render an automatic list of all defined abbreviations, add a `listOfAbbreviations` element to a section: ```json theme={null} { "type": "listOfAbbreviations", "title": "List of Abbreviations", "sortOrder": "alphabetical", "fontFamily": "Arial", "fontSize": 18 } ``` ### Properties | Property | Type | Required | Default | Description | | ------------ | ------ | -------- | ---------------- | ----------------------------------------------------------------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"listOfAbbreviations"` | | `id` | string | No | — | Optional unique identifier. Max: 100 chars. | | `title` | string | No | — | Title displayed above the list (e.g., `"List of Abbreviations"`). Max: 200 chars. | | `sortOrder` | string | No | `"alphabetical"` | Sort order: `"alphabetical"` (by abbreviation key) or `"document"` (order of first appearance in document). | | `fontFamily` | string | No | — | Font family for the title. Max: 100 chars. | | `fontSize` | number | No | — | Font size for the title in pt (6–72). | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | ## Defaults for abbreviations You can customize the appearance of the abbreviation list globally via `defaults.styles.listOfAbbreviations`: ```json theme={null} { "defaults": { "styles": { "listOfAbbreviations": { "fontFamily": "Arial", "fontSize": 11, "fontWeight": "normal", "color": "#333333", "sortOrder": "alphabetical", "separator": " - " } } } } ``` ### List of Abbreviations style properties | Property | Type | Default | Description | | ------------ | ------ | ---------------- | --------------------------------------------------------------------------------------------- | | `fontFamily` | string | — | Font family for list entries. Max: 100 chars. | | `fontSize` | number | — | Font size in pt (6–72). | | `fontWeight` | string | — | Font weight: `"normal"` or `"bold"` | | `color` | string | — | Text color in hex format (`#RGB` or `#RRGGBB`). | | `sortOrder` | string | `"alphabetical"` | Default sort order: `"alphabetical"` or `"appearance"` (order of first use). | | `separator` | string | `" - "` | Separator between abbreviation and full text (e.g., `" - "`, `": "`, `" = "`). Max: 10 chars. | ## Complete example ```json theme={null} { "document": { "type": "pdf", "size": "A4" }, "abbreviations": { "API": "Application Programming Interface", "REST": "Representational State Transfer", "JSON": "JavaScript Object Notation", "HTTP": "Hypertext Transfer Protocol" }, "defaults": { "styles": { "listOfAbbreviations": { "fontSize": 10, "separator": ": ", "sortOrder": "alphabetical" } } }, "sections": [ { "type": "flow", "content": [ { "type": "listOfAbbreviations", "title": "Abbreviations" }, { "type": "pageBreak" }, { "type": "h1", "text": "Introduction" }, { "type": "text", "text": "This document describes a ~REST~ ~API~ that uses ~JSON~ over ~HTTP~ for all communication." }, { "type": "text", "text": "The ~API~ supports multiple output formats including PDF and DOCX." } ] } ] } ``` # Citations Source: https://docs.autype.com/api-reference/json-syntax/citations CSL-JSON citations and automatic bibliography generation Citations allow you to reference sources in your document and automatically generate a formatted bibliography. Autype uses the [CSL-JSON](https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html) standard for citation data. ## Defining citations The top-level `citations` array contains citation entries in CSL-JSON format. Each entry represents a single source (book, article, webpage, etc.). ```json theme={null} { "citations": [ { "id": "smith2023", "type": "book", "title": "Modern Document Automation", "author": [ { "family": "Smith", "given": "John" } ], "issued": { "date-parts": [[2023]] }, "publisher": "Tech Press", "publisher-place": "New York" }, { "id": "doe2024", "type": "article-journal", "title": "Advances in PDF Generation", "author": [ { "family": "Doe", "given": "Jane" }, { "family": "Miller", "given": "Bob" } ], "issued": { "date-parts": [[2024, 3]] }, "container-title": "Journal of Document Engineering", "volume": "12", "issue": "3", "page": "45-67", "DOI": "10.1234/jde.2024.001" } ] } ``` The `citations` array supports up to 1000 entries. ## CSL-JSON item properties Every citation entry requires `id` and `type`. All other fields are optional. ### Required fields | Property | Type | Description | | -------- | ------ | ----------------------------------------------------------------------------------------------------------------- | | `id` | string | Unique identifier for the citation (e.g., `"smith2023"`). Used to reference the citation in text. Max: 100 chars. | | `type` | string | Item type. See [supported types](#supported-item-types) below. | ### Names (authors, editors, etc.) Name fields accept an array of name objects: ```json theme={null} { "author": [ { "family": "Smith", "given": "John" }, { "family": "van Beethoven", "given": "Ludwig", "non-dropping-particle": "van" }, { "literal": "World Health Organization" } ] } ``` | Property | Type | Description | | ----------------------- | ------ | ------------------------------------------------------------------------- | | `family` | string | Family name / surname. Max: 200 chars. | | `given` | string | Given name / first name. Max: 200 chars. | | `dropping-particle` | string | Particle dropped when sorting (e.g., "de" in some styles). Max: 50 chars. | | `non-dropping-particle` | string | Particle kept when sorting (e.g., "van"). Max: 50 chars. | | `suffix` | string | Name suffix (e.g., "Jr.", "III"). Max: 50 chars. | | `literal` | string | Literal name string for institutional authors. Max: 500 chars. | **Available name fields:** `author`, `editor`, `translator`, `collection-editor`, `composer`, `container-author`, `director`, `editorial-director`, `illustrator`, `interviewer`, `original-author`, `recipient`, `reviewed-author` ### Dates Date fields use the CSL-JSON date format: ```json theme={null} { "issued": { "date-parts": [[2024, 3, 15]] }, "accessed": { "date-parts": [[2024, 6, 1]] } } ``` | Property | Type | Description | | ------------ | ----------------- | ------------------------------------------------------------------------- | | `date-parts` | array | Array of date arrays: `[[year, month, day]]`. Month and day are optional. | | `literal` | string | Literal date string (e.g., `"Spring 2024"`). Max: 200 chars. | | `raw` | string | Raw date string for parsing. Max: 200 chars. | | `season` | string \| number | Season identifier. | | `circa` | boolean \| string | Approximate date flag. | **Available date fields:** `issued`, `accessed`, `event-date`, `original-date`, `submitted` ### Titles | Property | Type | Description | | ----------------------- | ------ | ------------------------------------------------------------- | | `title` | string | Title of the work. Max: 1000 chars. | | `title-short` | string | Short title. Max: 500 chars. | | `container-title` | string | Title of the container (journal, book, etc.). Max: 500 chars. | | `container-title-short` | string | Short container title. Max: 200 chars. | | `collection-title` | string | Title of the collection/series. Max: 500 chars. | | `original-title` | string | Original title (for translations). Max: 500 chars. | | `reviewed-title` | string | Title of the reviewed work. Max: 500 chars. | ### Numbers | Property | Type | Description | | ----------------- | ---------------- | --------------------------------------------- | | `volume` | string \| number | Volume number. | | `issue` | string \| number | Issue number. | | `page` | string | Page range (e.g., `"45-67"`). Max: 100 chars. | | `page-first` | string \| number | First page. | | `number-of-pages` | string \| number | Total pages. | | `edition` | string \| number | Edition number. | | `version` | string \| number | Version number. | | `chapter-number` | string \| number | Chapter number. | ### Identifiers | Property | Type | Description | | -------- | ------ | ---------------------------------------------------- | | `DOI` | string | Digital Object Identifier. Max: 200 chars. | | `ISBN` | string | International Standard Book Number. Max: 50 chars. | | `ISSN` | string | International Standard Serial Number. Max: 50 chars. | | `PMID` | string | PubMed ID. Max: 50 chars. | | `PMCID` | string | PubMed Central ID. Max: 50 chars. | | `URL` | string | Web URL. Max: 2000 chars. | ### Publisher | Property | Type | Description | | ----------------- | ------ | ------------------------------------- | | `publisher` | string | Publisher name. Max: 500 chars. | | `publisher-place` | string | Place of publication. Max: 200 chars. | ### Other fields | Property | Type | Description | | ------------- | ------ | --------------------------------------------------- | | `abstract` | string | Abstract text. Max: 5000 chars. | | `language` | string | Language of the work. Max: 50 chars. | | `genre` | string | Genre or type description. Max: 200 chars. | | `keyword` | string | Keywords. Max: 500 chars. | | `note` | string | Additional notes. Max: 2000 chars. | | `event` | string | Event name (for conference papers). Max: 500 chars. | | `event-place` | string | Event location. Max: 200 chars. | ## Supported item types `article`, `article-journal`, `article-magazine`, `article-newspaper`, `bill`, `book`, `broadcast`, `chapter`, `classic`, `collection`, `dataset`, `document`, `entry`, `entry-dictionary`, `entry-encyclopedia`, `event`, `figure`, `graphic`, `hearing`, `interview`, `legal_case`, `legislation`, `manuscript`, `map`, `motion_picture`, `musical_score`, `pamphlet`, `paper-conference`, `patent`, `performance`, `periodical`, `personal_communication`, `post`, `post-weblog`, `regulation`, `report`, `review`, `review-book`, `software`, `song`, `speech`, `standard`, `thesis`, `treaty`, `webpage` ## Using citations in sections To cite a source in your text content, use the `@[citeKey]` syntax where `citeKey` matches the `id` of a citation entry. ### Basic citation ```json theme={null} { "type": "text", "text": "Document automation is evolving rapidly @[smith2023]." } ``` The `@[citeKey]` reference is replaced with the formatted in-text citation according to the configured `citationStyle` (e.g., `(Smith, 2023)` for APA7, `[1]` for IEEE). ### Citation with locators Add a locator after the cite key, separated by a comma: ```json theme={null} { "type": "text", "text": "See @[smith2023, p. 42] for details." } { "type": "text", "text": "Discussed in @[doe2024, pp. 10-15]." } { "type": "text", "text": "See @[smith2023, ch. 3] and @[doe2024, sec. 2.1]." } { "type": "text", "text": "In @[smith2023, vol. 2, p. 42, note=\"emphasis added\"]." } ``` | Locator | Syntax | Example | | ------- | ---------------------------- | ------------------------------------- | | Page | `p. 42` or `page 42` | `@[smith2023, p. 42]` | | Pages | `pp. 42-45` or `pages 42-45` | `@[smith2023, pp. 42-45]` | | Chapter | `ch. 3` or `chapter 3` | `@[smith2023, ch. 3]` | | Section | `sec. 2.1` or `section 2.1` | `@[smith2023, sec. 2.1]` | | Volume | `vol. 2` or `volume 2` | `@[smith2023, vol. 2]` | | Note | `note="text"` | `@[smith2023, note="emphasis added"]` | Multiple locators can be combined: `@[smith2023, vol. 2, p. 42]` ### Suppress author / author only | Syntax | Description | Rendered (APA7) | | --------------- | ---------------------------- | --------------- | | `@[smith2023]` | Normal citation | (Smith, 2023) | | `@[-smith2023]` | Suppress author (prefix `-`) | (2023) | | `@[smith2023!]` | Author only (suffix `!`) | Smith | ```json theme={null} { "type": "text", "text": "@[smith2023!] argues that automation is key @[-smith2023, p. 42]." } ``` This renders as: "Smith argues that automation is key (2023, p. 42)." ### Multiple citations Place multiple `@[...]` references next to each other: ```json theme={null} { "type": "text", "text": "Multiple sources support this claim @[smith2023] @[doe2024]." } ``` The `@[citeKey]` syntax works in all text content: headings, paragraphs (`text`, `text2`), list items, and table cells. It also works inside formatted text like `**bold @[smith2023] text**`. When using `?strict=true` on the render endpoint, any `@[citeKey]` reference to a citation that is **not defined** in the `citations` array will cause a validation error. Without strict mode, undefined citations produce warnings but do not block rendering. ## Citation styles The citation formatting style is configured via `defaults.citationStyle`: ```json theme={null} { "defaults": { "citationStyle": "apa7" } } ``` | Style | In-text format | Description | | ----------- | ---------------- | ------------------------ | | `apa7` | (Smith, 2023) | APA 7th Edition | | `harvard` | (Smith 2023) | Harvard style | | `ieee` | \[1] | IEEE numbered style | | `chicago` | (Smith 2023, 42) | Chicago author-date | | `mla` | (Smith 42) | MLA style | | `vancouver` | (1) | Vancouver numbered style | ## Bibliography element To render the formatted bibliography, add a `bibliography` element to a section: ```json theme={null} { "type": "bibliography", "title": "References", "fontFamily": "Times New Roman", "fontSize": 18 } ``` ### Properties | Property | Type | Required | Default | Description | | ------------ | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------ | | `type` | string | **Yes** | — | Must be `"bibliography"` | | `id` | string | No | — | Optional unique identifier. Max: 100 chars. | | `title` | string | No | — | Title displayed above the bibliography (e.g., `"References"`, `"Bibliography"`). Max: 200 chars. | | `fontFamily` | string | No | — | Font family for the title. Max: 100 chars. | | `fontSize` | number | No | — | Font size for the title in pt (6–72). | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | ## Defaults for citations ### Bibliography style Customize the bibliography appearance via `defaults.styles.bibliography`: ```json theme={null} { "defaults": { "citationStyle": "apa7", "styles": { "bibliography": { "fontFamily": "Times New Roman", "fontSize": 11, "fontWeight": "normal", "color": "#000000", "hangingIndent": 1.27, "lineSpacing": 1.5, "entrySpacing": 6 } } } } ``` | Property | Type | Default | Description | | --------------- | ------ | ------- | ----------------------------------------------------- | | `fontFamily` | string | — | Font family for bibliography entries. Max: 100 chars. | | `fontSize` | number | — | Font size in pt (6–72). | | `fontWeight` | string | — | Font weight: `"normal"` or `"bold"` | | `color` | string | — | Text color in hex format (`#RGB` or `#RRGGBB`). | | `hangingIndent` | number | — | Hanging indent for entries in cm (0–5). | | `lineSpacing` | number | — | Line spacing within entries (1–3). | | `entrySpacing` | number | — | Space between entries in pt (0–50). | ## Complete example ```json theme={null} { "document": { "type": "pdf", "size": "A4" }, "citations": [ { "id": "smith2023", "type": "book", "title": "Modern Document Automation", "author": [{ "family": "Smith", "given": "John" }], "issued": { "date-parts": [[2023]] }, "publisher": "Tech Press" }, { "id": "doe2024", "type": "article-journal", "title": "Advances in PDF Generation", "author": [{ "family": "Doe", "given": "Jane" }], "issued": { "date-parts": [[2024, 3]] }, "container-title": "Journal of Document Engineering", "volume": "12", "page": "45-67" } ], "defaults": { "citationStyle": "apa7", "styles": { "bibliography": { "fontSize": 10, "hangingIndent": 1.27 } } }, "sections": [ { "type": "flow", "content": [ { "type": "h1", "text": "Introduction" }, { "type": "text", "text": "@[smith2023!] describes how document automation is evolving rapidly @[-smith2023]. Recent advances in PDF generation @[doe2024, pp. 50-67] have made it possible to produce high-quality documents at scale." }, { "type": "text", "text": "Both approaches @[smith2023] @[doe2024] demonstrate significant improvements over traditional methods." }, { "type": "pageBreak" }, { "type": "bibliography", "title": "References" } ] } ] } ``` # Defaults Source: https://docs.autype.com/api-reference/json-syntax/defaults Global styling defaults: fonts, colors, spacing, element styles, header/footer, and more The `defaults` object controls the global styling and formatting of your document. All properties are optional — elements without explicit styling inherit from these defaults. ## Top-level defaults ```json theme={null} { "defaults": { "fontFamily": "Arial", "fontSize": 12, "color": "#000000", "lineHeight": 1.15, "headingNumbering": "1.1.1", "citationStyle": "apa7", "spacing": { ... }, "styles": { ... }, "chart": { ... }, "header": { ... }, "footer": { ... } } } ``` | Property | Type | Default | Description | | ------------------ | ------ | ------- | ------------------------------------------------------------------------------------------------- | | `fontFamily` | string | — | Default font family name. Max: 100 chars. | | `fontSize` | number | — | Default font size in pt (6–72). | | `color` | string | — | Default text color in hex (`#RGB` or `#RRGGBB`). | | `lineHeight` | number | — | Default line height multiplier (0.5–3). | | `headingNumbering` | string | — | Heading numbering format string. See [Heading numbering](#heading-numbering). Max: 20 chars. | | `citationStyle` | string | — | Citation formatting style. See [Citations](/api-reference/json-syntax/citations#citation-styles). | | `spacing` | object | — | Global spacing defaults per element type. See [Spacing](#spacing). | | `styles` | object | — | Default styles for specific element types. See [Element styles](#element-styles). | | `chart` | object | — | Default chart color palette. See [Chart defaults](#chart-defaults). | | `header` | object | — | Global page header. See [Header & Footer](#header--footer). | | `footer` | object | — | Global page footer. See [Header & Footer](#header--footer). | For master pages, first/odd/even variants, mirrored margins, page backgrounds, repeating design objects, and multi-row headers/footers, see [Document Styling](/api-reference/json-syntax/document-styling). The legacy three-slot header/footer contract below remains supported. ## Heading numbering The `headingNumbering` format string defines automatic numbering for headings. Each character represents the numbering style for one heading level, separated by dots. ```json theme={null} { "headingNumbering": "1.1.a" } ``` This produces: `1` → `1.1` → `1.1.a` for h1 → h2 → h3. | Character | Style | Example | | --------- | --------------- | ----------- | | `1` | Numeric | 1, 2, 3… | | `a` | Lowercase alpha | a, b, c… | | `A` | Uppercase alpha | A, B, C… | | `i` | Lowercase roman | i, ii, iii… | | `I` | Uppercase roman | I, II, III… | | `α` | Greek lowercase | α, β, γ… | Set to an empty string or omit to disable heading numbering. ## Spacing The `spacing` object defines default spacing (in pt) before and after each element type. Individual elements can override these via their own `spacing` property. ```json theme={null} { "defaults": { "spacing": { "before": { "h1": 24, "h2": 18, "h3": 14, "text": 0, "table": 12, "list": 8, "image": 12, "code": 12, "math": 8, "blockquote": 8, "formField": 8 }, "after": { "h1": 12, "h2": 8, "h3": 6, "text": 6, "table": 12, "list": 8, "image": 12, "code": 12, "math": 8, "blockquote": 8, "formField": 8 } } } } ``` ### Supported element types for spacing Both `before` and `after` accept the same set of keys: | Key | Applies to | | ------------ | ---------------------------------- | | `h1` – `h6` | Heading levels 1–6 | | `text` | Normal paragraphs (`type: "text"`) | | `text2` | Secondary text (`type: "text2"`) | | `table` | Table elements | | `list` | List elements | | `image` | Image elements | | `qrcode` | QR code elements | | `chart` | Chart elements | | `code` | Code block elements | | `math` | Math (LaTeX) elements | | `blockquote` | Block quote elements | | `formField` | Form field elements | All values are in pt, range 0–100. ### Per-element spacing override Any element with a `spacing` property can override the global defaults: ```json theme={null} { "type": "h1", "text": "Title", "spacing": { "before": 0, "after": 24 } } ``` | Property | Type | Description | | -------- | ------ | ------------------------------------ | | `before` | number | Spacing before element in pt (0–100) | | `after` | number | Spacing after element in pt (0–100) | ## Element styles The `styles` object defines default styling for specific element types. These are applied when an element does not specify its own styling. ```json theme={null} { "defaults": { "styles": { "h1": { "fontSize": 24, "fontWeight": "bold", "color": "#111111" }, "h2": { "fontSize": 18, "fontWeight": "bold" }, "h3": { "fontSize": 14, "fontWeight": "bold" }, "text": { "fontSize": 11, "align": "justify" }, "text2": { "fontSize": 9, "color": "#666666" }, "table": { ... }, "math": { ... }, "code": { ... }, "blockquote": { ... }, "formField": { ... }, "figureCaption": { ... }, "tableCaption": { ... }, "refLink": { ... }, "listOfAbbreviations": { ... }, "bibliography": { ... } } } } ``` ### Text style (h1–h6, text, text2) Used for `styles.h1` through `styles.h6`, `styles.text`, and `styles.text2`. | Property | Type | Description | | ----------------- | ------- | ------------------------------------------------------- | | `fontFamily` | string | Font family. Max: 100 chars. | | `fontSize` | number | Font size in pt (6–72). | | `fontWeight` | string | `"normal"` or `"bold"` | | `color` | string | Text color in hex (`#RGB` or `#RRGGBB`). | | `align` | string | Alignment: `"left"`, `"center"`, `"right"`, `"justify"` | | `pageBreakBefore` | boolean | Force a page break before this element type. | ### Math style Used for `styles.math`. | Property | Type | Description | | --------------- | ------- | ---------------------------------------------- | | `fontFamily` | string | Font family. Max: 100 chars. | | `fontSize` | number | Font size in pt (6–72). | | `fontWeight` | string | `"normal"` or `"bold"` | | `color` | string | Text color in hex. | | `align` | string | Alignment: `"left"`, `"center"`, `"right"` | | `renderAsImage` | boolean | Render math as image for better compatibility. | ### Code style Used for `styles.code`. | Property | Type | Description | | ----------------- | ------- | ------------------------------------------------------------ | | `fontFamily` | string | Font family. Max: 100 chars. | | `fontSize` | number | Font size in pt (6–72). | | `backgroundColor` | string | Background color in hex (`#RGB`, `#RRGGBB`, or `#RRGGBBAA`). | | `align` | string | Alignment: `"left"`, `"center"`, `"right"` | | `renderAsImage` | boolean | Render code block as image via internal render API. | ### Form field style Used for `styles.formField`. Local `style` properties on a form field override these defaults. | Property | Type | Description | | --------------------- | ------- | ------------------------------------------------- | | `borderMode` | string | `"outline"`, `"underline"`, or `"none"` | | `borderLineStyle` | string | `"solid"`, `"dashed"`, or `"dotted"` | | `borderWidth` | number | Border width in pt (`0`-`10`) | | `borderColor` | string | Border color in hex | | `backgroundColor` | string | Field background in hex, including optional alpha | | `textColor` | string | Input text color in hex | | `fontSize` | number | Input text size in pt (`6`-`72`) | | `inset` | number | Inner padding (`0`-`50`) | | `borderRadius` | number | Corner radius (`0`-`30`) | | `showHints` | boolean | Show editor hints for form fields | | `showContainerBorder` | boolean | Show the visual editor block container | | `checkboxBorderMode` | string | Independent checkbox border mode | | `checkboxShape` | string | `"square"` or `"circle"` | ```json theme={null} { "defaults": { "styles": { "formField": { "borderMode": "underline", "borderWidth": 1, "borderColor": "#64748B", "backgroundColor": "#FFFFFF00", "textColor": "#111827", "inset": 6, "borderRadius": 4, "checkboxShape": "square" } } } } ``` ### Table style Used for `styles.table`. Controls borders, header row, data rows, and cell padding. ```json theme={null} { "defaults": { "styles": { "table": { "borders": { "outer": { "width": 1, "color": "#000000", "style": "solid" }, "inner": { "width": 0.5, "color": "#CCCCCC", "style": "solid" } }, "header": { "backgroundColor": "#F0F0F0", "color": "#000000", "fontSize": 11, "fontWeight": "bold", "align": "left" }, "rows": { "backgroundColor": "#FFFFFF", "alternateBackgroundColor": "#F9F9F9", "color": "#333333", "fontSize": 10 }, "cellPadding": { "top": 4, "right": 6, "bottom": 4, "left": 6 } } } } } ``` **borders.outer / borders.inner** | Property | Type | Description | | -------- | ------ | ------------------------------------ | | `width` | number | Border width in pt (0–10). | | `color` | string | Border color in hex. | | `style` | string | `"solid"`, `"dashed"`, or `"dotted"` | **header** | Property | Type | Description | | ----------------- | ------ | ---------------------------------- | | `backgroundColor` | string | Header background color in hex. | | `color` | string | Header text color in hex. | | `fontSize` | number | Header font size in pt (6–72). | | `fontWeight` | string | `"normal"` or `"bold"` | | `fontStyle` | string | `"normal"` or `"italic"` | | `align` | string | `"left"`, `"center"`, or `"right"` | **rows** | Property | Type | Description | | -------------------------- | ------ | -------------------------------------------------- | | `backgroundColor` | string | Row background color in hex. | | `alternateBackgroundColor` | string | Alternate row background color for striped tables. | | `color` | string | Row text color in hex. | | `fontSize` | number | Row font size in pt (6–72). | | `fontWeight` | string | `"normal"` or `"bold"` | | `fontStyle` | string | `"normal"` or `"italic"` | | `align` | string | `"left"`, `"center"`, or `"right"` | **cellPadding** | Property | Type | Description | | -------- | ------ | ---------------------------- | | `top` | number | Top padding in pt (0–50). | | `right` | number | Right padding in pt (0–50). | | `bottom` | number | Bottom padding in pt (0–50). | | `left` | number | Left padding in pt (0–50). | ### Figure caption style Used for `styles.figureCaption`. Controls captions on images and charts. | Property | Type | Default | Description | | --------------- | ------- | ---------- | -------------------------------------------------------------------------------- | | `disable` | boolean | `false` | Disable figure captions globally. | | `fontFamily` | string | — | Font family. Max: 100 chars. | | `fontSize` | number | — | Font size in pt (6–72). | | `fontWeight` | string | — | `"normal"` or `"bold"` | | `fontStyle` | string | `"italic"` | `"normal"` or `"italic"` | | `color` | string | — | Text color in hex. | | `align` | string | `"center"` | `"left"`, `"center"`, or `"right"` | | `prefix` | string | `"Figure"` | Prefix for auto-numbering (e.g., `"Figure"`, `"Abb."`, `"Fig."`). Max: 50 chars. | | `spacingBefore` | number | `4` | Spacing between image/chart and caption in pt (0–50). | ### Table caption style Used for `styles.tableCaption`. Controls captions on tables. | Property | Type | Default | Description | | -------------- | ------- | ---------- | ---------------------------------------------------------------------------------- | | `disable` | boolean | `false` | Disable table captions globally. | | `fontFamily` | string | — | Font family. Max: 100 chars. | | `fontSize` | number | — | Font size in pt (6–72). | | `fontWeight` | string | — | `"normal"` or `"bold"` | | `fontStyle` | string | `"italic"` | `"normal"` or `"italic"` | | `color` | string | — | Text color in hex. | | `align` | string | `"center"` | `"left"`, `"center"`, or `"right"` | | `prefix` | string | `"Table"` | Prefix for auto-numbering (e.g., `"Table"`, `"Tabelle"`, `"Tab."`). Max: 50 chars. | | `spacingAfter` | number | `4` | Spacing after caption (before table) in pt (0–50). | ### Reference link style Used for `styles.refLink`. Controls the appearance of internal reference links (cross-references to headings, figures, tables). | Property | Type | Default | Description | | ----------- | ------- | --------- | ------------------ | | `bold` | boolean | — | Bold text. | | `italic` | boolean | — | Italic text. | | `underline` | boolean | `true` | Underline text. | | `color` | string | `#0000FF` | Link color in hex. | ### List of Abbreviations style Used for `styles.listOfAbbreviations`. See [Abbreviations — Defaults](/api-reference/json-syntax/abbreviations#defaults-for-abbreviations). ### Bibliography style Used for `styles.bibliography`. See [Citations — Defaults](/api-reference/json-syntax/citations#defaults-for-citations). ## Chart defaults Default color palette for chart datasets. ```json theme={null} { "defaults": { "chart": { "colors": ["#4BC0C0", "#FF6384", "#36A2EB", "#FFCE56", "#9966FF"], "borderColors": ["#4BC0C0", "#FF6384", "#36A2EB", "#FFCE56", "#9966FF"] } } } ``` | Property | Type | Description | | -------------- | --------- | ---------------------------------------------- | | `colors` | string\[] | Array of hex colors for chart dataset fills. | | `borderColors` | string\[] | Array of hex colors for chart dataset borders. | ## Header & Footer Configure global page headers and footers. Each has three columns (`left`, `center`, `right`) that can contain text or images. ```json theme={null} { "defaults": { "header": { "left": "Acme Inc", "center": { "type": "image", "src": "https://example.com/logo.png", "width": 80, "height": 30 }, "right": "Confidential", "align": "distributed", "excludeFirstPage": true }, "footer": { "left": "{{invoiceDate}}", "center": "", "right": "Page {{pageNumber}} of {{totalPages}}", "excludeFirstPage": false } } } ``` ### Header/Footer properties | Property | Type | Default | Description | | ------------------ | ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `left` | string \| object | — | Left column content. | | `center` | string \| object | — | Center column content. | | `right` | string \| object | — | Right column content. | | `align` | string | — | Alignment override: `"left"`, `"center"`, `"right"`, or `"distributed"`. | | `excludeFirstPage` | boolean | `false` | Legacy Word-section rule: exclude the header/footer from the first page of every section that uses it. For a cover-only exception, use a dedicated first page style with no header/footer region. | The `align` option `"distributed"` aligns each column to its natural position: left column → left, center column → center, right column → right. ### Content types Each column (`left`, `center`, `right`) accepts one of three formats: **Simple string:** ```json theme={null} { "left": "Page {{pageNumber}}" } ``` **Rich text object:** ```json theme={null} { "left": { "type": "text", "content": [ { "text": "Acme Inc", "fontWeight": "bold", "fontSize": 10 }, { "text": " — Confidential", "fontStyle": "italic", "color": "#999999" } ] } } ``` Rich text content items: | Property | Type | Description | | ------------ | ------ | ---------------------------------- | | `text` | string | Text content. Max: 500 chars. | | `fontFamily` | string | Font family. Max: 100 chars. | | `fontSize` | number | Font size in pt (6–72). | | `fontWeight` | string | `"normal"` or `"bold"` | | `fontStyle` | string | `"normal"` or `"italic"` | | `color` | string | Text color in hex. | | `align` | string | `"left"`, `"center"`, or `"right"` | **Image object:** ```json theme={null} { "center": { "type": "image", "src": "https://example.com/logo.png", "caption": "Logo", "width": 100, "height": 40, "align": "center" } } ``` | Property | Type | Description | | --------- | ------ | ---------------------------------- | | `type` | string | Must be `"image"` | | `src` | string | Image URL. Max: 500 chars. | | `caption` | string | Alt text. Max: 200 chars. | | `width` | number | Width in px (10–500). | | `height` | number | Height in px (10–200). | | `align` | string | `"left"`, `"center"`, or `"right"` | Variable substitution (`{{varName}}`) works in header/footer text content — both simple strings and rich text `content` arrays. ## Complete example ```json theme={null} { "defaults": { "fontFamily": "Arial", "fontSize": 11, "color": "#333333", "lineHeight": 1.15, "headingNumbering": "1.1.1", "citationStyle": "apa7", "spacing": { "before": { "h1": 24, "h2": 16, "h3": 12, "text": 0, "table": 10 }, "after": { "h1": 10, "h2": 8, "h3": 6, "text": 6, "table": 10 } }, "styles": { "h1": { "fontSize": 22, "fontWeight": "bold", "color": "#111111", "pageBreakBefore": true }, "h2": { "fontSize": 16, "fontWeight": "bold" }, "h3": { "fontSize": 13, "fontWeight": "bold" }, "text2": { "fontSize": 9, "color": "#666666" }, "table": { "borders": { "outer": { "width": 1, "color": "#000000" }, "inner": { "width": 0.5, "color": "#DDDDDD" } }, "header": { "backgroundColor": "#F0F0F0", "fontWeight": "bold" }, "rows": { "alternateBackgroundColor": "#FAFAFA" }, "cellPadding": { "top": 4, "right": 6, "bottom": 4, "left": 6 } }, "figureCaption": { "fontSize": 9, "fontStyle": "italic", "prefix": "Fig." }, "tableCaption": { "fontSize": 9, "fontStyle": "italic", "prefix": "Tab." }, "refLink": { "color": "#0066CC", "underline": true } }, "chart": { "colors": ["#4BC0C0", "#FF6384", "#36A2EB", "#FFCE56"] }, "header": { "left": "Acme Inc", "right": "Confidential", "excludeFirstPage": true }, "footer": { "right": "Page {{pageNumber}} of {{totalPages}}", "excludeFirstPage": false } } } ``` # Document Styling Source: https://docs.autype.com/api-reference/json-syntax/document-styling Master pages, first/odd/even variants, reusable headers and footers, page decoration, validation, operations, and legacy migration Document Styling extends the existing `defaults.styles` object. It does not introduce a second preset type: typography, element styles, page styles, and reusable header/footer regions stay in one style bundle. Legacy documents remain valid and are not modified when opened or rendered. ## Root contract ```json theme={null} { "defaults": { "styles": { "schemaVersion": 2, "layoutUnit": "mm", "tokens": { "colors": { "primary": "#17365D", "border": "#D7DEE8" } }, "h1": { "fontSize": 26, "color": "$colors.primary" }, "pages": [ { "id": "default", "variant": "default", "format": "A4", "orientation": "portrait", "margins": { "mode": "fixed", "top": 20, "right": 20, "bottom": 20, "left": 20 } } ], "regions": [] } } } ``` | Property | Required | Description | | --------------- | -------: | --------------------------------------------------------------- | | `schemaVersion` | yes | Must be `2` when any page-design field is present | | `layoutUnit` | yes | Must be `mm`; font sizes remain pt | | `tokens` | no | Reusable colors, fonts, font sizes, spacing, borders, and radii | | `pages` | yes | Flat page entries; at least `default/default` is required | | `regions` | yes | Reusable header and footer regions; may be empty | The current root fields are all-or-nothing. A partial object such as `{ "pages": [] }` is rejected, which prevents ambiguous mixed versions. ## Page entries and master variants Each page entry is identified by the pair `(id, variant)`. Dynamic object keys and recursive inheritance are deliberately avoided. ```json theme={null} { "id": "body", "variant": "default", "format": "A4", "orientation": "portrait", "margins": { "mode": "mirrored", "top": 20, "bottom": 20, "inside": 25, "outside": 18, "gutter": 3 }, "headerRegionId": "body-header", "footerRegionId": "body-footer" } ``` Supported variants: | Variant | Purpose | | --------------- | ----------------------------------- | | `default` | Required base for an ID | | `documentFirst` | First physical page of the document | | `sectionFirst` | First page of a section | | `odd` | Odd physical pages | | `even` | Even physical pages | | `blank` | Inserted blank pages | The deterministic cascade is: 1. global `default/default`; 2. global odd/even or blank; 3. global section-first; 4. global document-first; 5. selected page ID `default`; 6. selected ID odd/even or blank; 7. selected ID section-first; 8. selected ID document-first; 9. local section overrides. Arrays replace the inherited array. Objects merge recursively. `null` explicitly clears a nullable value. A missing property inherits. ## Geometry Page entries support: * A3, A4, A5, Letter, Legal, and custom width/height; * portrait and landscape; * fixed or mirrored margins with an optional gutter; * bleed; * one to twelve columns, gap, divider, and balancing; * top, center, or bottom content alignment; * solid, image, linear-gradient, or radial-gradient backgrounds. Custom dimensions are only legal with `format: "custom"`. For Office exports, page size, orientation, margins, columns, bleed, and vertical content alignment are section geometry. Therefore an odd/even/first variant may change the master content (`headerRegionId`, `footerRegionId`, background, and page objects), but it may not silently change section geometry. Use mirrored margins for binding-aware odd/even pages. Use a named page style assigned to a dedicated section for a cover, landscape appendix, or genuinely different first-page margins. HTML can apply variant geometry directly. Office export rejects PDF bleed boxes because DOCX/ODT cannot preserve them. This is reported as an `unsupported` capability instead of producing a misleading PDF. ## Repeating page objects `objects` places reusable design elements behind or in front of document content: ```json theme={null} { "id": "brand-rail", "type": "shape", "shape": "rectangle", "layer": "background", "anchor": "page", "frame": { "top": 0, "right": 0, "bottom": 0, "width": 7 }, "fill": { "type": "color", "color": "$colors.primary" }, "mirrorOnEven": true, "locked": true, "zIndex": -10 } ``` Available object types are `shape`, `line`, `image`, `text`, and `field`. A frame requires exactly two horizontal and two vertical constraints: * `left + width`, `right + width`, or `left + right`; * `top + height`, `bottom + height`, or `top + bottom`. This supports rails, borders, corner marks, watermarks, full-page art, and fixed metadata without storing arbitrary CSS. Physical safety is explicit: ```json theme={null} { "id": "intentional-crop", "type": "shape", "shape": "ellipse", "layer": "foreground", "anchor": "page", "frame": { "left": -4, "top": 30, "width": 16, "height": 16 }, "fill": { "type": "color", "color": "#17365D" }, "allowClip": true, "allowOverlap": true } ``` By default, an object extending beyond the physical page is an error. Foreground objects intersecting the content area are also errors. Set `allowClip` or `allowOverlap` only when cropping or overlay is intentional. Free text is wrapped inside its frame; insufficient height is rejected unless intentional clipping is enabled. ## Reusable header and footer regions A region uses a bounded grid. Cells can span tracks and contain multiple blocks, so a header can contain several images, multiple text lines, fields, rules, and a background without a recursive layout tree. ```json theme={null} { "id": "body-header", "kind": "header", "box": { "width": "page", "edgeOffset": 6, "height": 18, "minHeight": 12, "maxHeight": 22 }, "fill": { "type": "color", "color": "#FFFFFF" }, "borders": { "bottom": { "width": 0.5, "style": "solid", "color": "$colors.border" } }, "grid": { "columns": ["28mm", "1fr", "25mm"], "rows": ["auto", "6mm"], "gapX": 3, "gapY": 1, "cells": [ { "id": "brand", "row": 1, "column": 1, "rowSpan": 2, "flow": "column", "blocks": [ { "id": "logo", "type": "image", "src": "/image/asset-id", "width": 24, "height": 10 }, { "id": "company", "type": "text", "text": "Example GmbH", "fontSize": 8 } ] }, { "id": "page-meta", "row": 1, "column": 2, "columnSpan": 2, "flow": "row", "align": "end", "blocks": [ { "id": "label", "type": "text", "text": "Page" }, { "id": "page", "type": "field", "field": "pageNumber" } ] } ] } } ``` Region blocks: | Type | Typical use | | ---------- | ------------------------------------------------------------- | | `text` | Plain or Markdown text, including multiple lines | | `image` | Logos, seals, and icons; multiple images per cell are allowed | | `field` | Page number, page count, dates, and document/section metadata | | `variable` | A named document variable | | `rule` | Horizontal or vertical separator | | `spacer` | Explicit layout spacing | | `qrcode` | QR code with error correction and colors | | `shape` | Editable badge or geometric decoration | Regions and cells also support fills, padding, and per-edge borders. A traditional Word-style separator is a bottom border on the region or a horizontal `rule` block. For Office output, column tracks may mix `mm`, `%`, `auto`, and `fr`. Their fixed share must fit the available physical width. Row tracks are `auto` or fixed `mm`; relative row heights are rejected because Word cannot preserve them reliably. A fixed region height or `maxHeight` is checked against both the configured blocks and the resolved runtime text/variables before the file is written. ## Section assignment Both page and flow sections can select a page style: ```json theme={null} { "id": "appendix", "type": "flow", "pageStyleId": "appendix", "pageStart": "odd", "restartPageNumber": 1, "pageNumberFormat": "upperRoman", "content": [] } ``` `pageStart` accepts `auto`, `next`, `odd`, and `even`. Number formats are `decimal`, `lowerRoman`, `upperRoman`, `lowerAlpha`, and `upperAlpha`. ## Validation layers Autype validates a style in five layers: 1. structural Zod/JSON Schema validation; 2. semantic references, unique IDs, grids, constraints, gradients, and tokens; 3. asset authorization and copy-on-apply traversal; 4. renderer capabilities (`native`, `rasterized`, `approximated`, `unsupported`); 5. deterministic layout geometry and header/footer collision checks. Potential header/footer-to-content collisions are warnings. The following are hard errors: * a non-positive content area; * region content exceeding `height` or `maxHeight`; * fixed grid tracks that do not fit or cannot resolve to 100%; * a page object outside the physical page without `allowClip`; * a foreground object over the content area without `allowOverlap`; * free page text that cannot fit its frame. Auto-height regions should define `minHeight` or `maxHeight` to make collision checking deterministic. New atomic style operations run these layout checks before committing. The renderer repeats capability and layout validation so a direct JSON request cannot bypass them. In compatible export mode, non-native decisions are returned as warnings. In strict mode, any `unsupported` decision rejects the target export. ## Atomic style operations Small edits do not require replacing the complete JSON: ```json theme={null} { "schemaVersion": 2, "operations": [ { "op": "setToken", "path": "colors.primary", "value": "#17365D" }, { "op": "assignSection", "sectionId": "appendix", "pageStyleId": "appendix" } ] } ``` Operations include `upsertPage`, `removePage`, `upsertRegion`, `removeRegion`, `duplicatePage`, `duplicateRegion`, `addPageObject`, `updatePageObject`, `removePageObject`, `duplicatePageObject`, `movePageObject`, `moveRegionBlock`, `assignSection`, `setToken`, `removeToken`, `setElementStyle`, and `resetElementStyle`. Passing `null` as `assignSection.pageStyleId` removes the explicit page-style assignment. The batch is atomic: structural, semantic, token-reference, capability, or physical-layout failure leaves the stored style unchanged. Document writes can provide `expectedSnapshotId`; preset writes can provide `expectedVersion`. Document writes are additionally committed in a serializable database transaction, so a concurrent snapshot created between validation and commit also returns HTTP 409. Clients that require a faithful target can request a strict renderer gate: ```json theme={null} { "documentId": "document-id", "expectedSnapshotId": "snapshot-id", "requiredRenderers": ["docx"], "payload": { "schemaVersion": 2, "operations": [ { "op": "duplicatePage", "sourceId": "business", "sourceVariant": "default", "targetId": "business", "targetVariant": "odd" } ] } } ``` If the resulting style contains an unsupported DOCX capability, the complete write is rejected with `UNSUPPORTED_STYLE_CAPABILITY`. Images referenced by legacy header/footer fields or current pages, regions, fills, and blocks are copied as one unit. A failed copy or a later transaction conflict rolls those copies back before the request fails. ## Legacy migration The read path normalizes legacy page settings and three-slot headers/footers in memory. It does not mutate a document. An explicit upgrade is copy-on-write: 1. preview the generated current bundle; 2. optionally persist it; 3. create a new immutable document snapshot; 4. keep legacy fields for rollback and compatibility. The mapping preserves page geometry, left/center/right content, rich text lines, header/footer images, and `excludeFirstPage`. Features that cannot be downgraded losslessly return explicit warnings. ## Focused schemas for agents Use the smallest applicable generated schema: * [`style-bundle.schema.json`](https://autype.com/llm-resources/style-bundle.schema.json) * [`page-style-entry.schema.json`](https://autype.com/llm-resources/page-style-entry.schema.json) * [`page-region.schema.json`](https://autype.com/llm-resources/page-region.schema.json) * [`region-block.schema.json`](https://autype.com/llm-resources/region-block.schema.json) * [`style-operations.schema.json`](https://autype.com/llm-resources/style-operations.schema.json) These files are generated from the canonical Zod source. Do not edit generated JSON Schema files manually. # Footnotes Source: https://docs.autype.com/api-reference/json-syntax/footnotes Define reusable footnotes and reference them from editable document text Footnotes are stored separately from the document body and numbered by their first appearance. The stable ID is never shown to readers, so moving or adding a reference renumbers the document automatically. ## Document JSON Add definitions to the top-level `footnotes` array and use `[^id]` wherever inline formatting is supported: ```json theme={null} { "document": { "type": "docx", "size": "A4" }, "footnotes": [ { "id": "annual-report", "content": "**Annual report 2026**, page 42." } ], "sections": [ { "type": "flow", "content": [ { "type": "text", "text": "Revenue was independently verified[^annual-report]." } ] } ] } ``` | Property | Type | Required | Limits | | --------- | ------ | -------- | ------------------------------------------------------------------------------- | | `id` | string | Yes | 1-80 characters; starts with a letter, followed by letters, digits, `_`, or `-` | | `content` | string | Yes | 1-5,000 characters; supports inline Autype Markdown | The document may contain up to 500 definitions. IDs must be unique and every `[^id]` reference must resolve to a definition. One definition may be referenced multiple times; all occurrences share the same content. Footnote definitions cannot contain nested footnote references. ## Extended Markdown For a short note used once, write its text directly beside the reference: ```markdown theme={null} Revenue was independently verified^[**Annual report 2026**, page 42.]. ``` Autype gives the note a stable internal ID and normalizes it to the canonical form when the document is converted or saved. Compact notes are single-line and support inline formatting and links. Use a named definition when a note is reused or spans multiple lines: ```markdown theme={null} Revenue was independently verified[^annual-report]. [^annual-report]: **Annual report 2026**, page 42. ``` Definitions may appear anywhere in the source and are serialized after the document body. Neither compact nor named notes may contain another footnote. Footnote syntax is distinct from citations (`@[citeKey]`) and internal references (`[text](#anchor)`). Longer notes use four-space or tab-indented continuation lines: ```markdown theme={null} [^annual-report]: **Annual report 2026**, page 42. Independently reviewed on 10 August 2026. ``` ## Editor and output behavior In the RichText editor, choose **Add → Footnote**, enter the note in the modal, and insert it. Clicking the numbered token reopens the same modal for editing or deleting the reference. Numbers update automatically in document order. DOCX import and export use native Word footnotes. PDF output renders normal document footnotes through the DOCX conversion pipeline. A DOCX imported and rendered again retains both the reference and editable definition. Footnote IDs are technical identifiers. Do not use hard-coded visible numbers such as `[^1]` because IDs must begin with a letter and numbers are assigned automatically. # Document JSON Overview Source: https://docs.autype.com/api-reference/json-syntax/overview Top-level structure of the Autype document JSON used for rendering The document JSON is the core data structure used by the Render endpoint (`POST /render`) and Bulk Render endpoint (`POST /bulk-render`) to generate PDF, DOCX, and ODT documents. ## Top-level structure A document JSON object has the following top-level keys: ```json theme={null} { "document": { ... }, "stylePresetId": "system:executive-annual-report", "sections": [ ... ], "variables": { ... }, "abbreviations": { ... }, "citations": [ ... ], "footnotes": [ ... ], "defaults": { ... } } ``` | Property | Type | Required | Description | | --------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `document` | object | **Yes** | Page settings: output format, size, margins, orientation, and metadata. | | `stylePresetId` | string | No | Workspace style UUID or immutable built-in `system:` to resolve before rendering. The same references work for temporary renders and persistent documents. Inline `defaults` remain supported and override the preset. | | `sections` | array | **Yes** | Array of content sections. Each section contains an array of elements. Min: 0, Max: 500. | | `variables` | object | No | Template variables for `{{varName}}` text substitution and `variableRef` elements. | | `abbreviations` | object | No | Map of abbreviation short forms to their full text (e.g., `"API": "Application Programming Interface"`). | | `citations` | array | No | Array of citation entries in [CSL-JSON](https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html) format for bibliography generation. Max: 1000. | | `footnotes` | array | No | Footnote definitions referenced with `[^id]`. IDs are unique; max 500 definitions. | | `defaults` | object | No | Global styling defaults: fonts, colors, spacing, element styles, header/footer, citation style, and more. | ## Style presets For API and MCP workflows, you can reference an organization-wide style preset instead of embedding a large `defaults` object in every request: ```json theme={null} { "document": { "type": "pdf", "size": "A4" }, "stylePresetId": "system:executive-annual-report", "sections": [ { "type": "flow", "content": [ { "type": "heading", "level": 1, "content": "Quarterly Report" } ] } ] } ``` Style presets are resolved server-side. If both `stylePresetId` and inline `defaults` are provided, Autype merges them and lets inline `defaults` win. Built-in references never create database style rows; use the explicit Customize action when you need an editable workspace copy. This keeps JSON and Markdown requests compact while preserving the full JSON schema for advanced clients. ## Strict validation mode The render endpoints (`POST /render` and `POST /render/markdown`) support an optional `?strict=true` query parameter that enables strict validation. In strict mode, the API performs additional checks that go beyond schema validation: * **Broken internal references** — references to non-existent anchors (e.g., `[see here](#missing-anchor)`) cause an error * **Undefined citations** — `@[citeKey]` references to citation IDs not present in the `citations` array cause an error * **Undefined abbreviations** — `~ABK~` references to abbreviation keys not present in the `abbreviations` object cause an error * **Undefined footnotes** — every `[^id]` reference must have exactly one non-empty definition in `footnotes` * **Duplicate anchors** — multiple elements defining the same anchor ID cause an error (this is always checked, even without strict mode) Without strict mode, broken references, undefined citations, and undefined abbreviations are treated as **warnings** and do not block rendering. With strict mode enabled, they become **errors** and the render request is rejected with a `400 Bad Request` response containing the list of validation errors. Strict mode is recommended for production workflows to catch issues early. In the Autype editor, these same checks are shown as warnings in the sidebar. ## Document settings The `document` object configures the page layout and document metadata. ```json theme={null} { "document": { "type": "pdf", "filename": "invoice-2024", "title": "Invoice #1234", "author": "Acme Inc", "language": "en-US", "subject": "Monthly Invoice", "keywords": ["invoice", "billing"], "size": "A4", "orientation": "portrait", "marginTop": 2.5, "marginRight": 2.5, "marginBottom": 2, "marginLeft": 2.5 } } ``` ### Properties | Property | Type | Required | Default | Description | | -------------- | --------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------- | | `type` | string | **Yes** | — | Output format: `"pdf"`, `"docx"`, or `"odt"` | | `filename` | string | No | — | Output filename without extension. Only `a-z`, `A-Z`, `0-9`, `_`, `-` allowed. Max: 100 chars. | | `title` | string | No | — | Document title (PDF/DOCX metadata). Max: 200 chars. | | `author` | string | No | — | Document author (PDF/DOCX metadata). Max: 100 chars. | | `language` | string | No | — | BCP 47 document language, for example `en-US` or `de-DE`. Required for a ready export-readiness report. | | `subject` | string | No | — | Document subject (PDF/DOCX metadata). Max: 200 chars. | | `keywords` | string\[] | No | — | Document keywords for metadata. Max: 10 items, 50 chars each. | | `size` | string | No | `"A4"` | Page size: `"A4"`, `"A3"`, `"A5"`, `"Letter"`, `"Legal"` | | `orientation` | string | No | `"portrait"` | Page orientation: `"portrait"` or `"landscape"` | | `marginTop` | number | No | — | Top margin in cm (0–10) | | `marginRight` | number | No | — | Right margin in cm (0–10) | | `marginBottom` | number | No | — | Bottom margin in cm (0–10) | | `marginLeft` | number | No | — | Left margin in cm (0–10) | ## Sections Sections are the content containers of your document. There are two types: ### Flow section Flowing content that spans multiple pages automatically. This is the most common section type. ```json theme={null} { "type": "flow", "newPage": true, "columns": { "count": 2, "space": 1.27, "separate": true }, "content": [ { "type": "h1", "text": "Introduction" }, { "type": "text", "text": "This is a paragraph." } ] } ``` | Property | Type | Required | Default | Description | | --------- | ------- | -------- | ------- | ---------------------------------------------- | | `type` | string | **Yes** | — | Must be `"flow"` | | `id` | string | No | — | Optional unique identifier. Max: 100 chars. | | `newPage` | boolean | No | `true` | Start this section on a new page. | | `columns` | object | No | — | Multi-column layout configuration. | | `content` | array | **Yes** | — | Array of content elements. Max: 5000 elements. | #### Columns | Property | Type | Required | Default | Description | | ---------- | ------- | -------- | ------- | ----------------------------------- | | `count` | number | **Yes** | — | Number of columns (1–4) | | `space` | number | No | `1.27` | Space between columns in cm (0–5) | | `separate` | boolean | No | `false` | Show separator line between columns | ### Page section A single positioned page — useful for cover pages, title pages, or any content that needs precise vertical positioning. ```json theme={null} { "type": "page", "align": "center", "content": [ { "type": "h1", "text": "My Document", "align": "center" }, { "type": "text", "text": "A subtitle", "align": "center" } ] } ``` | Property | Type | Required | Default | Description | | --------- | ------ | -------- | ------- | ----------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"page"` | | `id` | string | No | — | Optional unique identifier. Max: 100 chars. | | `align` | string | No | `"top"` | Vertical alignment: `"top"`, `"center"`, `"bottom"` | | `startY` | number | No | — | Y position in cm from top (0–100). Overrides `align`. | | `content` | array | **Yes** | — | Array of content elements. Max: 200 elements. | ## Complete example ```json theme={null} { "document": { "type": "pdf", "filename": "certificate", "title": "Certificate of Completion", "size": "A4", "orientation": "landscape", "marginTop": 2, "marginRight": 2.5, "marginBottom": 2, "marginLeft": 2.5 }, "variables": { "recipientName": "Max Mustermann", "courseName": "Advanced Document Automation", "completionDate": "15. Januar 2026" }, "defaults": { "fontFamily": "Arial", "fontSize": 12, "color": "#333333" }, "sections": [ { "type": "flow", "content": [ { "type": "h1", "text": "Certificate of Completion", "align": "center" }, { "type": "spacer", "height": 2 }, { "type": "text", "text": "This is to certify that", "align": "center" }, { "type": "h2", "text": "{{recipientName}}", "align": "center" }, { "type": "text", "text": "has successfully completed the course", "align": "center" }, { "type": "h3", "text": "{{courseName}}", "align": "center" }, { "type": "spacer", "height": 2 }, { "type": "text", "text": "Date: {{completionDate}}", "align": "center" } ] } ] } ``` ## Next steps Dynamic content substitution with text, number, image, list, and table variables. Define abbreviation short forms and generate abbreviation lists. CSL-JSON citations and automatic bibliography generation. Automatically numbered notes with editable Markdown definitions. Global styling: fonts, colors, spacing, header/footer, and more. Flow and page sections, columns, page breaks, and spacers. Headings, paragraphs, inline formatting, and anchors. Tables with headers, rows, widths, alignment, images, form fields, captions, and data binding. Standalone and table-cell controls with variable binding, styling, and PDF AcroForms. Ordered and unordered lists with nested items. Images, charts, QR codes, code blocks, and math equations. Table of contents, list of figures, list of tables. # Block Quotes Source: https://docs.autype.com/api-reference/json-syntax/sections/blockquotes Styled block quote containers with borders, backgrounds, and typography options Block quote elements render styled containers with a left border, useful for callouts, quoted text, or highlighted sections. They can contain any other content elements as children. ## Basic block quote ```json theme={null} { "type": "blockquote", "content": [ { "type": "text", "text": "This is a block quote with default styling." } ] } ``` Block quotes inherit their default border, background, typography, and indents from `defaults.styles.blockquote`. Local properties override those defaults. ## Properties | Property | Type | Required | Default | Description | | ----------------- | ------- | -------- | ----------- | ------------------------------------------------------------------------------------------------------------ | | `type` | string | **Yes** | — | Must be `"blockquote"` | | `id` | string | No | auto | Unique identifier. Auto-generated if not provided. Max: 100 chars. | | `content` | array | **Yes** | — | Array of child elements (text, lists, images, etc.). Min: 1, max: 200. | | `fontFamily` | string | No | inherited | Font family override. Max: 100 chars. | | `fontSize` | number | No | inherited | Font size in pt (6–72). | | `fontWeight` | string | No | `"normal"` | `"normal"` or `"bold"` | | `fontStyle` | string | No | `"normal"` | `"normal"` or `"italic"` | | `color` | string | No | inherited | Text color in hex (`#RGB` or `#RRGGBB`). | | `align` | string | No | `"left"` | Alignment: `"left"`, `"center"`, `"right"`, `"justify"` | | `backgroundColor` | string | No | — | Background color in hex (`#RGB`, `#RRGGBB`, or `#RRGGBBAA` with alpha). | | `borderWidth` | number | No | `3` | Border width in px (0–20). | | `borderColor` | string | No | `"#CCCCCC"` | Border color in hex (`#RGB` or `#RRGGBB`). | | `borderTop` | boolean | No | `false` | Show top border. | | `borderBottom` | boolean | No | `false` | Show bottom border. | | `borderLeft` | boolean | No | `true` | Show left border. | | `borderRight` | boolean | No | `false` | Show right border. | | `indentLeft` | number | No | `0` | Left indent in mm (0–100). | | `indentRight` | number | No | `0` | Right indent in mm (0–100). | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. See [Pagination](/api-reference/json-syntax/sections/layout#pagination-controls). | The defaults shown above are the **built-in fallbacks**. Block quotes also respect styles from `defaults.styles.blockquote` in your document configuration. ## Content The `content` array accepts the same element types as a flow section — text, headings, lists, images, tables, etc. This makes block quotes flexible containers: ```json theme={null} { "type": "blockquote", "content": [ { "type": "text", "text": "**Important:** Review the following items before proceeding." }, { "type": "list", "ordered": true, "items": ["Check all inputs", "Validate results", "Submit report"] } ] } ``` ## Styling examples ### Callout box with background ```json theme={null} { "type": "blockquote", "backgroundColor": "#FFF3E0", "borderColor": "#FF9800", "borderWidth": 3, "content": [ { "type": "text", "text": "**Note:** Please review the attached documents before the meeting." } ] } ``` ### Box with all borders ```json theme={null} { "type": "blockquote", "borderTop": true, "borderBottom": true, "borderLeft": true, "borderRight": true, "borderColor": "#1976D2", "backgroundColor": "#E3F2FD", "content": [ { "type": "text", "text": "This block quote has borders on all four sides." } ] } ``` ### Italic centered quote ```json theme={null} { "type": "blockquote", "fontStyle": "italic", "align": "center", "color": "#555555", "content": [ { "type": "text", "text": "\"The best way to predict the future is to invent it.\"" } ] } ``` ### Custom indent and spacing ```json theme={null} { "type": "blockquote", "indentLeft": 20, "indentRight": 20, "spacing": { "before": 12, "after": 12 }, "content": [ { "type": "text", "text": "This block quote is indented further from both sides with extra spacing." } ] } ``` ## Defaults Configure default styles for all block quotes via `defaults.styles.blockquote`: ```json theme={null} { "defaults": { "styles": { "blockquote": { "fontFamily": "Georgia", "fontStyle": "italic", "color": "#444444", "backgroundColor": "#F5F5F5", "borderColor": "#999999", "borderWidth": 3, "indentLeft": 15 } } } } ``` ### Block quote style properties | Property | Type | Description | | ----------------- | ------- | ------------------------------------------------- | | `fontFamily` | string | Default font family. Max: 100 chars. | | `fontSize` | number | Default font size in pt (6–72). | | `fontWeight` | string | `"normal"` or `"bold"` | | `fontStyle` | string | `"normal"` or `"italic"` | | `color` | string | Default text color in hex. | | `align` | string | Default alignment. | | `backgroundColor` | string | Default background color in hex (supports alpha). | | `borderWidth` | number | Default border width in px (0–20). | | `borderColor` | string | Default border color in hex. | | `borderTop` | boolean | Default top border visibility. | | `borderBottom` | boolean | Default bottom border visibility. | | `borderLeft` | boolean | Default left border visibility. | | `borderRight` | boolean | Default right border visibility. | | `indentLeft` | number | Default left indent in mm (0–100). | | `indentRight` | number | Default right indent in mm (0–100). | You can also configure default spacing for block quotes via `defaults.spacing`: ```json theme={null} { "defaults": { "spacing": { "before": { "blockquote": 8 }, "after": { "blockquote": 8 } } } } ``` ## Complete example ```json theme={null} { "document": { "type": "pdf", "size": "A4" }, "defaults": { "fontFamily": "Noto Sans", "fontSize": 11, "styles": { "blockquote": { "fontStyle": "italic", "borderColor": "#999999", "indentLeft": 12 } } }, "sections": [ { "type": "flow", "content": [ { "type": "h1", "text": "Research Summary" }, { "type": "text", "text": "The study concluded with the following key finding:" }, { "type": "blockquote", "content": [ { "type": "text", "text": "Automation reduces document production time by an average of **73%** compared to manual processes." } ] }, { "type": "text", "text": "This result was consistent across all test groups." }, { "type": "blockquote", "backgroundColor": "#FFF8E1", "borderColor": "#FFC107", "fontStyle": "normal", "content": [ { "type": "text", "text": "**Warning:** These results are preliminary and should be validated with a larger sample size." } ] } ] } ] } ``` # Form Fields Source: https://docs.autype.com/api-reference/json-syntax/sections/form-fields JSON schema reference for standalone and table-cell form fields, variable binding, styling, and PDF AcroForms. Form fields are regular content elements with `type: "formField"`. They render as interactive AcroForm widgets in PDF and as printable controls in other formats. ## Element shape ```json theme={null} { "id": "customer-name", "type": "formField", "name": "customerName", "fieldType": "text", "label": "Customer name", "placeholder": "Enter a name", "variable": "customerName", "required": true, "readOnly": false, "width": 100, "height": 28, "style": { "borderMode": "outline", "borderLineStyle": "solid", "borderWidth": 1, "borderColor": "#CBD5E1", "backgroundColor": "#FFFFFF", "textColor": "#111827", "fontSize": 11, "inset": 6, "borderRadius": 4 }, "spacing": { "before": 6, "after": 8 }, "pagination": { "keepTogether": true } } ``` ## Properties | Property | Type | Required | Description | | ----------------- | ----------------------- | ----------- | --------------------------------------------------------------------------------------- | | `id` | string | No | Stable element ID | | `type` | `"formField"` | Yes | Element discriminator | | `name` | string | Yes | Stable field name (`A-Z`, `a-z`, digits, `_`, `-`) | | `fieldType` | string | Yes | `text`, `number`, `multiline`, `date`, `checkbox`, `select`, `signature`, or `initials` | | `label` | string | No | Optional visible label; empty means no label spacing | | `placeholder` | string | No | Hint for an empty non-checkbox field | | `variable` | string | No | Compatible document variable used for the initial value | | `value` | string, number, boolean | No | Fixed initial value | | `options` | string\[] | Conditional | Required for `select`; choice labels for `checkbox` | | `selectionMode` | `single`, `multiple` | No | Checkbox selection behavior | | `selectedOptions` | string\[] | No | Initially selected checkbox options | | `required` | boolean | No | Required PDF widget flag | | `readOnly` | boolean | No | Read-only PDF widget flag | | `signerRole` | string | No | Process role key for `signature` or `initials` fields only | | `width` | number | No | Available-width percentage (`10`-`100`) | | `height` | number | No | Minimum height in points (`16`-`300`) | | `style` | object | No | Local form-field style override | | `spacing` | object | No | Local spacing before/after in points | | `pagination` | object | No | Page-break and keep hints | ## Validation rules * `select` fields require at least one option. * Option labels must be unique. * `selectionMode` and `selectedOptions` apply only to checkbox fields. * A single-select checkbox accepts at most one selected option. * Every selected option must exist in `options`. * Number fields require numeric values; checkbox scalar values must be boolean. * A select value must be one of its options. * `signerRole` is rejected on every field type except `signature` and `initials`. ## Checkbox group ```json theme={null} { "type": "formField", "name": "notificationChannels", "fieldType": "checkbox", "options": ["Email", "SMS", "Portal"], "selectionMode": "multiple", "selectedOptions": ["Email", "Portal"], "style": { "checkboxShape": "square", "checkboxBorderMode": "outline" } } ``` For single-selection radio-style controls, use `selectionMode: "single"` and `checkboxShape: "circle"`. ## Form field in a table cell A table cell may contain text, an image, or one form field, but not more than one of these at the same time. ```json theme={null} { "type": "table", "headers": ["Field", "Value"], "rows": [ [ "Customer", { "formField": { "type": "formField", "name": "customerName", "fieldType": "text" } } ] ] } ``` ## Global defaults Use `defaults.styles.formField` for visual defaults and `defaults.spacing.before.formField` / `defaults.spacing.after.formField` for vertical spacing. Local `style` and `spacing` values take precedence. Signature and initials fields are AcroForm widgets, not cryptographic or PAdES signatures. # Indices Source: https://docs.autype.com/api-reference/json-syntax/sections/indices Table of contents, list of figures, list of tables, list of code listings, and other auto-generated indices Index elements automatically generate structured lists from your document content: a table of contents from headings, a list of figures from captioned images/charts, a list of tables from captioned tables, and a list of code listings from captioned code blocks. All index elements accept `spacing` and `pagination`. Pagination supports `keepTogether`, `keepWithNext`, `pageBreakBefore`, and `widowControl`; see [Pagination controls](/api-reference/json-syntax/sections/layout#pagination-controls). The `listOfAbbreviations` and `bibliography` elements are documented on their own pages: [Abbreviations](/api-reference/json-syntax/abbreviations#list-of-abbreviations-element) and [Citations](/api-reference/json-syntax/citations#bibliography-element). ## Table of Contents Generates an automatic table of contents from headings in the document. ```json theme={null} { "type": "toc", "title": "Table of Contents", "maxLevel": 3, "hyperlink": true } ``` ### Properties | Property | Type | Required | Default | Description | | ------------ | ------- | -------- | ------- | ---------------------------------------------------------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"toc"` | | `id` | string | No | — | Unique identifier. Max: 100 chars. | | `title` | string | No | — | Title displayed above the TOC (e.g., `"Table of Contents"`, `"Inhaltsverzeichnis"`). Max: 200 chars. | | `maxLevel` | number | No | `3` | Maximum heading level to include (1–6). E.g., `3` includes h1, h2, h3. | | `hyperlink` | boolean | No | `true` | Make TOC entries clickable links to the corresponding headings. | | `fontFamily` | string | No | — | Font family for the title. Max: 100 chars. | | `fontSize` | number | No | — | Font size for the title in pt (6–72). | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. | ### Example usage ```json theme={null} { "sections": [ { "type": "flow", "content": [ { "type": "toc", "title": "Contents", "maxLevel": 2 }, { "type": "pageBreak" } ] }, { "type": "flow", "content": [ { "type": "h1", "text": "Introduction" }, { "type": "text", "text": "..." }, { "type": "h2", "text": "Background" }, { "type": "text", "text": "..." }, { "type": "h1", "text": "Methods" }, { "type": "text", "text": "..." } ] } ] } ``` The TOC will list "Introduction", "Background", and "Methods" with page numbers. ## List of Figures Generates an automatic list of all images and charts that have a `caption` property. ```json theme={null} { "type": "listOfFigures", "title": "List of Figures", "tabStyle": "dot" } ``` ### Properties | Property | Type | Required | Default | Description | | ------------ | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------ | | `type` | string | **Yes** | — | Must be `"listOfFigures"` | | `id` | string | No | — | Unique identifier. Max: 100 chars. | | `title` | string | No | — | Title displayed above the list (e.g., `"List of Figures"`, `"Abbildungsverzeichnis"`). Max: 200 chars. | | `tabStyle` | string | No | `"dot"` | Leader style between caption and page number: `"dot"`, `"hyphen"`, `"underscore"`, `"none"` | | `fontFamily` | string | No | — | Font family for the title. Max: 100 chars. | | `fontSize` | number | No | — | Font size for the title in pt (6–72). | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. | Only images and charts with a `caption` property appear in the list of figures. The figure numbering prefix (e.g., "Figure", "Fig.", "Abb.") is controlled by `defaults.styles.figureCaption.prefix`. ### Example usage ```json theme={null} { "sections": [{ "type": "flow", "content": [ { "type": "listOfFigures", "title": "Figures" }, { "type": "pageBreak" }, { "type": "h1", "text": "Results" }, { "type": "image", "src": "https://example.com/chart.png", "caption": "Revenue growth 2024" }, { "type": "chart", "caption": "User adoption rate", "config": { "type": "line", "data": { "labels": ["Q1", "Q2"], "datasets": [{ "data": [100, 200] }] } } } ] }] } ``` ## List of Tables Generates an automatic list of all tables that have a `caption` property. ```json theme={null} { "type": "listOfTables", "title": "List of Tables", "tabStyle": "dot" } ``` ### Properties | Property | Type | Required | Default | Description | | ------------ | ------ | -------- | ------- | --------------------------------------------------------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"listOfTables"` | | `id` | string | No | — | Unique identifier. Max: 100 chars. | | `title` | string | No | — | Title displayed above the list (e.g., `"List of Tables"`, `"Tabellenverzeichnis"`). Max: 200 chars. | | `tabStyle` | string | No | `"dot"` | Leader style between caption and page number: `"dot"`, `"hyphen"`, `"underscore"`, `"none"` | | `fontFamily` | string | No | — | Font family for the title. Max: 100 chars. | | `fontSize` | number | No | — | Font size for the title in pt (6–72). | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. | Only tables with a `caption` property appear in the list of tables. The table numbering prefix (e.g., "Table", "Tab.", "Tabelle") is controlled by `defaults.styles.tableCaption.prefix`. ## List of Code Listings Generates an automatic list of all code blocks that have a `caption` property. ```json theme={null} { "type": "listOfCodeListings", "title": "List of Code Listings", "tabStyle": "dot" } ``` ### Properties | Property | Type | Required | Default | Description | | ------------ | ------ | -------- | ------- | ----------------------------------------------------------------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"listOfCodeListings"` | | `id` | string | No | — | Unique identifier. Max: 100 chars. | | `title` | string | No | — | Title displayed above the list (e.g., `"List of Code Listings"`, `"Quellcodeverzeichnis"`). Max: 200 chars. | | `tabStyle` | string | No | `"dot"` | Leader style between caption and page number: `"dot"`, `"hyphen"`, `"underscore"`, `"none"` | | `fontFamily` | string | No | — | Font family for the title. Max: 100 chars. | | `fontSize` | number | No | — | Font size for the title in pt (6–72). | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. | Only code blocks with a `caption` property appear in the list. The listing numbering prefix (e.g., "Listing", "Code", "Quellcode") is controlled by `defaults.styles.codeCaption.prefix`. Diagram code blocks (e.g., `mermaid`, `plantuml`) with captions appear in the **List of Figures** instead — unless `renderAsImage` is `false`. See [Diagrams](/api-reference/json-syntax/sections/media#diagrams). ## Complete example A typical academic document structure with all index elements: ```json theme={null} { "document": { "type": "pdf", "size": "A4" }, "abbreviations": { "API": "Application Programming Interface", "REST": "Representational State Transfer" }, "citations": [ { "id": "smith2023", "type": "book", "title": "Document Automation", "author": [{ "family": "Smith", "given": "John" }], "issued": { "date-parts": [[2023]] } } ], "defaults": { "citationStyle": "apa7", "styles": { "figureCaption": { "prefix": "Figure", "fontSize": 9 }, "tableCaption": { "prefix": "Table", "fontSize": 9 } } }, "sections": [ { "type": "page", "align": "center", "content": [ { "type": "h1", "text": "Research Paper", "align": "center" } ] }, { "type": "flow", "content": [ { "type": "toc", "title": "Table of Contents", "maxLevel": 3 }, { "type": "pageBreak" }, { "type": "listOfFigures", "title": "List of Figures" }, { "type": "listOfTables", "title": "List of Tables" }, { "type": "listOfCodeListings", "title": "List of Code Listings" }, { "type": "listOfAbbreviations", "title": "Abbreviations" }, { "type": "pageBreak" } ] }, { "type": "flow", "content": [ { "type": "h1", "text": "Introduction" }, { "type": "text", "text": "This paper examines the ~API~ design patterns described by @[smith2023]." }, { "type": "image", "src": "https://example.com/overview.png", "caption": "System overview", "anchor": "fig-overview" }, { "type": "h2", "text": "Data" }, { "type": "table", "caption": "Experiment results", "anchor": "tab-results", "headers": ["Test", "Score"], "rows": [["A", "95%"], ["B", "87%"]] }, { "type": "text", "text": "As shown in [Figure 1](#fig-overview) and [Table 1](#tab-results), the results are promising." }, { "type": "h2", "text": "Implementation" }, { "type": "code", "language": "typescript", "code": "async function analyze(data: Result[]): Promise {\n const valid = data.filter(r => r.score > 0);\n return generateReport(valid);\n}", "caption": "Data analysis function", "anchor": "code-analyze" }, { "type": "text", "text": "The implementation in [Listing 1](#code-analyze) processes the raw data." }, { "type": "pageBreak" }, { "type": "bibliography", "title": "References" } ] } ] } ``` # Layout Source: https://docs.autype.com/api-reference/json-syntax/sections/layout Sections, semantic layouts, fixed canvas compositions, pagination, page breaks, and spacers Sections are the top-level content containers of your document. Every document has a `sections` array containing one or more sections. Each section holds a `content` array of elements. ## Flow section The most common section type. Content flows across pages automatically. ```json theme={null} { "type": "flow", "newPage": true, "columns": { "count": 2, "space": 1.27, "separate": true }, "content": [ { "type": "h1", "text": "Chapter 1" }, { "type": "text", "text": "Content flows across pages automatically." } ] } ``` ### Properties | Property | Type | Required | Default | Description | | --------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------ | | `type` | string | **Yes** | — | Must be `"flow"` | | `id` | string | No | — | Optional unique identifier. Max: 100 chars. | | `newPage` | boolean | No | `true` | Start this section on a new page. Set to `false` to continue on the same page as the previous section. | | `columns` | object | No | — | Multi-column layout. See [Columns](#columns). | | `content` | array | **Yes** | — | Array of content elements. Max: 5000 elements. | Elements inside a flow section can use a `pagination` object: ```json theme={null} { "keepTogether": true, "keepWithNext": true, "pageBreakBefore": false, "widowControl": true } ``` These properties map to native DOCX paragraph and table pagination where available and to equivalent print CSS in HTML output. ### Columns Enable multi-column layout for a flow section. ```json theme={null} { "type": "flow", "columns": { "count": 2, "space": 1.5, "separate": true }, "content": [ ... ] } ``` | Property | Type | Required | Default | Description | | ---------- | ------- | -------- | ------- | ----------------------------------------------- | | `count` | number | **Yes** | — | Number of columns (1–4). | | `space` | number | No | `1.27` | Space between columns in cm (0–5). | | `separate` | boolean | No | `false` | Show a vertical separator line between columns. | ## Page section A single positioned page — useful for cover pages, title pages, or any content that needs precise vertical positioning. Content does **not** flow to the next page. ```json theme={null} { "type": "page", "align": "center", "content": [ { "type": "h1", "text": "My Document", "align": "center" }, { "type": "text", "text": "A subtitle", "align": "center" } ] } ``` ### Properties | Property | Type | Required | Default | Description | | ----------------- | ------- | -------- | --------- | ------------------------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"page"` | | `id` | string | No | — | Optional unique identifier. Max: 100 chars. | | `align` | string | No | `"top"` | Vertical alignment: `"top"`, `"center"`, `"bottom"` | | `startY` | number | No | — | Y position in cm from top (0–100). Overrides `align`. | | `orientation` | string | No | — | `\"portrait\"` or `\"landscape\"`. | | `backgroundColor` | string | No | — | Backward-compatible page background color. | | `background` | object | No | — | Page background color and/or image with fit, position, and opacity. | | `margins` | object | No | — | Per-side page margins in cm. | | `showHeader` | boolean | No | inherited | Override header visibility for this page. | | `showFooter` | boolean | No | inherited | Override footer visibility for this page. | | `content` | array | **Yes** | — | Array of content elements. Max: 200 elements. | Page sections are limited to a single page. If the content exceeds the page height, it will be clipped. Use flow sections for content that should span multiple pages. ### Page background example ```json theme={null} { "type": "page", "align": "center", "orientation": "portrait", "background": { "color": "#0f172a", "image": { "src": "/image/asset-id", "fit": "cover", "positionX": 50, "positionY": 40, "opacity": 0.35 } }, "margins": { "top": 1.5, "right": 1.5, "bottom": 1.5, "left": 1.5 }, "showHeader": false, "showFooter": false, "content": [ { "type": "h1", "text": "Annual Report", "color": "#ffffff" } ] } ``` ## Semantic layout Use a `layout` element when columns need independent content while remaining editable. This differs from flow-section columns: content does not automatically flow from one layout column into the next. ```json theme={null} { "type": "layout", "gap": 12, "style": { "backgroundColor": "#f8fafc", "border": { "width": 1, "color": "#cbd5e1", "style": "solid" }, "padding": { "top": 8, "right": 8, "bottom": 8, "left": 8 } }, "pagination": { "keepTogether": true }, "columns": [ { "width": "1fr", "verticalAlign": "top", "content": [ { "type": "h2", "text": "Summary" }, { "type": "text", "text": "Editable left-column content." } ] }, { "width": "2fr", "verticalAlign": "center", "style": { "backgroundColor": "#ecfdf5" }, "content": [ { "type": "text", "text": "Wider right-column content." } ] } ] } ``` ### Semantic layout properties | Property | Type | Required | Description | | ------------ | ------ | -------- | -------------------------------------------------------------- | | `type` | string | **Yes** | Must be `\"layout\"`. | | `columns` | array | **Yes** | 1–4 independently editable columns. | | `gap` | number | No | Gap between columns in points. | | `style` | object | No | Background, border, and per-side padding for the whole layout. | | `spacing` | object | No | Spacing before and after the layout. | | `pagination` | object | No | Page-break and keep controls. | Column `width` accepts fixed centimeters as a number, percentages such as `\"35%\"`, fractional units such as `\"1fr\"`, or `\"auto\"`. Each column can define `verticalAlign` (`top`, `center`, `bottom`) and its own background, border, and padding. Autype maps semantic layouts to fixed-width DOCX tables so their content remains editable in Word and LibreOffice. ## Fixed canvas Use a `canvas` element for deliberately fixed compositions such as cover pages, certificates, or decorative title panels. ```json theme={null} { "type": "canvas", "height": 100, "backgroundColor": "#0f172a", "pagination": { "pageBreakBefore": true, "keepTogether": true }, "elements": [ { "kind": "shape", "shape": "rectangle", "x": 0, "y": 0, "width": 100, "height": 100, "fillColor": "#0f172a", "zIndex": 0 }, { "kind": "text", "text": "Annual Report", "x": 10, "y": 30, "width": 80, "height": 20, "fontSize": 36, "fontWeight": "bold", "color": "#ffffff", "align": "center", "zIndex": 2 }, { "kind": "image", "src": "/image/asset-id", "x": 70, "y": 8, "width": 22, "height": 20, "fit": "contain", "zIndex": 1 } ] } ``` ### Canvas properties | Property | Type | Required | Description | | ----------------- | ------ | -------- | -------------------------------------------------- | | `type` | string | **Yes** | Must be `\"canvas\"`. | | `height` | number | **Yes** | Canvas height as 10–100% of the page content area. | | `elements` | array | **Yes** | Positioned text, image, and shape items. | | `backgroundColor` | string | No | Canvas background color. | | `spacing` | object | No | Spacing before and after the canvas. | | `pagination` | object | No | Page-break and keep controls. | Every item uses percentage-based `x`, `y`, `width`, and `height`. Common optional properties are `id`, `rotation`, `opacity`, and `zIndex`. Image items also support `fit` and `focalPoint`. Canvas output is rasterized into one high-resolution image for deterministic DOCX, LibreOffice, and PDF parity. Individual canvas items remain editable in Autype but not in the exported DOCX. Form fields are not supported inside a canvas; use semantic layout for editable text and AcroForm controls. ## Page break Forces a page break at the current position. Optionally changes the page orientation for subsequent pages. ```json theme={null} { "type": "pageBreak" } ``` With orientation change: ```json theme={null} { "type": "pageBreak", "orientation": "landscape" } ``` ### Properties | Property | Type | Required | Default | Description | | ------------- | ------ | -------- | ------- | -------------------------------------------------------------------------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"pageBreak"` | | `id` | string | No | — | Optional unique identifier. Max: 100 chars. | | `orientation` | string | No | — | Change page orientation after the break: `"portrait"` or `"landscape"`. If omitted, the current orientation is kept. | ## Spacer Adds vertical whitespace between elements. ```json theme={null} { "type": "spacer", "height": 2 } ``` The `height` can be specified as a number (line units) or a pixel string: ```json theme={null} { "type": "spacer", "height": "40px" } ``` ### Properties | Property | Type | Required | Default | Description | | -------- | ---------------- | -------- | ------- | --------------------------------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"spacer"` | | `id` | string | No | — | Optional unique identifier. Max: 100 chars. | | `height` | number \| string | No | `1` | Height as line count (0.5–50) or pixel string (e.g., `"20px"`, `"50.5px"`). | ## Complete example ```json theme={null} { "document": { "type": "pdf", "size": "A4" }, "sections": [ { "type": "page", "align": "center", "content": [ { "type": "h1", "text": "Annual Report 2025", "align": "center" }, { "type": "spacer", "height": 2 }, { "type": "text", "text": "Acme Corporation", "align": "center", "fontSize": 18 } ] }, { "type": "flow", "content": [ { "type": "toc", "title": "Table of Contents" }, { "type": "pageBreak" } ] }, { "type": "flow", "content": [ { "type": "h1", "text": "Executive Summary" }, { "type": "text", "text": "This section provides an overview of the year." } ] }, { "type": "flow", "columns": { "count": 2, "space": 1.5 }, "content": [ { "type": "h1", "text": "Financial Data" }, { "type": "text", "text": "Left column content..." }, { "type": "text", "text": "Right column content..." } ] }, { "type": "flow", "content": [ { "type": "pageBreak", "orientation": "landscape" }, { "type": "h1", "text": "Appendix: Wide Tables" }, { "type": "text", "text": "This section uses landscape orientation for wide tables." } ] } ] } ``` # Lists Source: https://docs.autype.com/api-reference/json-syntax/sections/lists Ordered and unordered lists with nested items List elements render ordered (numbered) or unordered (bullet) lists with support for nested sub-lists. ## Basic list ```json theme={null} { "type": "list", "ordered": false, "items": ["First item", "Second item", "Third item"] } ``` Ordered list: ```json theme={null} { "type": "list", "ordered": true, "items": ["Step one", "Step two", "Step three"] } ``` ## Properties | Property | Type | Required | Default | Description | | ------------ | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------ | | `type` | string | **Yes** | — | Must be `"list"` | | `id` | string | No | — | Unique identifier. Auto-generated if not provided. Max: 100 chars. | | `ordered` | boolean | No | `false` | `true` = numbered list, `false` = bullet list. | | `start` | integer | No | `1` | Starting number for an ordered list. | | `items` | array | **Yes** | — | Array of list items. Min: 1, max: 50 items. | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. See [Pagination](/api-reference/json-syntax/sections/layout#pagination-controls). | ## List items Each item in the `items` array can be either a simple string or an object with nested sub-items. ### Simple string items ```json theme={null} { "type": "list", "items": ["Apple", "Banana", "Cherry"] } ``` Each string item: 1–1000 characters. Supports inline formatting (`**bold**`, `*italic*`, `{{varName}}`, etc.). ### Object items with nesting Use object items to create nested sub-lists: ```json theme={null} { "type": "list", "ordered": true, "items": [ "Simple item", { "text": "Item with sub-list", "items": ["Sub-item A", "Sub-item B"] }, { "text": "Item with mixed nesting", "children": { "ordered": false, "items": ["Unordered sub-item", "Another sub-item"] } } ] } ``` ### Task-list items Set `checked` on an object item. Omit it for a regular list item: ```json theme={null} { "type": "list", "ordered": false, "items": [ { "text": "Completed check", "checked": true }, { "text": "Open check", "checked": false }, "Regular bullet" ] } ``` ### Object item properties | Property | Type | Required | Description | | ---------- | ------- | -------- | ------------------------------------------------------------------------------- | | `text` | string | **Yes** | Item text content. 1–1000 chars. Supports inline formatting. | | `checked` | boolean | No | Task state: `true` renders checked, `false` unchecked. Omit for a regular item. | | `items` | array | No | Legacy nested items (inherit parent's `ordered` type). Max: 20 items. | | `children` | object | No | Nested list with its own `ordered` property (supports mixed ordered/unordered). | ### Children object The `children` property allows a nested sub-list with a different list type than the parent: | Property | Type | Required | Description | | --------- | ------- | -------- | ----------------------------------------------------------- | | `ordered` | boolean | **Yes** | `true` = numbered, `false` = bullet. | | `items` | array | **Yes** | Array of list items (same format as parent). Max: 20 items. | Use `children` instead of `items` when you need the nested list to have a different type (e.g., bullet sub-list inside a numbered list). The legacy `items` format always inherits the parent's `ordered` type. ## Inline formatting in list items List item text supports the same [inline formatting](/api-reference/json-syntax/sections/text-elements#inline-formatting) as text elements: ```json theme={null} { "type": "list", "items": [ "This is **bold** and *italic* text", "This is ++underlined++ and ~~strikethrough~~", "This is ==highlighted== or ==colored=={#FFCC00}", "Inline code: `render()`", "Visit [our website](https://example.com)", "Variable: {{companyName}}", "Citation: @[smith2023, p. 42]", "Abbreviation: ~API~" ] } ``` ## Complete example ```json theme={null} { "document": { "type": "pdf", "size": "A4" }, "variables": { "projectName": "Autype" }, "sections": [ { "type": "flow", "content": [ { "type": "h1", "text": "Project Plan" }, { "type": "list", "ordered": true, "items": [ { "text": "Phase 1: Research", "children": { "ordered": false, "items": ["Market analysis", "Competitor review", "User interviews"] } }, { "text": "Phase 2: Development", "children": { "ordered": false, "items": ["Backend ~API~", "Frontend UI", "Testing"] } }, "Phase 3: Launch {{projectName}}" ] }, { "type": "h2", "text": "Key Features" }, { "type": "list", "ordered": false, "items": [ "**Fast** rendering engine", "*Multiple* output formats (PDF, DOCX, ODT)", "Template **variable** support" ] } ] } ] } ``` # Media & Code Source: https://docs.autype.com/api-reference/json-syntax/sections/media Images, charts, QR codes, code blocks, and math equations Media elements embed visual and technical content into your document: images, charts, QR codes, code blocks, and LaTeX math equations. ## Image Embeds an image from a URL or uploaded image path. ```json theme={null} { "type": "image", "src": "https://example.com/photo.jpg", "width": 400, "height": 300, "align": "center", "fit": "cover", "focalPoint": { "x": 55, "y": 35 }, "opacity": 0.95, "caption": "Company headquarters", "anchor": "fig-hq" } ``` ### Properties | Property | Type | Required | Default | Description | | ------------ | ------ | -------- | ------- | ------------------------------------------------------------------------------------------------------------ | | `type` | string | **Yes** | — | Must be `"image"` | | `id` | string | No | — | Unique identifier. Max: 100 chars. | | `src` | string | **Yes** | — | Image URL or uploaded image path (`/image/...`). Max: 500 chars. | | `title` | string | No | — | Optional image title, separate from the visible caption. Max: 500 chars. | | `width` | number | No | — | Width in px (10–2000). | | `height` | number | No | — | Height in px (10–2000). | | `align` | string | No | — | Alignment: `"left"`, `"center"`, `"right"` | | `fit` | string | No | — | `"contain"`, `"cover"`, or `"fill"` within explicit dimensions. | | `crop` | object | No | — | Percentage crop rectangle with `x`, `y`, `width`, and `height`. | | `focalPoint` | object | No | — | Percentage focal point with `x` and `y`, primarily for `fit: "cover"`. | | `opacity` | number | No | `1` | Image opacity from `0` to `1`. | | `caption` | string | No | — | Caption for figure numbering (e.g., `"Sales chart 2024"`). Max: 500 chars. | | `anchor` | string | No | — | Anchor ID for internal references. Pattern: `^[a-zA-Z][a-zA-Z0-9_-]*$`. Max: 100 chars. | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. See [Pagination](/api-reference/json-syntax/sections/layout#pagination-controls). | `crop` must stay inside the source image: `x + width` and `y + height` may not exceed `100`. Images with a `caption` are automatically numbered (e.g., "Figure 1: Company headquarters"). The numbering prefix and style are controlled by `defaults.styles.figureCaption`. See [Defaults — Figure caption style](/api-reference/json-syntax/defaults#figure-caption-style). ### Placeholder images Autype provides its own cacheable placeholder endpoint for examples, templates, and sample records. It does not contact an external image service: ```text theme={null} GET https://api.autype.com/api/v1/assets/placeholder?width=600&height=200&background=e5e7eb&foreground=6b7280&text=Preview ``` `width` and `height` accept integers from `16` to `2048`. `background` and `foreground` accept three- or six-digit hexadecimal colors without the `#`. `text` is optional and limited to 120 characters. Persisted Autype documents may use the environment-independent relative form `/api/v1/assets/placeholder?...`; the editor and export pipeline resolve it to the configured API host. ### Cross-referencing images Images with a `caption` and `anchor` can be referenced in text using [internal references](/api-reference/json-syntax/sections/text-elements#internal-reference-display-modes): ```json theme={null} { "sections": [{ "type": "flow", "content": [ { "type": "image", "src": "https://example.com/diagram.png", "caption": "System architecture", "anchor": "fig-arch" }, { "type": "text", "text": "As shown in [](#fig-arch), the system consists of three layers." }, { "type": "text", "text": "Refer to [Figure {num}](#fig-arch) for the full diagram." }, { "type": "text", "text": "The [architecture diagram](#fig-arch) illustrates the design." } ] }] } ``` The three reference styles: `[](#anchor)` (auto — shows caption with number), `[Figure {num}](#anchor)` (template — replaces `{num}`), and `[custom text](#anchor)` (custom — shows your text as a link). ## Chart Renders a Chart.js chart as an image. Supports line, bar, pie, doughnut, radar, polar area, scatter, and bubble charts. ```json theme={null} { "type": "chart", "width": 600, "height": 400, "caption": "Quarterly revenue", "config": { "type": "bar", "data": { "labels": ["Q1", "Q2", "Q3", "Q4"], "datasets": [ { "label": "2024", "data": [100, 120, 115, 140] }, { "label": "2023", "data": [80, 95, 90, 110] } ] }, "options": {} } } ``` ### Chart element properties | Property | Type | Required | Default | Description | | ------------ | ------- | -------- | ------- | ---------------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"chart"` | | `id` | string | No | — | Unique identifier. Max: 100 chars. | | `config` | object | **Yes** | — | Chart.js configuration. See [Chart config](#chart-config). | | `width` | number | No | — | Chart width in px (10–2000). | | `height` | number | No | — | Chart height in px (10–2000). | | `align` | string | No | — | Alignment: `"left"`, `"center"`, `"right"` | | `showLegend` | boolean | No | — | Convenience override for the Chart.js legend. | | `showGrid` | boolean | No | — | Convenience override for chart grid lines. | | `caption` | string | No | — | Caption for figure numbering. Max: 500 chars. | | `anchor` | string | No | — | Anchor ID for internal references. Max: 100 chars. | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. | ### Chart config The `config` object follows the [Chart.js](https://www.chartjs.org/docs/latest/) configuration format: | Property | Type | Required | Description | | ----------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------- | | `type` | string | **Yes** | Chart type: `"line"`, `"bar"`, `"pie"`, `"doughnut"`, `"radar"`, `"polarArea"`, `"scatter"`, `"bubble"` | | `width` | number | No | Render width in px (50–4000). | | `height` | number | No | Render height in px (50–4000). | | `backgroundColor` | string | No | Chart background color. | | `data` | object | **Yes** | Chart data with `labels` and `datasets`. | | `options` | object | No | Chart.js options (axes, legend, tooltips, etc.). | ### Chart dataset | Property | Type | Required | Description | | -------- | ------ | -------- | --------------------------------------------------------------------------- | | `label` | string | No | Dataset label for the legend. | | `data` | array | **Yes** | Data points. Numbers, strings, or `{x, y, r}` objects (for scatter/bubble). | ### Variable substitution in charts Chart `data.labels` and `data.datasets[].data` arrays support `{{varName}}` placeholders. At render time, variable references are resolved: * **Number variables** are substituted as numeric values directly (e.g., `{{revenue}}` → `1250.00`) * **Text variables** containing a numeric string are parsed to numbers (e.g., `"1500"` → `1500`) * For `{x, y}` point objects, both `x` and `y` fields support variable substitution ```json theme={null} { "variables": { "q1Revenue": { "type": "number", "value": 150000 }, "q2Revenue": { "type": "number", "value": 180000 } }, "sections": [{ "type": "flow", "content": [{ "type": "chart", "config": { "type": "bar", "data": { "labels": ["Q1", "Q2"], "datasets": [{ "label": "Revenue", "data": ["{{q1Revenue}}", "{{q2Revenue}}"] }] } } }] }] } ``` Default chart colors are configured via `defaults.chart.colors` and `defaults.chart.borderColors`. See [Defaults — Chart defaults](/api-reference/json-syntax/defaults#chart-defaults). ## QR Code Generates a QR code image. Supports URL, WiFi, vCard, and arbitrary text data types. ### URL QR code ```json theme={null} { "type": "qrcode", "qrType": "url", "data": { "url": "https://example.com" }, "size": 200, "align": "center" } ``` ### WiFi QR code ```json theme={null} { "type": "qrcode", "qrType": "wifi", "data": { "ssid": "MyNetwork", "password": "secret123", "encryption": "WPA", "hidden": false } } ``` ### vCard QR code ```json theme={null} { "type": "qrcode", "qrType": "vcard", "data": { "firstName": "John", "lastName": "Smith", "organization": "Acme Inc", "phone": "+1234567890", "email": "john@example.com", "url": "https://example.com" } } ``` ### Text QR code ```json theme={null} { "type": "qrcode", "qrType": "text", "data": { "text": "Any text payload" }, "caption": "Scan for details" } ``` ### QR code base properties | Property | Type | Required | Default | Description | | ----------------- | ------ | -------- | ------- | -------------------------------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"qrcode"` | | `id` | string | No | — | Unique identifier. Max: 100 chars. | | `qrType` | string | **Yes** | — | QR data type: `"url"`, `"wifi"`, `"vcard"`, or `"text"` | | `data` | object | **Yes** | — | QR code data (varies by `qrType`). | | `size` | number | No | — | QR code size in px (50–1000). | | `errorCorrection` | string | No | — | Error correction level: `"L"` (7%), `"M"` (15%), `"Q"` (25%), `"H"` (30%). | | `align` | string | No | — | Alignment: `"left"`, `"center"`, `"right"` | | `caption` | string | No | — | Caption below the QR code. Max: 500 chars. | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. | **URL data** (`qrType: "url"`) | Property | Type | Required | Description | | -------- | ------ | -------- | ------------------------------- | | `url` | string | **Yes** | URL to encode. Max: 2000 chars. | **WiFi data** (`qrType: "wifi"`) | Property | Type | Required | Description | | ------------ | ------- | -------- | ------------------------------------------------ | | `ssid` | string | **Yes** | Network name. Max: 32 chars. | | `password` | string | No | Network password. Max: 63 chars. | | `encryption` | string | No | Encryption type: `"WPA"`, `"WEP"`, or `"nopass"` | | `hidden` | boolean | No | Hidden network flag. | **vCard data** (`qrType: "vcard"`) | Property | Type | Required | Description | | -------------- | ------ | -------- | ------------------------------ | | `firstName` | string | No | First name. Max: 100 chars. | | `lastName` | string | No | Last name. Max: 100 chars. | | `organization` | string | No | Organization. Max: 100 chars. | | `phone` | string | No | Phone number. Max: 50 chars. | | `email` | string | No | Email address. Max: 100 chars. | | `url` | string | No | Website URL. Max: 200 chars. | | `address` | string | No | Address. Max: 200 chars. | | `note` | string | No | Note. Max: 500 chars. | **Text data** (`qrType: "text"`) | Property | Type | Required | Description | | -------- | ------ | -------- | --------------------------------------------- | | `text` | string | **Yes** | Arbitrary payload to encode. Max: 2000 chars. | ## Code block Renders a syntax-highlighted code block. ```json theme={null} { "type": "code", "language": "javascript", "code": "function hello() {\n console.log('Hello, world!');\n}" } ``` ### Properties | Property | Type | Required | Default | Description | | ----------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `type` | string | **Yes** | — | Must be `"code"` | | `id` | string | No | — | Unique identifier. Max: 100 chars. | | `code` | string | **Yes** | — | Source code content. 1–20000 chars. | | `language` | string | No | — | Programming language for syntax highlighting (e.g., `"javascript"`, `"python"`, `"sql"`), or a [diagram language](#diagrams) (e.g., `"mermaid"`, `"plantuml"`). Max: 50 chars. | | `renderAsImage` | boolean | No | — | Render the code block as an image. For [diagram languages](#diagrams), defaults to `true`. Set to `false` to show diagram source as code. | | `backgroundColor` | string | No | — | Background color in hex (`#RGB`, `#RRGGBB`, or `#RRGGBBAA`). | | `width` | number | No | — | Width in px (10–2000). Only applies when `renderAsImage` is true. | | `align` | string | No | — | Alignment: `"left"`, `"center"`, `"right"` | | `caption` | string | No | — | Caption for auto-numbering. Code blocks appear in the List of Code Listings; diagram blocks appear in the List of Figures. Max: 500 chars. | | `anchor` | string | No | — | Anchor ID for internal references. Pattern: `^[a-zA-Z][a-zA-Z0-9_-]*$`. Max: 100 chars. | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. | ### Captions and anchors Code blocks support `caption` and `anchor` for auto-numbering and cross-references: ```json theme={null} { "type": "code", "language": "typescript", "code": "interface Config {\n apiUrl: string;\n timeout: number;\n}", "caption": "Configuration interface", "anchor": "code-config" } ``` Code blocks with a `caption` are automatically numbered (e.g., "Listing 1: Configuration interface") and appear in the [List of Code Listings](/api-reference/json-syntax/sections/indices#list-of-code-listings). The numbering prefix and style are controlled by `defaults.styles.codeCaption`. See [Defaults — Code caption style](/api-reference/json-syntax/defaults#code-caption-style). Default code block styling is configured via `defaults.styles.code`. See [Defaults — Code style](/api-reference/json-syntax/defaults#code-style). ## Diagrams Code blocks with a supported diagram language are automatically rendered as images in the exported document. ### Mermaid example ```json theme={null} { "type": "code", "language": "mermaid", "code": "graph TD\n A[Start] --> B{Decision?}\n B -->|Yes| C[Action 1]\n B -->|No| D[Action 2]\n C --> E[End]\n D --> E", "caption": "System flowchart", "anchor": "fig-flowchart", "align": "center" } ``` When the `language` is a supported diagram type, the code content is rendered as a PNG image. Diagrams with a `caption` are auto-numbered as figures (e.g., "Figure 1: System flowchart") and appear in the [List of Figures](/api-reference/json-syntax/sections/indices#list-of-figures). ### Supported diagram languages | Language | `language` value | Description | | ---------------------------------------------------------------- | ----------------------- | --------------------------------------------------------------------- | | [Mermaid](https://github.com/knsv/mermaid) | `"mermaid"` | Flowcharts, sequence diagrams, class diagrams, Gantt charts, and more | | [PlantUML](https://github.com/plantuml/plantuml) | `"plantuml"` | UML diagrams (class, sequence, activity, use case, etc.) | | [GraphViz](https://www.graphviz.org/) | `"graphviz"` or `"dot"` | Graph and network visualizations | | [Structurizr](https://github.com/structurizr/dsl) | `"structurizr"` | C4 architecture diagrams | | [BlockDiag](https://github.com/blockdiag/blockdiag) | `"blockdiag"` | Simple block diagrams | | [SeqDiag](https://github.com/blockdiag/seqdiag) | `"seqdiag"` | Sequence diagrams | | [ActDiag](https://github.com/blockdiag/actdiag) | `"actdiag"` | Activity diagrams with swimlanes | | [NwDiag](https://github.com/blockdiag/nwdiag) | `"nwdiag"` | Network topology diagrams | | [PacketDiag](https://github.com/blockdiag/nwdiag) | `"packetdiag"` | Packet/protocol header diagrams | | [C4 with PlantUML](https://github.com/RicardoNiepel/C4-PlantUML) | `"c4plantuml"` | C4 architecture model using PlantUML syntax | | [DBML](https://github.com/softwaretechnik-berlin/dbml-renderer) | `"dbml"` | Database markup language for ER diagrams | | [Ditaa](https://ditaa.sourceforge.net) | `"ditaa"` | ASCII art to diagram conversion | | [ERD](https://github.com/BurntSushi/erd) | `"erd"` | Entity-relationship diagrams | | [TikZ](https://github.com/pgf-tikz/pgf) | `"tikz"` | LaTeX-based technical drawings | | [UMlet](https://github.com/umlet/umlet) | `"umlet"` | UML diagrams | | [Vega](https://github.com/vega/vega) | `"vega"` | Declarative data visualizations | | [WireViz](https://github.com/formatc1702/WireViz) | `"wireviz"` | Wiring harness and cable documentation | ### Rendering diagram source as code (renderAsImage=false) Set `renderAsImage` to `false` to display the diagram source code as a regular code block instead of rendering it as an image: ```json theme={null} { "type": "code", "language": "mermaid", "code": "graph TD\n A --> B\n B --> C", "renderAsImage": false, "caption": "Mermaid source code", "anchor": "code-mermaid-src" } ``` When `renderAsImage` is `false` on a diagram code block, the block is treated as a regular code listing. If it has a `caption`, it appears in the **List of Code Listings** instead of the List of Figures. The global default for `renderAsImage` can be set via `defaults.styles.code.renderAsImage` (default: `true`). The element-level property always overrides the global default. ## Math (LaTeX) Renders a block-level LaTeX math equation as a standalone element. Math is only supported as a block-level element. Inline math within paragraphs is not currently supported. ```json theme={null} { "type": "math", "latex": "E = mc^2", "align": "center" } ``` Block-level equation: ```json theme={null} { "type": "math", "latex": "\\int_{0}^{\\infty} e^{-x^2} dx = \\frac{\\sqrt{\\pi}}{2}", "align": "center" } ``` ### Properties | Property | Type | Required | Default | Description | | --------------- | ------- | -------- | ------- | ----------------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"math"` | | `id` | string | No | — | Unique identifier. Max: 100 chars. | | `latex` | string | **Yes** | — | LaTeX math expression. 1–5000 chars. | | `align` | string | No | — | Alignment: `"left"`, `"center"`, `"right"` | | `renderAsImage` | boolean | No | — | Render math as image for better cross-format compatibility. | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. | Default math styling is configured via `defaults.styles.math`. See [Defaults — Math style](/api-reference/json-syntax/defaults#math-style). ## Complete example ```json theme={null} { "document": { "type": "pdf", "size": "A4" }, "defaults": { "chart": { "colors": ["#4BC0C0", "#FF6384", "#36A2EB"] }, "styles": { "figureCaption": { "fontSize": 9, "fontStyle": "italic", "prefix": "Fig." } } }, "sections": [ { "type": "flow", "content": [ { "type": "h1", "text": "Technical Report" }, { "type": "image", "src": "https://example.com/architecture.png", "width": 500, "align": "center", "caption": "System architecture overview", "anchor": "fig-arch" }, { "type": "text", "text": "The architecture shown in [Fig. 1](#fig-arch) consists of three layers." }, { "type": "chart", "caption": "Performance benchmarks", "config": { "type": "line", "data": { "labels": ["Jan", "Feb", "Mar", "Apr"], "datasets": [{ "label": "Requests/s", "data": [1200, 1500, 1800, 2100] }] } }, "width": 500, "height": 300 }, { "type": "h2", "text": "Implementation" }, { "type": "code", "language": "typescript", "code": "async function render(doc: Document): Promise {\n const result = await engine.process(doc);\n return result.toBuffer();\n}" }, { "type": "h2", "text": "Mathematical Model" }, { "type": "math", "latex": "f(x) = \\sum_{n=0}^{\\infty} \\frac{f^{(n)}(a)}{n!}(x-a)^n", "align": "center" }, { "type": "h2", "text": "Contact" }, { "type": "qrcode", "qrType": "vcard", "data": { "firstName": "John", "lastName": "Smith", "email": "john@example.com" }, "size": 150, "align": "center" } ] } ] } ``` # Tables Source: https://docs.autype.com/api-reference/json-syntax/sections/tables Table elements with headers, rows, cell formatting, captions, and variable data binding Tables display structured data in rows and columns with optional headers, styling, captions, and variable data binding. ## Basic table ```json theme={null} { "type": "table", "headers": ["Name", "Role", "Email"], "rows": [ ["Alice", "Engineer", "alice@example.com"], ["Bob", "Designer", "bob@example.com"] ] } ``` ## Properties | Property | Type | Required | Default | Description | | -------------- | --------- | -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `type` | string | **Yes** | — | Must be `"table"` | | `id` | string | No | — | Unique identifier. Auto-generated if not provided. Max: 100 chars. | | `headers` | array | No | — | Header row cells. Max: 20 cells. | | `rows` | array | No | — | Data rows. Each row is an array of cells. Max: 100 rows, 20 cells per row. | | `columnWidths` | array | No | — | Column width definitions. Supports fixed centimeters as numbers, percentages (`"30%"`), flexible units (`"1fr"`), and `"auto"`. Must not contain more entries than the table has columns. | | `align` | string | No | `"left"` | Horizontal table alignment: `"left"`, `"center"`, or `"right"`. | | `dataSource` | string | No | — | Bind to a table variable instead of inline `rows`. See [Variable data binding](#variable-data-binding). | | `mapping` | string\[] | No | — | Column keys to select from the data source. Max: 20 items. | | `caption` | string | No | — | Caption text for table numbering (e.g., `"Revenue by quarter"`). Max: 500 chars. | | `anchor` | string | No | — | Anchor ID for internal references (e.g., `"tab-revenue"`). Pattern: `^[a-zA-Z][a-zA-Z0-9_-]*$`. Max: 100 chars. | | `invisible` | boolean | No | `false` | Hide all borders and backgrounds (borderless table). | | `hideHeaders` | boolean | No | `false` | Hide the header row. | | `style` | object | No | — | Inline table style override. See [Table style](#table-style). | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | Page-break and keep hints. See [Pagination](/api-reference/json-syntax/sections/layout#pagination-controls). | ## Cell format Each cell in `headers` and `rows` can be either a simple string or a cell object: **Simple string:** ```json theme={null} ["Alice", "Engineer", "alice@example.com"] ``` **Cell object** (for alignment, an embedded image, or a form field): ```json theme={null} [ { "text": "Alice", "align": "left" }, { "text": "Engineer", "align": "center" }, { "image": { "src": "https://example.com/photo.png", "width": 40, "height": 40 } } ] ``` ### Cell object properties | Property | Type | Description | | ----------- | ------ | ------------------------------------------------------------------------ | | `text` | string | Cell text content. Max: 1000 chars. Supports `{{varName}}` substitution. | | `image` | object | Embedded cell image (see below). | | `formField` | object | One nested form field (see below). | | `align` | string | Cell alignment: `"left"`, `"center"`, or `"right"` | ### Cell image properties | Property | Type | Description | | --------- | ------ | --------------------------- | | `src` | string | Image URL. Max: 2000 chars. | | `caption` | string | Alt text. Max: 200 chars. | | `width` | number | Width in px (10–1000). | | `height` | number | Height in px (10–1000). | When a cell contains exactly one `{{varName}}` reference that resolves to an image variable, the cell is automatically rendered as an image. See [Variables — Image variables in table cells](/api-reference/json-syntax/variables#image-variables-in-table-cells). ### Form fields in table cells A cell may contain one form field instead of text or an image: ```json theme={null} { "formField": { "type": "formField", "name": "approval", "fieldType": "checkbox", "options": ["Approved"] }, "align": "left" } ``` A cell may contain text, an image, or a form field, but not more than one of these at the same time. See the complete [Form Fields reference](/api-reference/json-syntax/sections/form-fields). ## Column widths Use `columnWidths` when specific columns need a fixed or proportional width. ```json theme={null} { "type": "table", "headers": ["Item", "Description", "Price"], "columnWidths": [4, "1fr", "2fr"], "rows": [ ["A-100", "Short description", "€49"], ["B-200", "Longer product description", "€79"] ] } ``` Supported width values: | Value | Meaning | | ---------------- | ---------------------------------------- | | `4` | Fixed width in centimeters. | | `"30%"` | Percentage of the available table width. | | `"1fr"`, `"2fr"` | Flexible share of the remaining width. | | `"auto"` | Automatic/flexible width. | Mixed layouts are supported. In `[4, "1fr", "2fr"]`, the first column is fixed at `4cm`; the remaining width is split into three shares, one for column 2 and two for column 3. If fewer widths than columns are provided, remaining columns are treated as `"auto"`. If more widths than columns are provided, validation fails. ## Variable data binding Instead of defining `rows` inline, bind a table to a table variable via `dataSource`. Use `mapping` to select and reorder columns. ```json theme={null} { "variables": { "employees": { "type": "table", "columns": ["name", "department", "email", "salary"], "data": [ ["Alice", "Engineering", "alice@example.com", "$120k"], ["Bob", "Marketing", "bob@example.com", "$95k"] ] } }, "sections": [{ "type": "flow", "content": [{ "type": "table", "headers": ["Name", "Department"], "dataSource": "employees", "mapping": ["name", "department"] }] }] } ``` When `mapping` is provided, only the specified columns (matched by name against the variable's `columns`) are included. Without `mapping`, all data columns are used as-is. ## Table style Override the default table styling inline via the `style` property. This has the same structure as `defaults.styles.table`. ```json theme={null} { "type": "table", "headers": ["Plan", "Price"], "rows": [["Starter", "$9"], ["Pro", "$29"]], "style": { "borders": { "outer": { "width": 1, "color": "#000000", "style": "solid" }, "inner": { "width": 0.5, "color": "#DDDDDD", "style": "solid" } }, "header": { "backgroundColor": "#1a1a2e", "color": "#FFFFFF", "fontWeight": "bold" }, "rows": { "alternateBackgroundColor": "#F5F5F5" }, "cellPadding": { "top": 6, "right": 8, "bottom": 6, "left": 8 } } } ``` **borders.outer / borders.inner** | Property | Type | Description | | -------- | ------ | ------------------------------------ | | `width` | number | Border width in pt (0–10). | | `color` | string | Border color in hex. | | `style` | string | `"solid"`, `"dashed"`, or `"dotted"` | **header** | Property | Type | Description | | ----------------- | ------ | ---------------------------------- | | `backgroundColor` | string | Header background color in hex. | | `color` | string | Header text color in hex. | | `fontSize` | number | Header font size in pt (6–72). | | `fontWeight` | string | `"normal"` or `"bold"` | | `fontStyle` | string | `"normal"` or `"italic"` | | `align` | string | `"left"`, `"center"`, or `"right"` | **rows** | Property | Type | Description | | -------------------------- | ------ | -------------------------------------------- | | `backgroundColor` | string | Row background color in hex. | | `alternateBackgroundColor` | string | Alternate row background for striped tables. | | `color` | string | Row text color in hex. | | `fontSize` | number | Row font size in pt (6–72). | | `fontWeight` | string | `"normal"` or `"bold"` | | `fontStyle` | string | `"normal"` or `"italic"` | | `align` | string | `"left"`, `"center"`, or `"right"` | **cellPadding** | Property | Type | Description | | -------- | ------ | ---------------------------- | | `top` | number | Top padding in pt (0–50). | | `right` | number | Right padding in pt (0–50). | | `bottom` | number | Bottom padding in pt (0–50). | | `left` | number | Left padding in pt (0–50). | ## Captions and anchors Add a `caption` for automatic table numbering and an `anchor` for cross-referencing. ```json theme={null} { "sections": [{ "type": "flow", "content": [ { "type": "table", "caption": "Quarterly revenue", "anchor": "tab-revenue", "headers": ["Q1", "Q2", "Q3", "Q4"], "rows": [["$100k", "$120k", "$115k", "$140k"]] }, { "type": "text", "text": "As shown in [Table 1](#tab-revenue), revenue grew steadily." } ] }] } ``` The caption prefix (e.g., "Table") and style are controlled by `defaults.styles.tableCaption`. See [Defaults — Table caption style](/api-reference/json-syntax/defaults#table-caption-style). ## Defaults Tables without an inline `style` inherit from `defaults.styles.table`: ```json theme={null} { "defaults": { "styles": { "table": { "borders": { "outer": { "width": 1, "color": "#000000" }, "inner": { "width": 0.5, "color": "#DDDDDD" } }, "header": { "backgroundColor": "#F0F0F0", "fontWeight": "bold" }, "rows": { "alternateBackgroundColor": "#FAFAFA" }, "cellPadding": { "top": 4, "right": 6, "bottom": 4, "left": 6 } }, "tableCaption": { "fontSize": 9, "fontStyle": "italic", "prefix": "Table" } } } } ``` # Text Elements Source: https://docs.autype.com/api-reference/json-syntax/sections/text-elements Headings, paragraphs, and inline text formatting Text elements are the primary content building blocks. They include headings (`h1`–`h6`), paragraphs (`text`), and secondary text (`text2`). ## Headings (h1–h6) Six heading levels for document structure. Headings are used for table of contents generation, heading numbering, and internal references. ```json theme={null} { "type": "h1", "text": "Chapter 1: Introduction" } { "type": "h2", "text": "1.1 Background", "color": "#333333" } { "type": "h3", "text": "1.1.1 History", "fontWeight": "normal" } ``` ## Paragraphs (text, text2) Normal paragraphs use `type: "text"`. Secondary/smaller text uses `type: "text2"` — useful for footnotes, captions, or fine print. ```json theme={null} { "type": "text", "text": "This is a normal paragraph with body text." } { "type": "text2", "text": "This is secondary text, typically rendered smaller." } ``` ## Properties All text element types (`h1`–`h6`, `text`, `text2`) share the same properties: | Property | Type | Required | Default | Description | | ----------------- | ------ | -------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------- | | `type` | string | **Yes** | — | Element type: `"h1"`, `"h2"`, `"h3"`, `"h4"`, `"h5"`, `"h6"`, `"text"`, or `"text2"` | | `id` | string | No | auto | Unique identifier. Auto-generated if not provided. Max: 100 chars. | | `text` | string | **Yes** | — | Text content. Supports inline formatting (see below). 1–5000 chars. | | `fontFamily` | string | No | `"Arial"` | Font family override. Max: 100 chars. | | `fontSize` | number | No | `11` | Font size in pt (6–72). | | `fontWeight` | string | No | `"normal"` | `"normal"` or `"bold"` | | `fontStyle` | string | No | `"normal"` | `"normal"` or `"italic"` | | `align` | string | No | `"left"` | Alignment: `"left"`, `"center"`, `"right"`, `"justify"` | | `letterSpacing` | number | No | — | Character spacing in pt (`-5` to `20`). | | `textTransform` | string | No | — | `"none"`, `"uppercase"`, `"lowercase"`, or `"capitalize"`. | | `indentLeft` | number | No | — | Left paragraph indent in mm (`0`–`100`). | | `indentRight` | number | No | — | Right paragraph indent in mm (`0`–`100`). | | `firstLineIndent` | number | No | — | First-line indent in mm (`-50`–`100`). | | `hangingIndent` | number | No | — | Hanging indent in mm (`0`–`100`). | | `backgroundColor` | string | No | — | Element background color (`#RGB`, `#RRGGBB`, or `#RRGGBBAA`). | | `color` | string | No | `"#000000"` | Text color in hex (`#RGB` or `#RRGGBB`). | | `anchor` | string | No | — | Anchor ID for internal references (**headings only**, ignored on `text`/`text2`). Pattern: `^[a-zA-Z][a-zA-Z0-9_-]*$`. Max: 100 chars. | | `spacing` | object | No | — | Spacing override with `before` and `after` in pt (0–100). | | `pagination` | object | No | — | `keepTogether`, `keepWithNext`, `pageBreakBefore`, and `widowControl` hints. | The defaults shown above (`"Arial"`, `11`, `"left"`, etc.) are the **built-in fallbacks**. In practice, values are resolved with a three-level cascade: **element property → element style** (from `defaults.styles.h1`, `defaults.styles.text`, etc.) **→ global defaults** (`defaults.fontFamily`, `defaults.fontSize`, `defaults.color`) **→ built-in fallback**. ## Inline formatting The `text` property supports inline formatting using an extended Markdown-like syntax. This is **not standard Markdown** — some syntax elements are Autype-specific. ### Text formatting | Syntax | Result | Example | | ----------------------------------- | ----------------- | ----------------------------------------------- | | `**text**` | **Bold** | `"This is **important**."` | | `*text*` or `_text_` | *Italic* | `"This is *emphasized*."` | | `++text++` | Underline | `"This is ++underlined++."` | | `~~text~~` | ~~Strikethrough~~ | `"This is ~~deleted~~."` | | `==text==` | Highlight | `"This is ==highlighted==."` | | `==text=={#FF0}` | Colored highlight | `"This is ==important=={#FFCC00}."` | | `text` | Inline text color | `"This is red."` | | `` `code` `` | Inline code | ``"Use the `render()` function."`` | Inline code (`` `...` ``) preserves its content as-is — no further formatting is parsed inside backticks. Use the `color` property for an entire text element, and the inline `...` mark for only part of the text: ```json theme={null} { "type": "text", "text": "Normal text, red text, and normal text again." } ``` Inline text color accepts hexadecimal `#RGB` or `#RRGGBB` values and can be combined with other inline marks: ```json theme={null} { "type": "text", "text": "This is **blue and bold**." } ``` ### Links and references | Syntax | Description | Example | | ----------------------- | -------------------------------- | ----------------------------------------------------- | | `[text](url)` | External hyperlink | `"Visit [Autype](https://autype.com)."` | | `[text](url "title")` | Hyperlink with title | `"See [docs](https://docs.autype.com \"API docs\")."` | | `[text](#anchor)` | Internal reference (custom text) | `"See [Chapter 1](#intro)."` | | `[](#anchor)` | Internal reference (auto) | `"See [](#fig-arch) for details."` | | `[Text {num}](#anchor)` | Internal reference (template) | `"Refer to [Figure {num}](#fig-arch)."` | ### Abbreviations, citations, footnotes, and variables | Syntax | Description | Example | | ----------------------- | -------------------------- | ------------------------------------------- | | `~ABK~` | Abbreviation reference | `"The ~API~ uses ~REST~."` | | `@[citeKey]` | Citation | `"As shown by @[smith2023]."` | | `@[citeKey, p. 42]` | Citation with page | `"See @[smith2023, p. 42]."` | | `@[citeKey, pp. 10-15]` | Citation with page range | `"Discussed in @[smith2023, pp. 10-15]."` | | `@[-citeKey]` | Citation (suppress author) | `"As shown @[-smith2023]."` → `(2023)` | | `@[citeKey!]` | Citation (author only) | `"@[smith2023!] argues that..."` → `Smith` | | `[^noteId]` | Footnote reference | `"Verified independently[^annual-report]."` | | `{{varName}}` | Variable substitution | `"Hello {{companyName}}!"` | Footnote definitions are stored in the top-level `footnotes` array. See the complete [Footnotes reference](/api-reference/json-syntax/footnotes). Citations support the following locator options after the cite key, separated by commas: | Locator | Syntax | Example | | ------- | ---------------------------- | -------------------------------------------- | | Page | `p. 42` or `page 42` | `@[smith2023, p. 42]` | | Pages | `pp. 42-45` or `pages 42-45` | `@[smith2023, pp. 42-45]` | | Chapter | `ch. 3` or `chapter 3` | `@[smith2023, ch. 3]` | | Section | `sec. 2.1` or `section 2.1` | `@[smith2023, sec. 2.1]` | | Volume | `vol. 2` or `volume 2` | `@[smith2023, vol. 2]` | | Note | `note="emphasis added"` | `@[smith2023, p. 42, note="emphasis added"]` | Prefix `-` suppresses the author name, suffix `!` shows only the author name (narrative citation). ### Combining formatting Formatting marks can be nested. Abbreviations and citations work inside formatted text: ```json theme={null} { "type": "text", "text": "This is **bold with ~API~ reference** and *italic with @[smith2023] citation*." } ``` ```json theme={null} { "type": "text", "text": "Use ==highlighted text=={#FFCC00} and `` `inline code` `` together with ++underlined++ content." } ``` ## Anchors and internal references Headings can define an `anchor` ID that other elements can reference. Images, charts, and tables can also define anchors (see their respective pages). ```json theme={null} { "sections": [{ "type": "flow", "content": [ { "type": "h1", "text": "Introduction", "anchor": "intro" }, { "type": "text", "text": "Some introductory text." }, { "type": "image", "src": "https://example.com/arch.png", "caption": "Architecture", "anchor": "fig-arch" }, { "type": "text", "text": "For background, see [Introduction](#intro)." } ] }] } ``` ### Internal reference display modes There are three ways to reference an anchor: | Syntax | Mode | Rendered as | | --------------------------- | -------- | ---------------------------------------------------------------------------------------- | | `[](#fig-arch)` | Auto | Automatically shows the target's caption with numbering (e.g., "Figure 1: Architecture") | | `[Figure {num}](#fig-arch)` | Template | Replaces `{num}` with the target's number (e.g., "Figure 1") | | `[see here](#fig-arch)` | Custom | Shows the provided text as a clickable link ("see here") | Anchor IDs must be unique across the entire document. Duplicate anchors always cause a validation error. Broken references (pointing to non-existent anchors) cause errors only in strict mode (`?strict=true`). ## Defaults Configure default styles for text elements via `defaults.styles`: ```json theme={null} { "defaults": { "fontFamily": "Noto Sans", "fontSize": 11, "color": "#333333", "styles": { "h1": { "fontSize": 24, "fontWeight": "bold", "color": "#111111", "pageBreakBefore": true }, "h2": { "fontSize": 18, "fontWeight": "bold" }, "h3": { "fontSize": 14, "fontWeight": "bold" }, "h4": { "fontSize": 12, "fontWeight": "bold" }, "text": { "fontSize": 11, "align": "justify" }, "text2": { "fontSize": 9, "color": "#666666" } } } } ``` The `pageBreakBefore` property in a heading style forces a page break before every instance of that heading level — useful for starting each chapter on a new page. ## Supported fonts The following fonts are guaranteed to be available in the rendering engine. Use these font family names in `fontFamily` properties. Using a font that is not installed in the render container will cause a **silent fallback** to the default font (`Arial`). Always use one of the listed fonts to ensure consistent output. ### Sans-serif | Font | Notes | | -------------- | ------------------------------------------------------ | | `Arial` | Classic Microsoft sans-serif, widely used | | `Arial Black` | Heavy weight display font | | `Verdana` | Highly readable, designed for screens | | `Trebuchet MS` | Humanist sans-serif | | `Carlito` | Metrically compatible with **Calibri** | | `Roboto` | Google's modern sans-serif | | `Open Sans` | Humanist sans-serif, great for body text | | `Lato` | Warm, friendly sans-serif | | `Noto Sans` | Extensive language support (CJK, Arabic, Hebrew, etc.) | | `DejaVu Sans` | Extended Unicode coverage | ### Serif | Font | Notes | | ----------------- | -------------------------------------- | | `Times New Roman` | Standard for academic documents | | `Georgia` | Elegant serif for screen readability | | `Caladea` | Metrically compatible with **Cambria** | | `Roboto Slab` | Slab serif companion to Roboto | | `Noto Serif` | Extensive language support | | `DejaVu Serif` | Extended Unicode coverage | ### Monospace | Font | Notes | | ------------------ | ------------------------------- | | `Courier New` | Classic monospace | | `Andale Mono` | Clean monospace | | `Noto Sans Mono` | Monospace with language support | | `DejaVu Sans Mono` | Extended Unicode monospace | ### Display | Font | Notes | | --------------- | ---------------------------- | | `Comic Sans MS` | Casual, comic-style | | `Impact` | Bold condensed for headlines | **MS Office compatibility:** Calibri documents render correctly using `Carlito` (metrically identical). Cambria documents render correctly using `Caladea` (metrically identical). The render engine also has hundreds of Noto language-specific variants (e.g., `Noto Sans CJK JP`, `Noto Sans Arabic`, `Noto Serif Bengali`) installed for international document support. ## Complete example ```json theme={null} { "document": { "type": "pdf", "size": "A4" }, "abbreviations": { "API": "Application Programming Interface" }, "citations": [ { "id": "smith2023", "type": "book", "title": "Document Automation", "author": [{ "family": "Smith", "given": "John" }], "issued": { "date-parts": [[2023]] } } ], "variables": { "companyName": "Acme Inc" }, "defaults": { "fontFamily": "Noto Sans", "fontSize": 11, "styles": { "h1": { "fontSize": 22, "fontWeight": "bold" }, "h2": { "fontSize": 16, "fontWeight": "bold" } } }, "sections": [ { "type": "flow", "content": [ { "type": "h1", "text": "Welcome to {{companyName}}", "anchor": "welcome" }, { "type": "text", "text": "This document was created by **{{companyName}}** using the ~API~." }, { "type": "h2", "text": "Background", "anchor": "background" }, { "type": "text", "text": "As described by @[smith2023, pp. 10-15], automation is key. See [Welcome](#welcome) for an overview." }, { "type": "text", "text": "The ==key insight== is that the `render()` function processes documents efficiently." }, { "type": "text", "text": "@[smith2023!] also argues that ++underlined++ and ~~deprecated~~ syntax should be supported." }, { "type": "text2", "text": "Note: This is secondary text with smaller font size." }, { "type": "h3", "text": "Sub-section" }, { "type": "text", "text": "Content with *italic*, **bold with ~API~ inside**, and ++underlined++ formatting." } ] } ] } ``` # Variables Source: https://docs.autype.com/api-reference/json-syntax/variables Dynamic content substitution with text, number, image, list, and table variables Variables allow you to inject dynamic content into your documents. Define variables in the top-level `variables` object and reference them using `{{varName}}` syntax in text or via `variableRef` elements. **Alternative syntax for integrations:** The API also accepts `${varName}` as an alternative to `{{varName}}` on input. This is useful when working with automation platforms like Make.com, Zapier, or n8n whose template engines conflict with the `{{...}}` syntax. Both forms are normalized to `{{...}}` internally. API responses always use `{{...}}`. **Important for Bulk Rendering:** When using the bulk render endpoints described in the [Developer API overview](/api-reference/introduction), all variables that you want to override per row **must be pre-defined** in the `variables` block of your document JSON. The bulk render only substitutes variables that already exist in the document — it does not create new ones. If a variable is only used inline in text (e.g., `{{companyName}}`) but not declared in `variables`, it will not be replaced during bulk generation. ## Defining variables The `variables` object is a key-value map where each key is the variable name and the value defines the content. Variable names must: * Start with a letter (`a-z`, `A-Z`) * Contain only letters, digits, and underscores * Be at most 50 characters long ```json theme={null} { "variables": { "companyName": "Acme Inc", "invoiceDate": "2024-01-15", "totalAmount": { "type": "number", "value": 1250.00 }, "logo": { "type": "image", "src": "https://example.com/logo.png", "width": 200, "align": "center" }, "features": { "type": "list", "items": ["Fast", "Reliable", "Secure"], "ordered": false }, "pricing": { "type": "table", "columns": ["Plan", "Price", "Features"], "data": [ ["Starter", "$9/mo", "Basic features"], ["Pro", "$29/mo", "All features"] ] } } } ``` ## Variable types ### Text variable A simple string value. Referenced via `{{varName}}` in any text content (headings, paragraphs, list items, table cells, header/footer). ```json theme={null} { "companyName": "Acme Inc", "invoiceDate": "2024-01-15" } ``` | Property | Type | Constraints | | --------- | ------ | ------------------------------------------------ | | *(value)* | string | Max: 1000 characters. Empty strings are allowed. | **Usage in text:** ```json theme={null} { "type": "text", "text": "Invoice for {{companyName}}, issued on {{invoiceDate}}." } ``` Text variable substitution works in all text content: element text, list items, table cells, and header/footer strings. ### Number variable A numeric value. Can be referenced via `{{varName}}` in text (rendered as string) or via a `variableRef` element. Useful for charts, calculations, and dynamic numeric content. ```json theme={null} { "totalAmount": { "type": "number", "value": 1250.00 }, "itemCount": { "type": "number", "value": 42 } } ``` | Property | Type | Required | Description | | -------- | ------ | -------- | ---------------------------------- | | `type` | string | **Yes** | Must be `"number"` | | `value` | number | **Yes** | Numeric value (integer or decimal) | **Usage in text:** ```json theme={null} { "type": "text", "text": "Total: {{totalAmount}} EUR" } ``` Number variables are automatically converted to strings when used in `{{varName}}` text substitution. When rendered via `variableRef`, they produce a text element. ### Image variable An image with optional dimensions and alignment. Must be referenced via a `variableRef` element or `{{varName}}` in a table cell. ```json theme={null} { "logo": { "type": "image", "src": "https://example.com/logo.png", "width": 200, "height": 80, "align": "center", "caption": "Company Logo" } } ``` | Property | Type | Required | Description | | --------- | ------ | -------- | -------------------------------------------------------------------------------------------------- | | `type` | string | **Yes** | Must be `"image"` | | `src` | string | **Yes** | Image URL. Supports uploaded image paths (`/image/...`) or public HTTP/HTTPS URLs. Max: 500 chars. | | `width` | number | No | Image width in pixels (10–2000) | | `height` | number | No | Image height in pixels (10–2000) | | `align` | string | No | Image alignment: `"left"`, `"center"`, `"right"`. Default: `"left"` | | `caption` | string | No | Caption text for figure numbering. Max: 200 chars. | ### List variable An ordered or unordered list of string items. ```json theme={null} { "features": { "type": "list", "items": ["Fast rendering", "Multiple formats", "Template variables"], "ordered": false } } ``` | Property | Type | Required | Description | | --------- | --------- | -------- | -------------------------------------------------------------------------------------- | | `type` | string | **Yes** | Must be `"list"` | | `items` | string\[] | **Yes** | Array of list item strings. Max: 100 items, 1000 chars each. Empty arrays are allowed. | | `ordered` | boolean | No | `true` = numbered list, `false` = bullet list (default) | ### Table variable A 2D data array with optional named columns. Can be used with `variableRef` or bound to a table element via `dataSource`. ```json theme={null} { "pricing": { "type": "table", "columns": ["Plan", "Price", "Features"], "data": [ ["Starter", "$9/mo", "Basic features"], ["Pro", "$29/mo", "All features"], ["Enterprise", "Custom", "Everything + support"] ] } } ``` | Property | Type | Required | Description | | --------- | ------------ | -------- | -------------------------------------------------------------------------------------------------- | | `type` | string | **Yes** | Must be `"table"` | | `columns` | string\[] | No | Column keys for named access. Max: 20 columns, 50 chars each. | | `data` | string\[]\[] | **Yes** | 2D array of cell values. Max: 100 rows, 20 columns, 1000 chars per cell. Empty arrays are allowed. | ## Referencing variables ### Inline text substitution Use `{{varName}}` anywhere in text content. **Text variables** (strings) and **number variables** are substituted inline. Number values are automatically converted to their string representation. Non-text/non-number variables and undefined references are left as-is. ```json theme={null} { "sections": [{ "type": "flow", "content": [ { "type": "h1", "text": "Invoice for {{companyName}}" }, { "type": "text", "text": "Date: {{invoiceDate}}" } ] }] } ``` Variable substitution also works in: * List items (both string items and `text` property of object items) * Table cells (both string cells and `text` property of object cells) * Header/footer content (both simple strings and rich text `content` arrays) ### variableRef element The `variableRef` element renders a variable as a full content element. The rendering type is determined automatically by the variable's type: * **Text variable** → rendered as a `text` element * **Number variable** → rendered as a `text` element (value converted to string) * **Image variable** → rendered as an `image` element (with alignment if specified) * **List variable** → rendered as a `list` element * **Table variable** → rendered as a `table` element (columns become headers, data becomes rows) ```json theme={null} { "type": "variableRef", "variable": "logo", "spacing": { "before": 10, "after": 10 } } ``` | Property | Type | Required | Description | | ---------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------ | | `type` | string | **Yes** | Must be `"variableRef"` | | `variable` | string | **Yes** | Variable name. Must match a key in the `variables` block. Pattern: `^[a-zA-Z][a-zA-Z0-9_]*$`, max: 50 chars. | | `spacing` | object | No | Spacing override with `before` and `after` in pt (0–100). | If the referenced variable does not exist, the `variableRef` element is silently removed from the output. ### Table dataSource binding Table elements can bind to a table variable via the `dataSource` property instead of defining `rows` inline. Use `mapping` to select and reorder columns. ```json theme={null} { "variables": { "employees": { "type": "table", "columns": ["name", "department", "email", "salary"], "data": [ ["Alice", "Engineering", "alice@example.com", "$120k"], ["Bob", "Marketing", "bob@example.com", "$95k"] ] } }, "sections": [{ "type": "flow", "content": [{ "type": "table", "headers": ["Name", "Department"], "dataSource": "employees", "mapping": ["name", "department"] }] }] } ``` | Property | Type | Required | Description | | ------------ | --------- | -------- | -------------------------------------------------------------------------------------------- | | `dataSource` | string | No | Variable name of a table variable. Pattern: `^[a-zA-Z][a-zA-Z0-9_]*$` | | `mapping` | string\[] | No | Column keys to select from the table variable. Order determines column order. Max: 20 items. | When `mapping` is provided, only the specified columns (matched by name against `columns` in the table variable) are included. Without `mapping`, all data columns are used as-is. ### Image variables in table cells When a table cell contains exactly one variable reference (`{{varName}}`) that resolves to an image variable, the cell is automatically rendered as an image instead of text. ```json theme={null} { "variables": { "checkmark": { "type": "image", "src": "https://example.com/check.png", "width": 20, "height": 20 } }, "sections": [{ "type": "flow", "content": [{ "type": "table", "headers": ["Feature", "Included"], "rows": [ ["PDF Export", "{{checkmark}}"], ["DOCX Export", "{{checkmark}}"] ] }] }] } ``` ## Built-in variables The following variables are always available and do not need to be defined: | Variable | Description | | ---------------- | ------------------------------------- | | `{{pageNumber}}` | Current page number | | `{{totalPages}}` | Total number of pages in the document | These are especially useful in header/footer configurations: ```json theme={null} { "defaults": { "footer": { "right": "Page {{pageNumber}} of {{totalPages}}" } } } ``` ## Defaults for variables There are no global default styles specific to variables. However, the rendered output of `variableRef` elements inherits the global defaults for the respective element type: * Text variables inherit `defaults.styles.text` and `defaults.fontSize`, `defaults.fontFamily`, etc. * Number variables inherit the same defaults as text variables (rendered as text) * Image variables inherit default image spacing from `defaults.spacing` * List variables inherit default list spacing * Table variables inherit `defaults.styles.table` for styling # Rate Limits & Quotas Source: https://docs.autype.com/api-reference/rate-limits Usage limits, quotas, credit costs, and data retention policies ## Rate Limits The Developer API enforces rate limits to ensure fair usage and system stability. | Limit | Value | Description | | ----------------------------- | ------ | ------------------------------------------------------------------------------------------- | | **Requests per minute** | 100 | Maximum API requests per API key within a 60-second window | | **Concurrent render jobs** | 5–50 | Maximum running jobs per organization (depends on plan, see below) | | **Max items per bulk job** | 100 | Maximum documents in a single bulk render request | | **Max image upload size** | 25 MB | Maximum file size for temporary image uploads | | **Max bulk file upload size** | 10 MB | Maximum CSV/JSON file size for bulk render | | **Max tool file upload size** | 50 MB | Maximum file size for tool file uploads | | **Max PDF pages** | 20–150 | Engine: 20 pages; Editor, Pro, Pro trial, and Team: 150 pages; Enterprise: custom/unlimited | When rate limits are exceeded, you'll receive a `429 Too Many Requests` response: ```json theme={null} { "statusCode": 429, "message": "Rate limit exceeded. Please wait before making more requests.", "error": "Too Many Requests" } ``` ## Credit Costs Each API operation consumes credits from your organization's balance. | Operation | Credit Cost | | ------------------------------- | --------------------- | | **Image upload** | Free | | **Single render** | 1 credit | | **Bulk render** (per item) | 1 credit | | **Tool file upload** | Free | | **Tool PDF action** | 1 credit | | **Lens OCR to Markdown** | 2 credits per page | | **Lens classify / filename** | 6 credits per request | | **Lens structured extraction** | 14 credits per page | | **Lens recovery to MDD / JSON** | 18 credits per page | ## TTLs (Time-To-Live) Download your rendered files within 1 hour of job completion. After that, both the job record and the download URL expire. | Resource | TTL | Description | | -------------------- | ---------- | ----------------------------------------------------- | | **Temporary images** | 24 hours | Images uploaded via `/images` endpoint | | **Render jobs** | 1 hour | Job metadata and download availability | | **Download URLs** | 1 hour | Time-limited Autype API URLs; storage remains private | | **Tool files** | 60 minutes | Files uploaded for PDF tools (input and output) | ### Cleanup Schedule The API runs automatic cleanup to remove expired resources: * Expired temporary images are deleted from storage (every 60 minutes) * Completed render jobs older than 1 hour are removed (every 60 minutes) * Expired tool files and completed tool jobs are removed (every 10 minutes) * Associated files are permanently deleted ## Concurrent Job Limits The maximum number of concurrent render jobs depends on your subscription plan: | Plan | Concurrent Job Limit | | ---------- | -------------------- | | **Engine** | 5 | | **Editor** | 5 | | **Pro** | 50 | | **Team** | 50 | Buying a permanent top-up unlocks Developer API access on Engine and Editor, but does not raise their five-job concurrency tier. This limit includes: * Single render jobs (each counts as 1) * Bulk render jobs (each counts as 1, regardless of item count) If you hit this limit, you'll receive: ```json theme={null} { "statusCode": 400, "message": "Maximum concurrent jobs limit reached (50). Please wait for existing jobs to complete.", "error": "Bad Request" } ``` ## Best Practices When you receive a `429` response, wait before retrying. Start with 1 second and double the wait time for each subsequent retry, up to a maximum of 60 seconds. Download completed renders immediately after job completion. The 1-hour TTL is a hard limit — files are permanently deleted after expiration. Check your credit balance before submitting large bulk jobs. Use the billing endpoints to verify sufficient credits are available. Instead of polling, provide a `webhookUrl` when creating bulk jobs to receive instant completion notifications. For bulk renders, group up to 100 items per job to minimize API calls while staying within limits. ## Summary Table | Category | Limit | Value | | --------------- | ------------------ | ------------------------ | | **Rate Limit** | Requests/minute | 100 | | **Rate Limit** | Window duration | 60 seconds | | **Concurrency** | Max parallel jobs | 5 (Free) · 50 (Pro/Team) | | **Bulk** | Max items/job | 100 | | **Upload** | Max image size | 25 MB | | **Upload** | Max bulk file size | 10 MB | | **Upload** | Max tool file size | 50 MB | | **TTL** | Temporary images | 24 hours | | **TTL** | Render jobs | 1 hour | | **TTL** | Download URLs | 1 hour | | **TTL** | Tool files | 60 minutes | | **Credits** | Image upload | Free | | **Credits** | Single render | 5 | | **Credits** | Bulk render/item | 4 | | **Credits** | Tool file upload | Free | | **Credits** | Tool PDF action | 1 | # DOCX roundtrip Source: https://docs.autype.com/api-reference/tools/docx-roundtrip Import an editable Word document as validated Autype JSON and render it back to DOCX Autype can use an existing Word document as the starting point for an API or agent workflow: ```text theme={null} DOCX -> validated Autype Document JSON -> edit -> render -> DOCX ``` The importer reads ordered OOXML directly. It does not convert Word to HTML first. Supported content remains editable, and every normalization is returned as a structured diagnostic. There is one import path for every DOCX, including documents previously exported by Autype. The DOCX does not contain a hidden Autype document snapshot or parallel JSON representation. The importer reconstructs the editable model from native Word structures such as styles, bookmarks, field codes, section properties, headers, footers, tables and content controls. Edits made in Word are therefore always the source of truth. ## Direct API import Send a DOCX as multipart form data: ```bash theme={null} curl -X POST "https://api.autype.com/api/v1/dev/import/docx" \ -H "X-API-Key: ak_your_api_key" \ -F "file=@contract.docx" ``` The response contains a complete `document` object accepted by `POST /api/v1/dev/render`. Keep `document.document.type` set to `docx` for the Word output. ## File and MCP workflow For an MCP client or a reusable toolkit upload: 1. Upload the source with `files_upload` or `POST /api/v1/dev/tools/files/upload`. 2. Call `docx_import` or `POST /api/v1/dev/import/docx/file` with its `fileId`. 3. Edit the returned Document JSON. 4. Call `render_json` to produce a temporary DOCX, or create a persistent document with the JSON and render that document. Embedded raster images become protected temporary image references in the Developer API flow. They remain usable for 24 hours and are promoted to permanent organization-protected assets when the JSON is saved as a persistent document. ## Preserved and normalized content The importer preserves body order, headings and bookmarks, paragraphs, supported inline formatting, links, nested lists, tables, content controls, TOC fields, page and section breaks, page size/orientation/margins, columns, page-number settings, metadata, first/odd/even header and footer variants, dynamic page fields, and embedded PNG/JPEG/GIF/WebP images. Native Word captions are associated with their table, figure or code block when their bookmark and label identify that relationship. Native Word footnotes remain editable Autype footnotes and are emitted as native Word footnotes on DOCX export. Autype-generated charts, canvases, QR codes, and other visual elements already stored in Word as raster images roundtrip as ordinary `image` elements. Word features without a lossless Autype equivalent are normalized safely. For example, merged table cells are expanded into an editable rectangular grid and unsupported or active content is ignored. Native Word equations remain editable as normalized math text. Native charts, diagrams, and embedded objects use their embedded image preview when one exists; otherwise the missing preview is reported explicitly rather than silently inventing content. Endnotes and comments do not currently have a lossless Autype representation and therefore produce an explicit `partial` diagnostic instead of disappearing silently. The response reports all of these cases in: * `warnings`: concise human-readable messages * `diagnostics`: codes, severity, OOXML part, fallback and path where available * `quality`: `exact`, `normalized`, or `partial` for content, styling, and layout DOCX import is semantic, not a pixel-for-pixel package clone. Content and page behavior remain editable wherever the Autype schema has an equivalent; visual or proprietary constructs are retained as images when the DOCX contains an embedded image representation. Unsupported constructs are reported explicitly instead of being kept in a hidden parallel document. ## Limits and security * Maximum upload size: 50 MB * Maximum ZIP entries: 5,000 * Maximum uncompressed package size: 200 MB * Maximum uncompressed part size: 50 MB * XML DTD and entity declarations are rejected * ZIP traversal, invalid signatures, and external image fetching are rejected * `manage:files` is required for Developer API and MCP imports * Imported images never expose a public object-storage URL # HTML to PDF Source: https://docs.autype.com/api-reference/tools/html-to-pdf Convert any HTML file into a high-quality PDF with full control over page layout, margins, headers, and footers The HTML to PDF tool converts any HTML file into a pixel-perfect PDF. Use your own HTML and CSS — including frameworks like Tailwind CSS or Bootstrap — and get a print-ready document with customizable page settings. ## How it works 1. **Upload** your HTML file through the Tools File Management endpoint in the [Developer API](/api-reference/introduction) 2. **Create a job** via `POST /tools/convert/html-to-pdf` with the file ID and optional page settings 3. **Poll the job** via `GET /tools/jobs/{jobId}` until status is `COMPLETED` 4. **Download** the result via `GET /tools/files/{fileId}/download` ## Basic request At minimum, just provide the file ID of your uploaded HTML file: ```json theme={null} { "fileId": "your-html-file-id" } ``` This will produce an A4 portrait PDF with default margins (20mm top/bottom, 15mm left/right). ## Full request with all options ```json theme={null} { "fileId": "your-html-file-id", "format": "A4", "landscape": "landscape", "emulatedMediaType": "screen", "scale": 1.0, "preferCssPageSize": false, "margin": { "top": "25mm", "right": "20mm", "bottom": "25mm", "left": "20mm" }, "headerTemplate": "
My Report
", "footerTemplate": "
Page of
", "webhook": { "url": "https://example.com/webhook", "secret": "my-secret" } } ``` ## Properties | Property | Type | Required | Default | Description | | ------------------- | ------- | -------- | ------------ | --------------------------------------------------------------------------------------------------------------------- | | `fileId` | string | **Yes** | — | File ID of the uploaded HTML file. | | `format` | string | No | `"A4"` | Page format: `"A4"`, `"A3"`, `"A5"`, `"Letter"`, `"Legal"`, `"Tabloid"`. Ignored when `preferCssPageSize` is enabled. | | `landscape` | string | No | `"portrait"` | Page orientation: `"portrait"` or `"landscape"`. | | `emulatedMediaType` | string | No | `"print"` | CSS media type: `"print"` or `"screen"`. See [CSS media emulation](#css-media-emulation). | | `scale` | number | No | `1.0` | Scale factor between `0.1` and `2.0`. Values below 1.0 zoom out, above 1.0 zoom in. | | `preferCssPageSize` | boolean | No | `false` | When enabled, any `@page` CSS rules in your HTML take priority over the `format` option. | | `margin` | object | No | See below | Page margins. See [Margins](#margins). | | `headerTemplate` | string | No | — | HTML template for page headers. See [Headers & Footers](#headers--footers). | | `footerTemplate` | string | No | — | HTML template for page footers. See [Headers & Footers](#headers--footers). | | `webhook` | object | No | — | Optional [webhook configuration](/api-reference/webhooks) for job completion notification. | *** ## Margins Control the page margins using the `margin` object. Each value accepts a number with a unit (`mm`, `cm`, `in`, or `px`). | Property | Default | Example values | | -------- | -------- | ----------------------------- | | `top` | `"20mm"` | `"1in"`, `"2.54cm"`, `"72px"` | | `right` | `"15mm"` | `"1in"`, `"2cm"` | | `bottom` | `"20mm"` | `"1in"`, `"2.54cm"` | | `left` | `"15mm"` | `"1in"`, `"2cm"` | ```json theme={null} { "margin": { "top": "25mm", "right": "20mm", "bottom": "30mm", "left": "20mm" } } ``` When using `headerTemplate` or `footerTemplate`, make sure the corresponding margin (top or bottom) is large enough to display the header/footer content. *** ## Headers & Footers Add repeating headers and footers to every page of your PDF. Templates are standard HTML strings and support special placeholders for page numbers: | Placeholder | Description | | ---------------------------------- | --------------------- | | `` | Current page number | | `` | Total number of pages | ### Example: Page numbers in footer ```json theme={null} { "footerTemplate": "
Page of
" } ``` ### Example: Custom header and footer ```json theme={null} { "headerTemplate": "
ConfidentialACME Corp
", "footerTemplate": "
/
" } ``` Header and footer templates must include their own inline styling (font-size, colors, etc.) — they do not inherit styles from your HTML document. *** ## CSS media emulation By default, the conversion uses `print` media emulation. This means CSS rules inside `@media print` will apply, and some CSS frameworks may behave differently than expected. Set `emulatedMediaType` to `"screen"` if you want the PDF to look exactly like it does in a browser — particularly useful when using CSS frameworks like **Tailwind CSS** or **Bootstrap**. ```json theme={null} { "emulatedMediaType": "screen" } ``` | Value | Behavior | | ---------- | ----------------------------------------------------------------------------------------------------- | | `"print"` | Standard print rendering. `@media print` rules apply. Best for documents designed for print. | | `"screen"` | Screen rendering. All responsive and visual styles apply as in a browser. Best for web-designed HTML. | *** ## Page breaks You can control page breaks directly in your HTML using standard CSS print properties: ```css theme={null} /* Force a page break before an element */ h2 { break-before: page; } /* Prevent a page break inside an element */ .card { break-inside: avoid; } /* Force a page break after an element */ .section { break-after: page; } ``` ## CSS `@page` rule If you want full control over the page size and margins from within your HTML, use the CSS `@page` rule and enable `preferCssPageSize`: ```html theme={null} ``` ```json theme={null} { "preferCssPageSize": true } ``` When `preferCssPageSize` is enabled, the `format` and `landscape` API options are ignored in favor of your CSS rules. *** ## Tips * **External resources**: The HTML file can reference external CSS, fonts, and images via URLs. These will be loaded during conversion. * **Background colors**: Background colors and images are always printed. No need for `-webkit-print-color-adjust`. * **Maximum file size**: The HTML file must be under 50 MB. * **Timeout**: The conversion allows up to 60 seconds for the page to load. If your HTML loads external resources, make sure they are accessible and responsive. # Autype Lens Source: https://docs.autype.com/api-reference/tools/lens AI-powered document understanding — OCR, classification, filename generation, and structured data extraction Autype Lens is a suite of AI-powered endpoints for document understanding. Under the hood, Lens combines modified open-source models to provide both stability and comprehensive functionality for processing PDFs, DOCX, ODT, and Markdown files. All Lens endpoints follow the standard [tools job workflow](/api-reference/tools/placeholder-replacement#how-it-works): upload a file, create a job, poll for completion, read the result. ## Endpoints | Endpoint | Description | Cost | | ------------------------------------ | --------------------------------------- | ------------------------------------------------------------ | | `POST /tools/lens/ocr` | Extract text from a document | 2 credits/page for `md`; 18 credits/page for `mdd` or `json` | | `POST /tools/lens/generate-filename` | Generate a structured filename | 6 credits (flat) | | `POST /tools/lens/classify` | Classify a document into categories | 6 credits (flat) | | `POST /tools/lens/extract` | Extract structured data from a document | 14 credits per page | ## Supported file types All Lens endpoints accept the following file types: | Format | MIME type | | -------- | ------------------------------------------------------------------------- | | PDF | `application/pdf` | | DOCX | `application/vnd.openxmlformats-officedocument.wordprocessingml.document` | | ODT | `application/vnd.oasis.opendocument.text` | | Markdown | `text/markdown` | ## Limits | Limit | Value | | ----------------------------------- | ------------------------------------------------------------------------------------- | | Maximum file size | 50 MB | | Maximum PDF pages | 20 on Engine; 150 on Editor, Pro, Pro trial, and Team; custom/unlimited on Enterprise | | Maximum pages processed (extract) | 50 pages | | Maximum categories (classify) | 50 | | Minimum categories (classify) | 2 | | Maximum fields (extract) | 30 | | OCR output formats `mdd` and `json` | PDF only | | Page selection (`pages` parameter) | PDF only | *** ## OCR Extract text from a document. Returns the document content as Markdown. ### Output formats | Format | Description | Supported input | | ------ | ------------------------------------------------------------------------ | ------------------------ | | `md` | Standard Markdown — raw text extraction | PDF, DOCX, ODT, Markdown | | `mdd` | Autype extended Markdown with document settings, defaults, header/footer | PDF only | | `json` | Full Autype document JSON with sections and elements | PDF only | The `mdd` and `json` output formats are only available for PDF files. For DOCX, ODT, and Markdown files, use `md`. ### Page selection For PDF files with `md` output format, you can optionally select specific pages using the `pages` parameter: ```json theme={null} { "fileId": "your-file-id", "outputFormat": "md", "pages": ["1", "3-5", "10-"] } ``` Page spec syntax: * `"3"` — single page * `"2-5"` — page range (inclusive) * `"10-"` — from page 10 to end If `pages` is omitted, all pages are processed. ### Example request ```bash theme={null} curl -X POST https://api.autype.com/api/v1/dev/tools/lens/ocr \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fileId": "your-file-id", "outputFormat": "md" }' ``` ### Example result ```json theme={null} { "id": "job-id", "action": "lens.ocr", "status": "COMPLETED", "result": { "outputFormat": "md", "content": "# Invoice\n\nInvoice Number: INV-2026-001\nDate: 2026-03-15\n\n| Item | Amount |\n|------|--------|\n| Service A | €500.00 |\n| Service B | €250.00 |\n\n**Total: €750.00**" } } ``` ### Cost Plain `md` output costs **2 credits per processed page**. Document recovery to `mdd` or `json` costs **18 credits per processed page**. For DOCX, ODT, and Markdown files, plain Markdown extraction is counted as one page. *** ## Generate Filename Generate a structured filename for a document based on a naming schema with placeholders. The AI reads the document and fills in the placeholder values. ### Request ```json theme={null} { "fileId": "your-file-id", "filenameSchema": "invoice-{invoiceNr}-{dateCreated}" } ``` | Property | Type | Required | Description | | ---------------- | ------ | -------- | ---------------------------------------------------------- | | `fileId` | string | **Yes** | File ID of the uploaded document. | | `filenameSchema` | string | **Yes** | Filename template with `{placeholder}` tags. | | `webhook` | object | No | Optional [webhook configuration](/api-reference/webhooks). | ### Example result ```json theme={null} { "id": "job-id", "action": "lens.generate-filename", "status": "COMPLETED", "result": { "generatedFilename": "invoice-INV-2026-001-2026-03-15", "placeholders": { "invoiceNr": "INV-2026-001", "dateCreated": "2026-03-15" } } } ``` If a placeholder value cannot be found in the document, it is replaced with `unknown`. ### Cost **6 credits** per request. For PDFs, only the first three pages are sent to OCR. *** ## Classify Classify a document into one of the provided categories. The AI reads the first 3 pages of the document and picks the best matching category. ### Request ```json theme={null} { "fileId": "your-file-id", "categories": ["Invoice", "Contract", "Offer", "Delivery Note", "Other"] } ``` | Property | Type | Required | Description | | ------------ | --------- | -------- | ---------------------------------------------------------- | | `fileId` | string | **Yes** | File ID of the uploaded document. | | `categories` | string\[] | **Yes** | Array of category names (min 2, max 50). | | `webhook` | object | No | Optional [webhook configuration](/api-reference/webhooks). | ### Example result ```json theme={null} { "id": "job-id", "action": "lens.classify", "status": "COMPLETED", "result": { "category": "Invoice", "confidence": 0.95, "reasoning": "The document contains an invoice number, line items with prices, and a total amount, which are characteristic of an invoice." } } ``` ### Result fields | Field | Type | Description | | ------------ | ------ | -------------------------------------------------------------- | | `category` | string | The selected category — always one of the provided categories. | | `confidence` | number | Confidence score between 0 and 1. | | `reasoning` | string | Brief explanation of why this category was chosen. | ### Edge cases * **Empty document**: Returns the first category with `confidence: 0` and a message indicating the document is empty. * **No clear match**: The closest category is returned with a low confidence score. * The AI will never invent new categories — it always picks from the provided list. ### Cost **6 credits** per request. For PDFs, only the first three pages are sent to OCR. *** ## Extract Extract structured data from a document based on a user-defined field schema. Define field names, types, and optional descriptions. The AI reads the document and returns a JSON object with the extracted values. ### Request ```json theme={null} { "fileId": "your-file-id", "fields": { "invoiceNumber": { "type": "string", "description": "The invoice number, usually in format INV-XXXX" }, "totalAmount": { "type": "number", "description": "Total amount including VAT" }, "invoiceDate": { "type": "date", "description": "Date the invoice was issued" }, "isPaid": { "type": "boolean" }, "lineItems": { "type": "array", "description": "List of line items with description and amount" } }, "pages": ["1-2"] } ``` | Property | Type | Required | Description | | --------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------- | | `fileId` | string | **Yes** | File ID of the uploaded document. | | `fields` | object | **Yes** | Field definitions (min 1, max 30). Each key is a field name, value defines `type` and optional `description`. | | `pages` | string\[] | No | Page selection for PDFs (same syntax as OCR). If omitted, up to 50 pages are processed. | | `webhook` | object | No | Optional [webhook configuration](/api-reference/webhooks). | ### Field types | Type | Description | Example value | | --------- | -------------- | ----------------------------------------------- | | `string` | Text value | `"INV-2026-001"` | | `number` | Numeric value | `750.00` | | `boolean` | True/false | `true` | | `date` | Date value | `"2026-03-15"` | | `array` | List of values | `[{"description": "Service A", "amount": 500}]` | Adding a `description` to a field helps the AI understand what to look for and significantly improves extraction accuracy. ### Example result ```json theme={null} { "id": "job-id", "action": "lens.extract", "status": "COMPLETED", "result": { "data": { "invoiceNumber": "INV-2026-001", "totalAmount": 750.00, "invoiceDate": "2026-03-15", "isPaid": false, "lineItems": [ { "description": "Service A", "amount": 500.00 }, { "description": "Service B", "amount": 250.00 } ] }, "fieldsMissing": [] } } ``` ### Result fields | Field | Type | Description | | --------------- | --------- | ----------------------------------------------------------------------------------- | | `data` | object | Extracted values. Keys match the field names from the request. | | `fieldsMissing` | string\[] | List of field names that could not be found in the document (values set to `null`). | ### Edge cases * **Field not found**: The field is set to `null` and its name is added to `fieldsMissing`. * **Empty document**: All fields are returned as `null` and all field names appear in `fieldsMissing`. * **PDF exceeds 50 pages**: Only the first 50 pages are processed when no `pages` parameter is specified. ### Cost **14 credits per page** processed. For DOCX, ODT, and Markdown files, cost is 14 credits (counted as one page). *** ## General workflow All Lens endpoints follow the same async job pattern: ### 1. Upload the document ```bash theme={null} curl -X POST https://api.autype.com/api/v1/dev/tools/files/upload \ -H "X-API-Key: YOUR_API_KEY" \ -F "file=@document.pdf" ``` ### 2. Create a Lens job ```bash theme={null} curl -X POST https://api.autype.com/api/v1/dev/tools/lens/classify \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fileId": "your-file-id", "categories": ["Invoice", "Contract", "Report"] }' ``` ### 3. Poll for completion ```bash theme={null} curl https://api.autype.com/api/v1/dev/tools/jobs/{jobId} \ -H "X-API-Key: YOUR_API_KEY" ``` Poll until `status` is `COMPLETED` or `FAILED`. Alternatively, use a [webhook](/api-reference/webhooks) to receive a notification when the job finishes. ### 4. Read the result The result is returned directly in the job response under the `result` field — there is no separate file to download. This applies to all Lens endpoints. Unlike PDF tool jobs (merge, split, etc.), Lens jobs return structured data in the `result` field instead of producing an output file. You do not need to call the download endpoint. # PDF Form Fields & Fill Form Source: https://docs.autype.com/api-reference/tools/pdf-forms Extract form field metadata from a PDF and fill form fields programmatically The PDF form tools let you inspect form fields in a PDF document, then fill them with values programmatically. This is a two-step workflow: first extract the field names and types, then fill the fields with your data. ## Workflow overview 1. **Upload** the PDF form through the Tools File Management endpoint in the [Developer API](/api-reference/introduction) 2. **Extract fields** via `POST /tools/pdf/form-fields` — returns field names, types, options, and current values 3. **Fill fields** via `POST /tools/pdf/fill-form` — set values for each field by name 4. **Poll the job** via `GET /tools/jobs/{jobId}` until status is `COMPLETED` 5. **Download** the filled PDF via `GET /tools/files/{fileId}/download` All files for tool actions must be uploaded via `POST /tools/files/upload` (the **tools** file upload). Do not use the temporary image upload endpoint (`POST /images/upload`) — that is only for render jobs (JSON/Markdown rendering). The two upload endpoints use separate storage systems. ## Step 1: Extract form fields Use the form-fields endpoint to discover what fields exist in a PDF. ### Request ```bash theme={null} curl -X POST https://api.autype.com/api/v1/dev/tools/pdf/form-fields \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fileId": "uploaded-pdf-id" }' ``` ### Request body | Property | Type | Required | Description | | --------- | ------ | -------- | ------------------------------------------------------------------------------------------ | | `fileId` | string | **Yes** | File ID of the uploaded PDF containing form fields. | | `webhook` | object | No | Optional [webhook configuration](/api-reference/webhooks) for job completion notification. | ### Response (after polling) The form-fields action is **metadata-only** — there is no output file. The result is returned in the `metadata.fields` array of the completed job: ```json theme={null} { "id": "job-123", "action": "pdf.form-fields", "status": "COMPLETED", "inputFileIds": ["uploaded-pdf-id"], "outputFileId": null, "error": null, "metadata": { "fields": [ { "name": "FullName", "type": "text", "value": null, "isReadOnly": false }, { "name": "Gender", "type": "radio", "value": null, "options": ["Male", "Female"], "isReadOnly": false }, { "name": "Married", "type": "checkbox", "value": false, "isReadOnly": false }, { "name": "City", "type": "dropdown", "value": null, "options": ["New York", "London", "Berlin", "Paris", "Rome"], "isReadOnly": false }, { "name": "Language", "type": "optionlist", "value": null, "options": ["English", "German", "French", "Italian"], "isReadOnly": false }, { "name": "Notes", "type": "text", "value": null, "isReadOnly": false } ] }, "createdAt": "2026-02-23T12:00:00.000Z", "startedAt": "2026-02-23T12:00:01.000Z", "completedAt": "2026-02-23T12:00:02.000Z" } ``` ### Field object properties Each field in the `metadata.fields` array has the following properties: | Property | Type | Description | | ------------ | ------------------------- | -------------------------------------------------------------------------------------------- | | `name` | string | The field name as defined in the PDF. Use this name when filling the field. | | `type` | string | Field type: `"text"`, `"checkbox"`, `"dropdown"`, `"radio"`, `"optionlist"`, or `"unknown"`. | | `value` | string \| boolean \| null | Current value of the field. `null` if empty, `boolean` for checkboxes. | | `options` | string\[] | Available options (only for `dropdown`, `radio`, and `optionlist` fields). | | `isReadOnly` | boolean | Whether the field is read-only and cannot be filled. | ### Supported field types | Type | Description | Value format for filling | | ------------ | ------------------------------------- | ------------------------------------------------- | | `text` | Text input field | `string` | | `checkbox` | Checkbox (checked/unchecked) | `boolean` (`true` = checked, `false` = unchecked) | | `dropdown` | Dropdown select (single choice) | `string` (must match one of the `options`) | | `radio` | Radio button group (single choice) | `string` (must match one of the `options`) | | `optionlist` | Option list (single choice) | `string` (must match one of the `options`) | | `unknown` | Unsupported field type (e.g. buttons) | Cannot be filled | ## Step 2: Fill form fields Once you know the field names and types, use the fill-form endpoint to set values. ### Request ```bash theme={null} curl -X POST https://api.autype.com/api/v1/dev/tools/pdf/fill-form \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fileId": "uploaded-pdf-id", "fields": { "FullName": "John Doe", "Gender": "Male", "Married": true, "City": "Berlin", "Language": "German", "Notes": "Additional information" }, "flatten": false }' ``` ### Request body | Property | Type | Required | Description | | --------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------- | | `fileId` | string | **Yes** | File ID of the uploaded PDF with form fields. | | `fields` | object | **Yes** | Map of field names to values. At least one field is required. | | `flatten` | boolean | No | If `true`, form fields are flattened after filling — they become static text and can no longer be edited. Default: `false`. | | `webhook` | object | No | Optional [webhook configuration](/api-reference/webhooks) for job completion notification. | ### Fields object The `fields` object maps field names (as returned by the form-fields endpoint) to their values: ```json theme={null} { "fields": { "FullName": "John Doe", "ID": "12345", "Gender": "Male", "Married": true, "City": "New York", "Language": "English", "Notes": "Test notes" } } ``` For `dropdown`, `radio`, and `optionlist` fields, the value must exactly match one of the available `options` returned by the form-fields endpoint. Mismatched values will be skipped. ### Response (after polling) ```json theme={null} { "id": "job-456", "action": "pdf.fill-form", "status": "COMPLETED", "inputFileIds": ["uploaded-pdf-id"], "outputFileId": "filled-pdf-id", "error": null, "metadata": { "filledCount": 6, "flatten": false }, "createdAt": "2026-02-23T12:00:00.000Z", "startedAt": "2026-02-23T12:00:01.000Z", "completedAt": "2026-02-23T12:00:02.000Z" } ``` | Metadata property | Type | Description | | ----------------- | ------- | ----------------------------------------------- | | `filledCount` | number | Number of fields that were successfully filled. | | `flatten` | boolean | Whether the form was flattened. | ## Complete example ### 1. Upload the PDF form ```bash theme={null} curl -X POST https://api.autype.com/api/v1/dev/tools/files/upload \ -H "X-API-Key: YOUR_API_KEY" \ -F "file=@form.pdf" ``` ```json theme={null} { "id": "form-file-id", "filename": "form.pdf", "mimeType": "application/pdf", "sizeBytes": 12351, "kind": "input", "sourceAction": null, "expiresAt": "2026-02-24T12:00:00.000Z", "createdAt": "2026-02-23T12:00:00.000Z" } ``` ### 2. Extract form fields ```bash theme={null} curl -X POST https://api.autype.com/api/v1/dev/tools/pdf/form-fields \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fileId": "form-file-id" }' ``` ```json theme={null} { "id": "fields-job-id", "status": "PENDING" } ``` Poll until completed: ```bash theme={null} curl https://api.autype.com/api/v1/dev/tools/jobs/fields-job-id \ -H "X-API-Key: YOUR_API_KEY" ``` The `metadata.fields` array tells you exactly which fields exist, their types, and available options. ### 3. Fill the form Use the field names and types from step 2: ```bash theme={null} curl -X POST https://api.autype.com/api/v1/dev/tools/pdf/fill-form \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fileId": "form-file-id", "fields": { "FullName": "Jane Doe", "ID": "67890", "Gender": "Female", "Married": false, "City": "Berlin", "Language": "German", "Notes": "Filled via API" }, "flatten": true }' ``` ```json theme={null} { "id": "fill-job-id", "status": "PENDING" } ``` ### 4. Poll and download ```bash theme={null} # Poll for completion curl https://api.autype.com/api/v1/dev/tools/jobs/fill-job-id \ -H "X-API-Key: YOUR_API_KEY" # Download the filled PDF curl https://api.autype.com/api/v1/dev/tools/files/filled-pdf-id/download \ -H "X-API-Key: YOUR_API_KEY" \ -o filled-form.pdf ``` ## Flatten vs. non-flatten | Mode | Description | Use case | | -------------------------- | --------------------------------------------- | --------------------------------------------------------------------- | | `flatten: false` (default) | Fields remain editable in the output PDF. | When recipients need to modify values. | | `flatten: true` | Fields are converted to static text/graphics. | For final documents, archiving, or when fields should not be changed. | Flattening is irreversible — once flattened, the form fields cannot be edited again. Always keep the original PDF if you need to re-fill with different values. ## Error handling | Scenario | HTTP Status | Error | | ---------------------------------------------- | ----------- | -------------------------------- | | Missing `fileId` | 400 | `fileId is required` | | Empty `fields` object | 400 | `At least one field is required` | | File is not a PDF | 400 | `Invalid file type` | | Field name not found in PDF | — | Field is silently skipped | | Value type mismatch (e.g. string for checkbox) | — | Field is silently skipped | | Dropdown/radio value not in options | — | Field is silently skipped | # DOCX/ODT Placeholder Replacement Source: https://docs.autype.com/api-reference/tools/placeholder-replacement Replace {{placeholder}} tags in DOCX and ODT documents with text, images, lists, and tables The placeholder replacement tool lets you upload a DOCX or ODT template containing `{{placeholder}}` tags and replace them with dynamic values — text, images, lists, or even full table rows. ## How it works 1. **Upload** your template file (DOCX or ODT) through the Tools File Management endpoint in the [Developer API](/api-reference/introduction) 2. **Upload** any image files you want to use in placeholders 3. **Create a job** via `POST /tools/docx/replace-placeholders` with the file ID and a `variables` object 4. **Poll the job** via `GET /tools/jobs/{jobId}` until status is `COMPLETED` 5. **Download** the result via `GET /tools/files/{fileId}/download` ## Request body ```json theme={null} { "fileId": "file-id-of-template", "variables": { "name": "John Doe", "company": "Acme Inc.", "logo": { "type": "image", "src": "file-id-of-uploaded-image", "width": 200, "height": 80 }, "features": { "type": "list", "items": ["Fast", "Reliable", "Secure"], "ordered": false }, "pricing": { "type": "table", "rows": [ { "plan": "Starter", "price": "€9/mo", "credits": "100" }, { "plan": "Pro", "price": "€29/mo", "credits": "500" } ] } }, "outputFormat": "pdf" } ``` ### Top-level properties | Property | Type | Required | Description | | -------------- | ------ | -------- | ------------------------------------------------------------------------------------------ | | `fileId` | string | **Yes** | File ID of the uploaded DOCX or ODT template. | | `variables` | object | **Yes** | Map of placeholder names to values. At least one variable is required. | | `outputFormat` | string | No | Output format: `"pdf"`, `"docx"`, or `"odt"`. Default: same as input format. | | `webhook` | object | No | Optional [webhook configuration](/api-reference/webhooks) for job completion notification. | ## Variable types ### Text variable A simple string value. In your template, use `{{name}}` and the text will be replaced directly. ```json theme={null} { "name": "John Doe", "company": "Acme Inc.", "date": "23.02.2026" } ``` | Property | Type | Description | | --------- | ------ | --------------------- | | *(value)* | string | The replacement text. | ### Image variable Replaces a `{{placeholder}}` tag with an image. The image must first be uploaded via the file upload endpoint — pass the **file ID** as `src`. ```json theme={null} { "logo": { "type": "image", "src": "uploaded-file-id", "width": 200, "height": 80 } } ``` | Property | Type | Required | Description | | --------- | ------ | -------- | --------------------------------------------------------- | | `type` | string | **Yes** | Must be `"image"` | | `src` | string | **Yes** | File ID of the uploaded image (PNG, JPEG, GIF, BMP, SVG). | | `width` | number | No | Image width in pixels. Default: 200. | | `height` | number | No | Image height in pixels. Default: 200. | | `caption` | string | No | Alt text for the image. | Upload the image via `POST /tools/files/upload` (the **tools** file upload), then use the returned `id` as the `src` value. Do not use the temporary image upload endpoint (`POST /images/upload`) — that is only for render jobs (JSON/Markdown rendering). The two upload endpoints use separate storage systems. ### List variable Replaces a `{{placeholder}}` tag with a formatted list — either bulleted or numbered. ```json theme={null} { "features": { "type": "list", "items": ["PDF Generation", "Template Engine", "API Access"], "ordered": false }, "steps": { "type": "list", "items": ["Upload template", "Send variables", "Download result"], "ordered": true } } ``` | Property | Type | Required | Description | | --------- | --------- | -------- | ----------------------------------------------------------- | | `type` | string | **Yes** | Must be `"list"` | | `items` | string\[] | **Yes** | Array of list item strings. | | `ordered` | boolean | No | `true` = numbered (1. 2. 3.), `false` = bulleted (default). | Lists are rendered as formatted text in the document. Each item appears on a new line with the appropriate prefix. ### Table variable Expands a single template row into multiple rows with dynamic data. This is the most powerful variable type — it duplicates a table row in your DOCX/ODT template for each entry in the `rows` array. ```json theme={null} { "pricing": { "type": "table", "rows": [ { "plan": "Starter", "price": "€9/mo", "credits": "100" }, { "plan": "Pro", "price": "€29/mo", "credits": "500" }, { "plan": "Enterprise", "price": "€99/mo", "credits": "2000" } ] } } ``` | Property | Type | Required | Description | | -------- | --------- | -------- | -------------------------------------------------------------- | | `type` | string | **Yes** | Must be `"table"` | | `rows` | object\[] | **Yes** | Array of row objects. Each object maps column names to values. | #### How to set up the template In your DOCX or ODT file, create a **real table** with a header row and one data row. In each cell of the data row, use dot-notation placeholders: | Plan | Price | Credits | | ------------------ | ------------------- | --------------------- | | `{{pricing.plan}}` | `{{pricing.price}}` | `{{pricing.credits}}` | The property names after the dot (`plan`, `price`, `credits`) must match the keys in each row object exactly. The header row is static text — only the data row containing the `{{varName.property}}` placeholders is duplicated. Make sure each cell in the data row contains exactly one placeholder. ## Output format By default, the output format matches the input (DOCX in → DOCX out, ODT in → ODT out). Use `outputFormat` to convert: | Value | Description | | -------- | ------------------------ | | `"docx"` | Microsoft Word format | | `"odt"` | OpenDocument Text format | | `"pdf"` | PDF | ## Complete example ### 1. Upload the template ```bash theme={null} curl -X POST https://api.autype.com/api/v1/dev/tools/files/upload \ -H "X-API-Key: YOUR_API_KEY" \ -F "file=@template.docx" ``` Response: ```json theme={null} { "id": "abc-template-id", "filename": "template.docx", "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "sizeBytes": 15234, "kind": "input", "sourceAction": null, "expiresAt": "2026-02-24T12:00:00.000Z", "createdAt": "2026-02-23T12:00:00.000Z" } ``` ### 2. Upload an image (optional) ```bash theme={null} curl -X POST https://api.autype.com/api/v1/dev/tools/files/upload \ -H "X-API-Key: YOUR_API_KEY" \ -F "file=@logo.png" ``` Response: ```json theme={null} { "id": "xyz-image-id", "filename": "logo.png", "mimeType": "image/png", "sizeBytes": 4096, "kind": "input", "sourceAction": null, "expiresAt": "2026-02-24T12:00:00.000Z", "createdAt": "2026-02-23T12:00:00.000Z" } ``` ### 3. Create the replacement job ```bash theme={null} curl -X POST https://api.autype.com/api/v1/dev/tools/docx/replace-placeholders \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fileId": "abc-template-id", "variables": { "name": "John Doe", "company": "Acme Inc.", "logo": { "type": "image", "src": "xyz-image-id", "width": 200, "height": 80 }, "pricing": { "type": "table", "rows": [ { "plan": "Starter", "price": "€9/mo", "credits": "100" }, { "plan": "Pro", "price": "€29/mo", "credits": "500" } ] } }, "outputFormat": "pdf" }' ``` Response: ```json theme={null} { "id": "job-123", "action": "docx.replace-placeholders", "status": "PENDING", "inputFileIds": ["abc-template-id"], "outputFileId": null, "error": null, "createdAt": "2026-02-23T12:00:00.000Z", "startedAt": null, "completedAt": null } ``` ### 4. Poll for completion ```bash theme={null} curl https://api.autype.com/api/v1/dev/tools/jobs/job-123 \ -H "X-API-Key: YOUR_API_KEY" ``` Response (when completed): ```json theme={null} { "id": "job-123", "action": "docx.replace-placeholders", "status": "COMPLETED", "inputFileIds": ["abc-template-id"], "outputFileId": "output-file-id", "error": null, "metadata": { "replacedVariables": 4, "outputFormat": "pdf" }, "createdAt": "2026-02-23T12:00:00.000Z", "startedAt": "2026-02-23T12:00:01.000Z", "completedAt": "2026-02-23T12:00:03.000Z" } ``` ### 5. Download the result ```bash theme={null} curl https://api.autype.com/api/v1/dev/tools/files/output-file-id/download \ -H "X-API-Key: YOUR_API_KEY" \ -o result.pdf ``` ## Supported file types | Input | Supported MIME types | | -------- | --------------------------------------------------------------------------------------------------------------------------------- | | Template | DOCX (`application/vnd.openxmlformats-officedocument.wordprocessingml.document`), ODT (`application/vnd.oasis.opendocument.text`) | | Images | PNG (`image/png`), JPEG (`image/jpeg`), GIF (`image/gif`), BMP (`image/bmp`), SVG (`image/svg+xml`) | For best results, use DOCX templates. # Webhooks & Job Status Source: https://docs.autype.com/api-reference/webhooks Real-time notifications via webhooks or polling for job completion Every asynchronous operation in the Autype Developer API creates a **job**. You have two ways to know when it finishes: 1. **Webhooks** (recommended) — receive an HTTP POST when the job completes or fails. 2. **Polling** — periodically check the job status endpoint. *** ## Webhooks Autype supports two compatible modes: * **Reusable Engine endpoints** are created once in **Engine → Integrations** and receive matching render, bulk-render, and file-tool events for the organization. They are signed and are the recommended default. * **Per-request webhooks** travel with a single Developer API request and keep the existing custom-header or Basic Auth contract described below. ### Reusable signed endpoints Owners and admins can add an HTTPS destination in Engine. Autype validates the destination against its outbound URL policy before saving it: redirects, credentials in URLs, loopback/link-local addresses, private networks, and metadata hosts are rejected in production. The signing secret is shown exactly once when the endpoint is created. Reusable deliveries contain: ```http theme={null} Autype-Signature: t=1785686400,v1=5e9f… ``` To verify a delivery, take the raw request body without reformatting it, build `timestamp.rawBody`, calculate HMAC-SHA256 with the signing secret, and compare the hexadecimal digest to `v1` using a timing-safe comparison. Reject stale timestamps according to your replay window (five minutes is a common default). Endpoint URLs and event subscriptions can be inspected in Engine; the signing secret is never returned by list endpoints. Deleting an endpoint stops future deliveries without changing API keys, MCP connections, or jobs. ### Per-request configuration Add an optional `webhook` object to any job-creating request: ```json theme={null} { "webhook": { "webhookUrl": "https://your-server.com/autype-webhook", "webhookAuth": { "headerName": "X-Webhook-Secret", "headerValue": "your-secret-token" } } } ``` | Field | Type | Required | Description | | ------------------------------- | -------- | -------- | ---------------------------------------- | | `webhookUrl` | `string` | Yes | URL that receives the POST notification. | | `webhookAuth.headerName` | `string` | No | Custom header name for authentication. | | `webhookAuth.headerValue` | `string` | No | Value for the custom header. | | `webhookAuth.basicAuthUsername` | `string` | No | Username for HTTP Basic Auth. | | `webhookAuth.basicAuthPassword` | `string` | No | Password for HTTP Basic Auth. | Use **either** custom header auth **or** Basic Auth — not both. If both are provided, the custom header takes precedence. ### Webhook payload Autype sends a `POST` with `Content-Type: application/json` and `User-Agent: Autype-Webhook/1.0`. The payload structure depends on the job type: **Render job (completed):** ```json theme={null} { "event": "job.completed", "jobType": "render", "jobId": "a1b2c3d4-...", "status": "COMPLETED", "filename": "document.pdf", "completedAt": "2025-02-21T10:30:00.000Z" } ``` **Render job (failed):** ```json theme={null} { "event": "job.failed", "jobType": "render", "jobId": "a1b2c3d4-...", "status": "FAILED", "error": "Render failed: invalid section", "completedAt": "2025-02-21T10:30:00.000Z" } ``` **Bulk render job (completed):** ```json theme={null} { "event": "job.completed", "jobType": "bulk-render", "jobId": "b2c3d4e5-...", "status": "COMPLETED", "metadata": { "totalItems": 10, "completedItems": 10, "failedItems": 0 }, "completedAt": "2025-02-21T10:31:00.000Z" } ``` **Tools job (completed):** ```json theme={null} { "event": "job.completed", "jobType": "tools", "jobId": "c3d4e5f6-...", "status": "COMPLETED", "downloadUrl": "/api/v1/dev/tools/files/{fileId}/download", "completedAt": "2025-02-21T10:30:05.000Z" } ``` `downloadUrl` is only present for tools jobs that produce an output file (e.g. merge, split). Jobs like `pdf/metadata` return results via the job status endpoint instead. ### Delivery behavior * **Single attempt** — if your server is unreachable or returns a non-2xx status, the webhook is not retried. * **Timeout** — requests time out after 10 seconds. * **Non-blocking** — webhook delivery never delays or fails the job itself. ### Supported endpoints The `webhook` field is accepted on all job-creating endpoints: `POST /render`, `POST /render/markdown`, `POST /render/document/{documentId}`, `POST /bulk-render`, `POST /bulk-render/file`, and all `POST /tools/pdf/*` endpoints. *** ## Polling Poll the job status endpoint until the job reaches `COMPLETED` or `FAILED`. | Job type | Status endpoint | | ----------- | ------------------------------ | | Render | `GET /render/{jobId}` | | Bulk render | `GET /bulk-render/{bulkJobId}` | | Tools | `GET /tools/jobs/{jobId}` | **Render job status response (completed):** ```json theme={null} { "jobId": "d4e5f6a7-...", "status": "COMPLETED", "format": "PDF", "filename": "document.pdf", "downloadUrl": "https://api.autype.com/api/v1/dev/render/d4e5f6a7-.../download?token=...", "createdAt": "2025-02-21T10:29:55.000Z", "completedAt": "2025-02-21T10:30:02.000Z" } ``` Most render and tools jobs complete within 2–5 seconds. Poll every 1–2 seconds with a maximum of \~60 attempts. # Make.com Source: https://docs.autype.com/automation/integrations/make/overview Connect Autype to Make.com for automated document generation Click here to add the Autype app to your Make.com account **Variable syntax:** Make.com uses `{{...}}` for its own template variables, which conflicts with Autype's default variable syntax. When building Make.com scenarios, use the alternative **`${varName}`** syntax for Autype variable placeholders instead. The API automatically converts `${...}` to `{{...}}` internally. This applies to all API input — document JSON, Markdown content, and bulk render items. ## Overview The Autype Make.com integration lets you generate documents, render PDFs, and manage content directly from Make.com scenarios — no code required. Connect Autype to thousands of apps and automate your document workflows. ## Prerequisites * An Autype account with an API key ([Dashboard → Settings → API Keys](https://app.autype.com)) * A [Make.com](https://www.make.com) account ## What you can do With the Autype integration for Make.com, you can: * **Render documents** from JSON or Extended Markdown to PDF, DOCX, or ODT * **Bulk render** documents with variable data from spreadsheets, CRMs, or databases * **Manage projects and documents** — create, list, and retrieve documents * **Upload images** for use in documents * **PDF tools** — merge, split, rotate, watermark, compress, and more ## Using variables in Make.com Since Make.com reserves the `{{...}}` syntax for its own data mapping, Autype accepts `${...}` as an alternative on all API inputs. ### Example: Document JSON in Make.com Instead of: ```json theme={null} { "sections": [{ "type": "flow", "content": [ { "type": "h1", "text": "Invoice for {{companyName}}" }, { "type": "text", "text": "Date: {{invoiceDate}}" } ] }] } ``` Use this in Make.com: ```json theme={null} { "sections": [{ "type": "flow", "content": [ { "type": "h1", "text": "Invoice for ${companyName}" }, { "type": "text", "text": "Date: ${invoiceDate}" } ] }] } ``` Both forms are equivalent. The API normalizes `${...}` to `{{...}}` before processing. ### Example: Markdown content in Make.com ```markdown theme={null} # Invoice for ${companyName} Date: ${invoiceDate} ## Items | Item | Amount | |------|--------| | Service A | ${amount} | ``` ### Mixing Make.com variables and Autype variables You can freely combine Make.com's data mapping with Autype's `${...}` variable placeholders: ```json theme={null} { "variables": { "companyName": "{{1.companyName}}", "invoiceDate": "{{1.date}}" }, "sections": [{ "type": "flow", "content": [ { "type": "h1", "text": "Invoice for ${companyName}" }, { "type": "text", "text": "Date: ${invoiceDate}" } ] }] } ``` In this example: * `{{1.companyName}}` is a **Make.com** expression that maps data from a previous module * `${companyName}` is an **Autype** variable placeholder that gets substituted during rendering The `${...}` syntax is only for **input**. If you retrieve document content from the API (e.g., via the Get Document module), variable placeholders will always be returned as `{{...}}`. ## Built-in variables The following Autype variables are always available and work with both syntaxes: | `${...}` syntax | `{{...}}` equivalent | Description | | -------------------- | --------------------- | ------------------------------- | | `${pageNumber}` | `{{pageNumber}}` | Current page number | | `${totalPages}` | `{{totalPages}}` | Total number of pages | | `${date}` | `{{date}}` | Current date (DD.MM.YYYY) | | `${date/YYYY-MM-DD}` | `{{date/YYYY-MM-DD}}` | Current date with custom format | ## Getting started Go to the [Autype Dashboard](https://app.autype.com) and navigate to **Settings → API Keys**. Create a new key — it will start with `ak_...`. Open the [Autype app invitation link](https://www.make.com/en/hq/app-invitation/827c4f66f5effac0dda8407ff633cc54) to add Autype to your Make.com account. Then, in your scenario, click **+** to add a module and search for **Autype**. When prompted, paste your API key. The connection is verified automatically. Choose a module (e.g. **Render Document from JSON**) and configure it. Run the scenario to generate your first document. API keys are scoped to your organization. Keep them secret — never share them or expose them in public scenarios. ## Available modules The Autype integration provides **41 modules** across 9 groups. Each module is an action that you can add to your Make.com scenario. ### Rendering | Module | Description | | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Render Document from JSON** | Submit a complete document as structured JSON and render it to PDF, DOCX, or ODT. The module waits for completion and returns the download URL. | | **Render Document from Markdown** | Submit content as Extended Markdown and render it to PDF, DOCX, or ODT. Supports page size, orientation, margins, variables, defaults, abbreviations, citations, and style options. | | **Render a Persistent Document** | Render an existing document from your Autype workspace by its ID. Optionally override variables and output format. | | **Get Render Job Status** | Check the current status of a render job by job ID. | | **Download Render Output** | Download the rendered document file as binary data. | | **List Render Jobs** | List all render jobs for your organization with pagination. | ### Bulk Rendering | Module | Description | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | **Bulk Render from JSON** | Create up to 100 documents at once by providing a document ID and an array of variable sets. Each item generates one document. | | **Bulk Render from File** | Create a bulk render job by uploading a CSV, Excel, or JSON file with variable data. Each row/item generates one document. | | **Get Bulk Render Status** | Check the current status of a bulk render job. | | **Download Bulk Render Output** | Download the bulk render output as a ZIP file containing all generated documents. | ### Documents | Module | Description | | -------------------------- | ----------------------------------------------------------------------------------------- | | **List Documents** | List all documents in your organization, optionally filtered by project. | | **Get a Document** | Retrieve a document by ID including its latest content (JSON snapshot). | | **Create a Document** | Create a new document in a project with optional initial content as JSON. | | **Get Document Variables** | Get the variable definitions for a document — useful before rendering with custom values. | ### Projects | Module | Description | | -------------------- | --------------------------------------- | | **List Projects** | List all projects in your organization. | | **Create a Project** | Create a new project. | ### Images | Module | Description | | ---------------------------- | --------------------------------------------------------------------------------------------------------------------- | | **Upload a Temporary Image** | Upload an image for use in ad-hoc renders (expires after 24 hours). Returns a `refPath` you can use in document JSON. | | **List Temporary Images** | List all non-expired temporary images. | | **Delete a Temporary Image** | Delete a temporary image before it expires. | ### PDF Tools — Files | Module | Description | | --------------------- | --------------------------------------------------------------------------------------------------- | | **Upload a Document** | Upload a file (PDF, DOCX, ODT, PNG, JPEG) for use with tool actions. Files expire after 60 minutes. | | **List Tool Files** | List all non-expired tool files. | | **Get File Details** | Get metadata for a specific tool file. | | **Delete a File** | Delete a tool file from storage. | | **Download a File** | Download a tool file by ID as binary data. | ### PDF Tools | Module | Description | | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | **Merge PDFs** | Merge 2–20 PDF files into a single document. Pages are concatenated in the order of the provided file IDs. | | **Split PDF** | Split a PDF into multiple parts by page ranges (e.g. `1-3`, `4-4`, `5-`). Output is a ZIP file. | | **Rotate PDF Pages** | Rotate specific pages by 90°, 180°, or 270°. | | **Keep or Remove PDF Pages** | Keep or remove specific pages from a PDF using page specs like `1`, `2-5`, `3-`. | | **Add PDF Watermark** | Add a text watermark to all or specific pages. Supports font size, opacity, rotation, and hex color. | | **Get PDF Metadata** | Extract metadata such as page count, title, author, and creation date. Result is returned in the job metadata — no output file is created. | | **Protect PDF** | Encrypt a PDF with a user password (to open) and/or an owner password (to edit). | | **Unlock PDF** | Remove password protection from a PDF. | | **Compress PDF** | Reduce PDF file size with three compression levels: low, medium, or high. | | **Convert PDF to Image** | Convert PDF pages to PNG or JPEG images. Configurable DPI (72–600). | | **Get PDF Form Fields** | Extract form field names, types, and current values from a PDF. | | **Fill PDF Form** | Fill form fields in a PDF with provided values. Supports text, checkboxes, dropdowns, and radio groups. Optionally flatten fields. | ### Document Tools | Module | Description | | ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- | | **Convert DOCX** | Convert a DOCX file to PDF or other formats like ODT. | | **Convert ODT** | Convert an ODT file to PDF or other formats like DOCX. | | **Replace Placeholders in DOCX/ODT** | Replace `{{placeholder}}` tags in a DOCX or ODT document with text, images, lists, or table data. Output format is configurable. | ### Tool Jobs | Module | Description | | ----------------------- | ----------------------------------------------------- | | **Get Tool Job Status** | Check the current status of a PDF/document tool job. | | **List Tool Jobs** | List tool jobs for your organization with pagination. | ## How tool modules work Most PDF and document tool modules follow the same pattern: 1. **Submit** — The module sends a request to the API and receives a job ID 2. **Poll** — The module automatically polls for job completion (every 2 seconds, up to 5 minutes) 3. **Return** — Once completed, the module returns the job ID, status, output file ID, and metadata You don't need to handle polling yourself — each tool module waits for the result automatically. Input files are **not deleted** after a tool job completes. They remain available until they expire (default: 60 minutes). You can reuse the same file ID across multiple tool modules in your scenario. ## Common workflow patterns ### Generate a PDF from dynamic data 1. Use a trigger module (e.g. Google Sheets, Airtable, or a webhook) to get your data 2. Add **Render Document from JSON** and build your document JSON with Make.com data mapping 3. Use **HTTP — Get a file** to download the rendered PDF from the returned `downloadUrl` ### Bulk generate personalized documents 1. Add **Bulk Render from JSON** with a document ID and an array of variable sets 2. The module waits for all documents to be generated 3. Use **Download Bulk Render Output** to get a ZIP file with all documents ### Process an existing PDF 1. Use **HTTP — Get a file** to download a PDF from any source 2. Add **Upload a Document** to upload it as a tool file 3. Apply any tool action (e.g. **Add PDF Watermark**, **Compress PDF**, **Merge PDFs**) 4. Use **Download a File** with the `outputFileId` to get the processed result # ChatGPT Source: https://docs.autype.com/automation/integrations/mcp/chatgpt Connect Autype to ChatGPT with OAuth Connect Autype as a remote MCP app in ChatGPT. No Autype API key needs to be copied into ChatGPT. ## Add Autype 1. Enable **Developer mode** in ChatGPT under **Settings → Apps & Connectors → Advanced settings**. 2. Open **Settings → Apps & Connectors → Create**. 3. Enter a name such as `Autype` and use this MCP server URL: ```text theme={null} https://mcp.autype.com/mcp ``` 4. Select OAuth authentication if ChatGPT asks for the authentication type. 5. Save the app and start the connection. 6. Sign in to Autype in the browser window, choose the organization, review the permissions, and approve access. ChatGPT discovers the OAuth endpoints and registers its public client automatically. Autype supports both Client ID Metadata Documents and Dynamic Client Registration with PKCE. To remove access later, open **Autype Settings → Connected Apps**, select the ChatGPT connection for the relevant workspace, and click **Disconnect**. You can reconnect it through ChatGPT at any time. Review tool calls that create, change, delete, or render data before confirming them. Autype publishes read-only and destructive hints, but the final confirmation experience is controlled by ChatGPT. ## Verify the connection Start a new chat with the Autype app enabled and ask: > *"List my Autype projects, but do not change anything."* Then test a write operation explicitly: > *"Create a one-page A4 PDF draft titled OAuth connection test and show me the result."* ## Reconnect after tool changes ChatGPT snapshots a connector's tool definitions. If Autype adds or changes tools later, refresh or recreate the connector before testing the new schema. See OpenAI's [Developer mode documentation](https://developers.openai.com/api/docs/guides/developer-mode) for the current ChatGPT controls. # Claude Source: https://docs.autype.com/automation/integrations/mcp/claude Connect Autype to Claude with OAuth Connect the hosted Autype MCP server to Claude as a remote connector. Autype supports Claude's OAuth discovery, PKCE, Dynamic Client Registration, refresh tokens, and current remote MCP transport. ## Add Autype 1. Open Claude's connector or integration settings. 2. Add a custom remote connector. 3. Enter a name such as `Autype` and use: ```text theme={null} https://mcp.autype.com/mcp ``` 4. Start the connection and complete the Autype browser consent screen. 5. Choose the organization Claude may access, review the requested permissions, and approve access. No custom headers or copied API keys are required. Claude registers a public OAuth client and uses its supported callback URL automatically. To remove access later, open **Autype Settings → Connected Apps**, select the Claude connection for the relevant workspace, and click **Disconnect**. You can reconnect it through Claude at any time. ## Verify the connection Ask Claude: > *"Use Autype to list my projects. Do not create or modify anything."* For a render test, ask: > *"Use Autype to create a one-page A4 PDF called Claude connector test, then return its download link."* ## Claude Code Claude Code can also connect to the same Streamable HTTP URL. See [Claude Code (CLI)](/automation/integrations/mcp/claude-code) for configuration and the legacy API-key fallback. See Anthropic's [remote connector guide](https://claude.com/docs/connectors/building) for the current Claude product flow. # Claude Code (CLI) Source: https://docs.autype.com/automation/integrations/mcp/claude-code Connect Autype to Claude's command-line interface Connect the Autype MCP server to Claude Code, the official CLI tool for Claude. Claude Code versions with remote OAuth support can connect using only the Streamable HTTP URL and then open the Autype consent flow. If your installed version does not start OAuth, use the API-key fallback below. ## OAuth (recommended) ```bash theme={null} claude mcp add --transport http autype https://mcp.autype.com/mcp ``` Run Claude Code and complete the browser sign-in and consent flow when prompted. ## API-key fallback ```bash theme={null} claude mcp add autype \ --transport http \ --url https://mcp.autype.com/mcp \ --header "X-API-Key: YOUR_API_KEY" ``` Replace `YOUR_API_KEY` with your actual API key from the [Dashboard](https://app.autype.com). ## Project-specific config For team-wide sharing, add it to your project's `.mcp.json`: ```json theme={null} { "mcpServers": { "autype": { "type": "http", "url": "https://mcp.autype.com/mcp", "headers": { "X-API-Key": "YOUR_API_KEY" } } } } ``` Do not commit API keys to version control. Use environment variables or a `.env` file instead. ## Verify connection Run a test command to verify the connection: ```bash theme={null} claude "List my Autype projects" ``` Claude should be able to call the `projects_list` tool and return your projects. # Claude Desktop Source: https://docs.autype.com/automation/integrations/mcp/claude-desktop Connect Autype to Claude Desktop app Connect the Autype MCP server to Claude Desktop for macOS or Windows. For Claude's hosted remote connector with browser-based OAuth, use the [Claude integration guide](/automation/integrations/mcp/claude). The configuration below is the legacy API-key fallback for clients that do not start OAuth automatically. ## Configuration Add the following to your `claude_desktop_config.json`: ```json theme={null} { "mcpServers": { "autype": { "type": "http", "url": "https://mcp.autype.com/mcp", "headers": { "X-API-Key": "YOUR_API_KEY" } } } } ``` Replace `YOUR_API_KEY` with your actual API key from the [Dashboard](https://app.autype.com). Keep this file private. ## Config file location The config file is located at: * **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` * **Windows**: `%APPDATA%\Claude\claude_desktop_config.json` ## Restart Claude Desktop After saving the config file, restart Claude Desktop completely (quit and reopen) for the changes to take effect. ## Verify connection Once restarted, you should see the Autype tools available in Claude Desktop. You can verify by asking: > *"What Autype tools do you have access to?"* Claude should list all available Autype tools like `render_document`, `render_json`, `builder_create_session`, etc. # Cursor Source: https://docs.autype.com/automation/integrations/mcp/cursor Connect Autype to Cursor AI-powered code editor Connect the Autype MCP server to Cursor, the AI-first code editor. ## Configuration via Settings 1. Open **Cursor Settings** (Cmd+, on macOS, Ctrl+, on Windows) 2. Navigate to **MCP** section 3. Add a new server with the following configuration: ```json theme={null} { "mcpServers": { "autype": { "type": "http", "url": "https://mcp.autype.com/mcp", "headers": { "X-API-Key": "YOUR_API_KEY" } } } } ``` Replace `YOUR_API_KEY` with your actual API key from the [Dashboard](https://app.autype.com). ## Project-specific config Alternatively, create a `.cursor/mcp.json` file in your project root: ```json theme={null} { "mcpServers": { "autype": { "type": "http", "url": "https://mcp.autype.com/mcp", "headers": { "X-API-Key": "YOUR_API_KEY" } } } } ``` This allows team members to share the same MCP configuration. Do not commit API keys to version control. Use environment variables or a team-specific `.env` file instead. ## Restart Cursor After adding the configuration, restart Cursor completely for the changes to take effect. ## Verify connection Open the Cursor AI chat and ask: > *"What Autype tools are available?"* Cursor should list all available Autype tools. # MCP Inspector Source: https://docs.autype.com/automation/integrations/mcp/inspector Test and debug the Autype MCP server with the official inspector tool The MCP Inspector is an official debugging tool for testing MCP servers. Use it to verify your Autype MCP connection, explore available tools, and test tool calls interactively. ## Installation Install the MCP Inspector globally via npm: ```bash theme={null} npm install -g @modelcontextprotocol/inspector ``` Or use npx to run it without installing: ```bash theme={null} npx @modelcontextprotocol/inspector ``` ## Connecting to Autype MCP ```bash theme={null} mcp-inspector \ --transport http \ --url https://mcp.autype.com/mcp \ --header "X-API-Key: YOUR_API_KEY" ``` Replace `YOUR_API_KEY` with your actual API key from the [Dashboard](https://app.autype.com). ## Using the Inspector Once connected, the Inspector opens a web interface (usually at `http://localhost:5173`) where you can: 1. **View available tools** — See all 17 Autype tools with their parameters and descriptions 2. **Read resources** — Inspect the document schema resources (`autype://schemas/document`, etc.) 3. **Test tool calls** — Call tools interactively and see the responses 4. **Debug errors** — View detailed error messages and request/response logs ## Example workflow 1. **List tools** — Verify all Autype tools are available 2. **Read the agent guide** — Open `autype://guides/authoring` first; load `autype://schemas/markdown-syntax` only for complete advanced attribute tables 3. **Test render** — Call `render_document` with sample content: ```json theme={null} { "content": "# Test Document\n\nThis is a test.", "document": { "type": "pdf" } } ``` 4. **Check response** — Verify you receive a `downloadUrl` in the response ## Troubleshooting ### 401 Unauthorized If you see "401 Unauthorized": * Verify your API key is correct * Check the header format: `--header "X-API-Key: YOUR_API_KEY"` (with quotes) * Ensure the API key is active in the [Dashboard](https://app.autype.com) ### Tools not showing up If no tools appear in the Inspector: * Try reconnecting with the Inspector * Use `https://mcp.autype.com/mcp`; the equivalent trailing-slash form is accepted and normalized ## Next steps Once you've verified the connection with the Inspector, you can connect your AI agent or IDE using the same URL and API key. Connect to Claude Desktop app Connect to Cursor IDE Connect to Windsurf IDE Connect to VS Code with Copilot # MCP Server Overview Source: https://docs.autype.com/automation/integrations/mcp/overview Connect any MCP-compatible AI agent or IDE to Autype The Autype MCP server implements the current [Model Context Protocol](https://modelcontextprotocol.io) authorization model over Streamable HTTP. It exposes Autype's document generation capabilities as tools that compatible AI assistants and IDEs can call directly — no custom code required. ## What is MCP? The Model Context Protocol (MCP) is an open standard that allows AI agents and applications to access external tools and data sources. Think of it as a universal API that AI assistants understand natively. With the Autype MCP server, your AI agent can: * **Generate documents** from Extended Markdown and receive a download URL * **Create and edit persistent documents** in your Autype workspace using Extended Markdown plus compact metadata * **Build documents iteratively** — create a session, append Markdown, then render * **Reuse organization styles** — list, create, update, and apply shared style presets by ID * **List projects** — browse your Autype projects and documents * **Upload and reuse media** — manage temporary render images and toolkit files * **Process PDFs and source files** — merge, split, convert, OCR, classify, and extract structured data * **Roundtrip Word documents** — import DOCX as editable Autype JSON and render the edited result back to DOCX * **Use JSON when needed** — advanced clients can still render or inspect full document JSON for complete structural control ## Connect with OAuth (recommended) Use this remote MCP URL: ```text theme={null} https://mcp.autype.com/mcp ``` The canonical server display name is **Autype**. ChatGPT, Codex, Claude, or an IDE may derive a local alias such as `autype-prod` or `autype_prod`; that alias belongs to the client UI and is not an additional Autype endpoint. Always use the exact server label exposed by the current client when addressing a tool or resource. In production, Autype discovery, authorization, and MCP resource URLs always use public HTTPS endpoints. Local native clients such as Codex CLI may still register an ephemeral `http://127.0.0.1:/callback/...` redirect URI. That loopback address belongs to the client on the user's machine and is not an Autype production endpoint. Hosted clients such as ChatGPT and Claude register their own HTTPS callback URLs instead. OAuth-capable clients discover Autype's authorization server automatically. The client opens Autype in your browser, where you sign in, choose an organization, review the requested permissions, and approve or deny access. You never copy an API key into the client. Autype supports: * OAuth 2.1 authorization code flow with PKCE (`S256`) * Protected Resource Metadata and authorization server discovery * Client ID Metadata Documents (CIMD) and Dynamic Client Registration (DCR) * Resource-bound, short-lived access tokens * Server-side token exchange: MCP access tokens are never forwarded to the Developer API * Rotating refresh tokens when the client requests `offline_access` * Per-tool scopes and security metadata Your Autype plan must include Developer API access. OAuth grants are bound to the selected organization and can never expand beyond the permissions approved during consent. ### Manage or disconnect apps Open **Autype Settings → Connected Apps** to review every active OAuth connection. Each entry shows the client, workspace, granted permissions, and whether the client has background access. Connections are personal: removing your connection does not disconnect another member who authorized the same client. Disconnecting an app immediately revokes all of its access and refresh tokens for the selected workspace, as well as any authorization code that has not yet been exchanged. The OAuth client registration itself remains available so the app can be connected again through the normal consent flow. ### Legacy API-key clients Clients without OAuth support can continue to send an Autype API key in the `X-API-Key` header. Existing configurations remain compatible, but OAuth is preferred for interactive ChatGPT and Claude integrations because credentials are short-lived, scoped, revocable, and never stored in client configuration files. ## Supported clients Connect Autype as a custom app in ChatGPT using OAuth. Connect Autype as a remote connector in Claude using OAuth. Connect Autype to Claude Desktop app for macOS and Windows. Use Autype with Claude's command-line interface. Integrate Autype into the Cursor AI-powered code editor. Connect Autype to Windsurf IDE with Cascade. Use Autype with GitHub Copilot in Visual Studio Code. Test and debug the Autype MCP server with the official inspector tool. ## OAuth permissions | Scope | Allows | | ------------------ | ------------------------------------------------------------------------------------------ | | `read:documents` | Read and list documents, projects, records, styles, blocks, and render status. | | `write:documents` | Create or update documents, records, builder sessions, and related content. | | `render:documents` | Start document and image renders. | | `manage:resources` | Create, update, or delete reusable styles and blocks. | | `manage:files` | Access file-related Developer API operations. | | `offline_access` | Let the client obtain a rotating refresh token; it is not included in access-token scopes. | Autype validates the required scope again for every MCP tool and Developer API request. If a tool needs a permission that was not granted, the request is rejected instead of silently broadening access. ## Available tools ### Recommended authoring model For MCP agents, the preferred format is **Autype Extended Markdown (AEM) plus compact JSON metadata**. AEM is Autype's semantic document language, not merely plain Markdown: * Put readable content in Markdown. * Pass variables, abbreviations, citations, document settings, and `style_preset_id` as separate fields. * Use workspace or built-in system style presets by ID instead of sending large inline `defaults` objects. The full Autype JSON schema remains supported for advanced clients through explicit JSON render/retrieval tools. The builder tools are Markdown-only so agents do not have to choose between two authoring models. ### Persistent document tools | Tool | Description | | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | `documents_list` | List persistent documents in the organization, optionally filtered by project. | | `documents_create_markdown` | Create a saved Autype document from Extended Markdown. This is the recommended persistent create flow for MCP agents. | | `documents_create_json` | Advanced/migration: create a saved document from the complete Autype JSON schema. | | `documents_get_markdown` | Read a saved document as Extended Markdown plus compact metadata (`document`, `variables`, `abbreviations`, `citations`, `stylePresetId`, etc.). | | `documents_update_markdown` | Update a saved document from Extended Markdown. Omitted metadata is preserved by the API. | | `documents_get_markdown_outline` | Return heading/directive chunks, line ranges, hashes, and revision for a saved Markdown document. | | `documents_get_markdown_chunk` | Retrieve one Markdown chunk by `chunkId` or a direct `line_start`/`line_end` range. | | `documents_patch_markdown` | Apply line-based Markdown patch operations with optional revision/hash conflict checks. | | `documents_get_json` | Advanced/debug: read the full internal Autype JSON snapshot. | | `documents_render` | Render the latest saved snapshot to PDF, DOCX, ODT, PNG, or JPEG. | ### Render tools | Tool | Description | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `render_document` | Render AEM to PDF/DOCX/ODT. Takes `content` and `document` as separate top-level parameters, plus optional `style_preset_id`, `defaults`, `variables`, `abbreviations`, and `citations`. This is the recommended default for AI agents. | | `render_json` | Advanced/debug: render a complete document JSON to PDF/DOCX/ODT. Takes a `config` object with `document` and `sections`. | | `render_document_images` | Render Extended Markdown to PNG/JPEG page images for visual QA. A single page is returned directly; multiple pages are a ZIP. | | `render_json_images` | Advanced/debug: render complete document JSON to PNG/JPEG page images. | | `check_export_readiness` | Strictly validate semantic AEM source readiness without starting a render job or consuming credits. Its score is not visual approval; inspect rendered pages and every requested final format separately. | | `render_get_status` | Poll for render job status by job ID. Returns status, download URL (when completed), format, credit cost, and timestamps. | | `render_list_jobs` | List render jobs with pagination (`page`, `limit`) and optional `status` filter ("PENDING", "PROCESSING", "COMPLETED", "FAILED"). | The MCP render tools enable strict validation by default. Redundant page breaks, broken internal references, and other readiness errors are returned before a job consumes credits. Set `strict=false` only when intentionally rendering a legacy document that depends on permissive behaviour. ### Style tools | Tool | Description | | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `styles_list` | List compact reusable style summaries. Use `source=workspace`, `source=system`, or `source=all`; every result includes its source and whether it is editable. | | `styles_get` | Read one workspace or system style, including the reusable defaults definition. Built-in IDs use `system:` and are immutable. | | `styles_create` | Create a new organization style preset. | | `styles_update` | Update a style preset name, description, default flag, or definition. | | `styles_delete` | Delete an organization style preset. | ### Reusable block tools | Tool | Description | | ------------------------------------ | -------------------------------------------------------------------------------------------------------------- | | `reusable_blocks_list` | Search organization blocks by text or category. | | `reusable_blocks_get` | Read a block's current Extended Markdown and version history. | | `reusable_blocks_create` | Create a reusable block from Extended Markdown. Use only when the user explicitly wants to manage the library. | | `reusable_blocks_update` | Update metadata or publish a new Markdown version. | | `reusable_blocks_delete` | Delete a library block; existing references retain fallback content. | | `reusable_blocks_markdown_directive` | Build the correct reference or snapshot directive for a known block ID. | ### Record tools | Tool | Description | | ------------------------- | -------------------------------------------------------------------------------------------------------- | | `records_list` | List saved customer/case records for a document. | | `records_prepare` | Compare candidate values with document variables and report missing, unused, and type-mismatched values. | | `records_create` | Save a version-aware variable dataset without rendering it. | | `fill_template_variables` | Validate values and create a record only when required values and types are compatible. | | `records_get` | Read one record and its recent export history. | | `records_update` | Update record values, label, metadata, or status. | | `records_delete` | Archive a saved record while preserving its audit history. | | `records_render` | Render a saved record with optional one-off value overrides. | ### Document builder tools | Tool | Description | | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `builder_create_session` | Create a new session. Accepts `document_type` ("pdf"/"docx"/"odt"), `size` ("A4"/"A3"/"A5"/"Letter"/"Legal"), `orientation`, `title`, and margin settings. Returns a `sessionId`. | | `builder_get_session` | Get the session state: Markdown content, logical Markdown sections, metadata, variables, abbreviations, citations, and style preset ID. | | `builder_list_sessions` | List all active builder sessions. | | `builder_update_document` | Update document-level settings (type, size, orientation, title, author, filename, margins). Only provided fields are changed. | | `builder_set_markdown` | Replace the session content with Extended Markdown. Prefer this over JSON sections for agent-authored documents. | | `builder_append_markdown` | Append Extended Markdown to the session. Useful for building longer documents step by step. | | `builder_add_markdown_section` | Add a logical Markdown section. Sections are flexible: chapters, clauses, appendices, page sections, or any split chosen by the agent. | | `builder_update_markdown_section` | Replace or rename one logical Markdown section. | | `builder_get_markdown_section` | Retrieve one logical Markdown section by ID. | | `builder_remove_markdown_section` | Remove one logical Markdown section. | | `builder_reorder_markdown_sections` | Reorder logical Markdown sections by ID. | | `builder_get_outline` | Return heading/directive chunks, line ranges, and hashes for the builder Markdown content. | | `builder_get_chunk` | Retrieve one builder Markdown chunk by `chunkId` or line range. | | `builder_patch_chunk` | Apply line-based Markdown patch operations to builder content. | | `builder_set_style_preset` | Set or clear a reusable workspace or built-in system style preset for the session. | | `builder_update_defaults` | Set or merge inline defaults for one-off overrides. Prefer `builder_set_style_preset` for reusable styles. | | `builder_set_variables` | Set or merge template variables for `\{\{varName\}\}` substitution. Values can be strings, number objects, image objects, list objects, or table objects. | | `builder_render` | Render the session to the configured output format. Waits for completion and returns a download URL. | | `builder_render_images` | Render the current session to PNG/JPEG pages for visual QA before final export. | | `builder_delete_session` | Delete a session and free its memory. | ### Template tools | Tool | Description | | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `templates_list_markdown` | Search one bounded template collection at a time (maximum 20 items). `scope=workspace` is the productive default and returns only organization-owned templates. `scope=catalog` browses built-in quick-start templates without mixing them into productive results. | | `templates_get_markdown` | Read one accessible template as AEM plus compact document metadata. Check `productive` before using it for an export. | | `templates_fill_and_render` | Fill typed variables in an organization-owned workspace template and submit a PDF, DOCX, or ODT render. Built-in catalog templates are intentionally rejected. Poll the returned job with `render_get_status`. | System document templates are designed primarily as frontend quick starts. MCP clients may browse them for orientation through `scope=catalog`, but should not treat them as organization-approved business templates. Productive template automation always starts from `scope=workspace`. Styles intentionally differ: both organization styles and built-in system styles are first-class MCP resources, with explicit source markers and filters. ### Other tools | Tool | Description | | ------------------ | ------------------------------------------------------------------------------------------------------------- | | `projects_list` | List projects with pagination (`page`, `limit`). Each project contains document IDs for persistent rendering. | | `projects_create` | Create an organization-wide public project for persistent documents. | | `auth_get_context` | Show the authenticated organization, represented user, granted scopes, and available credits. | ### Bulk render tools | Tool | Description | | ----------------------------- | ---------------------------------------------------------------------- | | `bulk_get_document_variables` | Inspect typed variables required by a persistent document. | | `bulk_render` | Render 1–100 variable sets as a ZIP of PDF, DOCX, or ODT files. | | `bulk_render_file` | Upload CSV, Excel, or JSON variable data and create a bulk render job. | | `bulk_get_status` | Poll progress and receive the signed ZIP download URL. | ### Media and file toolkit | Tool | Description | | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | `images_upload`, `images_list`, `images_delete` | Manage 24-hour render images and use returned `refPath` values in AEM. | | `files_upload`, `files_list`, `files_get`, `files_delete` | Manage 60-minute source/output files. Binary content is not echoed into LLM context. | | `docx_import` | Convert an uploaded DOCX to validated editable Autype Document JSON, including protected image fallbacks and structured quality diagnostics. | | `pdf_process` | Merge, split, rotate, keep/remove pages, watermark, inspect metadata/forms, protect/unlock, compress, convert pages to images, fill, or flatten PDFs. | | `files_convert` | Convert DOCX, ODT, HTML, and images, or replace typed DOCX/ODT placeholders. | | `lens_process` | OCR to Markdown/AEM/JSON, generate filenames, classify documents, or extract typed data. | | `tools_get_job`, `tools_list_jobs` | Poll asynchronous toolkit jobs and retrieve output file metadata/download URLs. | Completed toolkit jobs return both `outputFileId` and an authenticated Autype API `downloadUrl`; object-storage endpoints are never exposed. For images, upload actual PNG/JPEG/WebP bytes with `images_upload` and insert its returned `refPath`. The internal `autype-ai-image` placeholder is not a valid final MCP render source and strict readiness rejects it. `images_upload` accepts PNG, JPEG, and WebP as plain Base64, whitespace-wrapped Base64, or a Base64 data URL, up to 25 MB decoded. Its temporary `refPath` is promoted to organization-protected permanent storage when a persistent document using it is created or updated. Toolkit uploads accept PDF, DOCX, ODT, Markdown, HTML, PNG, JPEG, GIF, BMP, and SVG; they remain temporary and expire after 60 minutes. The dispatcher tools publish their complete operation/option contract in the tool description and reject missing, unknown, mistyped, or out-of-range options before a job is queued. ## Schema resources The MCP server exposes the Autype document schema as readable resources. Your AI agent can read these to understand the exact structure before constructing a document: | Resource URI | Description | | ------------------------------------ | ----------------------------------------------------------------------------------------- | | `autype://guides/authoring` | Token-efficient AEM workflow and complete syntax-family map. Recommended first resource. | | `autype://schemas/markdown-syntax` | Complete AEM syntax, attribute, and example reference. Load for advanced syntax. | | `autype://schemas/document` | Advanced/debug: full document JSON schema (sections, elements, defaults, variables, etc.) | | `autype://schemas/defaults` | Defaults schema (fonts, colors, spacing, header/footer) | | `autype://schemas/document-settings` | Document settings (page size, orientation, margins, output format) | | `autype://schemas/variables` | Template variables for text substitution | | `autype://schemas/abbreviations` | Abbreviation entries for automatic expansion | | `autype://schemas/citations` | Citation entries and bibliography configuration | | `autype://schemas/style-bundle` | Focused reusable typography/page-design style contract | | `autype://schemas/page-style-entry` | Default, first, odd, even, section, and blank page variants | | `autype://schemas/page-region` | Multi-row/multi-column header and footer regions | | `autype://schemas/region-block` | Text, image, field, rule, QR, spacer, and shape blocks | | `autype://schemas/style-operations` | Compact atomic updates for existing reusable styles | ## Example prompts Once connected, you can ask your AI agent naturally: > *"Generate a two-page PDF invoice for client Acme GmbH, total €2,400, due 2026-03-15. Include a line items table."* > *"Convert this markdown report to a PDF with A4 size and 3cm margins."* > *"Create a DOCX contract template with \{\{client\_name}}, \{\{start\_date}}, and \{\{monthly\_fee}} variables."* > *"Find the approved legal disclaimer block, insert it as a live reference, and create a PDF form with customer and signature fields."* > *"Prepare a record for customer Acme, report any missing values, then render it as PDF."* > *"List my recent render jobs and download the latest completed one."* # VS Code (GitHub Copilot) Source: https://docs.autype.com/automation/integrations/mcp/vscode Connect Autype to Visual Studio Code with GitHub Copilot Connect the Autype MCP server to Visual Studio Code with GitHub Copilot. MCP support in VS Code requires GitHub Copilot and may be in preview. Check the [GitHub Copilot documentation](https://github.com/features/copilot) for the latest information. ## Configuration Add to your `.vscode/mcp.json` in your project root: ```json theme={null} { "servers": { "autype": { "type": "http", "url": "https://mcp.autype.com/mcp", "headers": { "X-API-Key": "YOUR_API_KEY" } } } } ``` Replace `YOUR_API_KEY` with your actual API key from the [Dashboard](https://app.autype.com). ## User-level config Alternatively, add to your VS Code user settings (`settings.json`): ```json theme={null} { "mcp.servers": { "autype": { "type": "http", "url": "https://mcp.autype.com/mcp", "headers": { "X-API-Key": "YOUR_API_KEY" } } } } ``` Do not commit API keys to version control. Use environment variables or workspace-specific settings instead. ## Reload VS Code After adding the configuration, reload VS Code (Cmd+Shift+P → "Developer: Reload Window") for the changes to take effect. ## Verify connection Open GitHub Copilot Chat and ask: > *"What Autype tools are available?"* Copilot should list all available Autype tools. # Windsurf Source: https://docs.autype.com/automation/integrations/mcp/windsurf Connect Autype to Windsurf IDE with Cascade Connect the Autype MCP server to Windsurf, the AI-powered IDE with Cascade. ## Configuration 1. Open **Windsurf Settings** (Cmd+, on macOS, Ctrl+, on Windows) 2. Navigate to **Cascade → MCP Servers** 3. Add the following configuration: ```json theme={null} { "mcpServers": { "autype": { "type": "http", "url": "https://mcp.autype.com/mcp", "headers": { "X-API-Key": "YOUR_API_KEY" } } } } ``` Replace `YOUR_API_KEY` with your actual API key from the [Dashboard](https://app.autype.com). ## Restart Windsurf After adding the configuration, restart Windsurf completely for the changes to take effect. ## Verify connection Open Cascade (Cmd+L on macOS, Ctrl+L on Windows) and ask: > *"What Autype tools do you have access to?"* Cascade should list all available Autype tools like `render_document`, `render_json`, `builder_create_session`, etc. ## Using Autype with Cascade Once connected, you can ask Cascade to generate documents naturally: > *"Generate a PDF invoice for client Acme Corp, total \$5,000, due March 15th. Include a table with 3 line items."* > *"Create a DOCX contract template with variables for client name, start date, and monthly fee."* Cascade will use the Autype tools to construct the document and provide you with a download link. # n8n Source: https://docs.autype.com/automation/integrations/n8n/overview Connect Autype to n8n for self-hosted document automation workflows **Variable syntax:** n8n uses `{{...}}` for its own expressions, which conflicts with Autype's default variable syntax. When building n8n workflows, use the alternative **`${varName}`** syntax for Autype variable placeholders instead. The API automatically converts `${...}` to `{{...}}` internally. This applies to all API input — document JSON, Markdown content, and bulk render items. ## Overview The [n8n-nodes-autype](https://www.npmjs.com/package/n8n-nodes-autype) community node lets you generate documents, render PDFs, and manage content directly from n8n workflows. Self-host your entire document automation pipeline with n8n's visual editor and Autype's rendering engine. ## Prerequisites * An Autype account with an API key ([Dashboard → Settings → API Keys](https://app.autype.com)) * An [n8n](https://n8n.io) instance (self-hosted or n8n Cloud) ## What you can do With the Autype community node for n8n, you can: * **Render documents** from JSON or Extended Markdown to PDF, DOCX, or ODT * **Bulk render** documents with variable data from spreadsheets, CRMs, or databases * **Manage projects and documents** — create, list, and retrieve documents * **Upload images** for use in documents * **PDF tools** — merge, split, rotate, watermark, compress, and more * **Use as AI tool** — the node has `usableAsTool` enabled, so AI agents in n8n can call it directly ## Installation ### n8n Cloud or self-hosted (GUI) 1. Go to **Settings → Community Nodes** 2. Enter `n8n-nodes-autype` 3. Click **Install** ### Self-hosted (CLI) ```bash theme={null} cd ~/.n8n npm install n8n-nodes-autype ``` Restart n8n after installing. ## Using variables in n8n Since n8n reserves the `{{...}}` syntax for its own expressions, Autype accepts `${...}` as an alternative on all API inputs. ### Example: Document JSON in n8n Instead of: ```json theme={null} { "sections": [{ "type": "flow", "content": [ { "type": "h1", "text": "Invoice for {{companyName}}" }, { "type": "text", "text": "Date: {{invoiceDate}}" } ] }] } ``` Use this in n8n: ```json theme={null} { "sections": [{ "type": "flow", "content": [ { "type": "h1", "text": "Invoice for ${companyName}" }, { "type": "text", "text": "Date: ${invoiceDate}" } ] }] } ``` Both forms are equivalent. The API normalizes `${...}` to `{{...}}` before processing. ### Mixing n8n expressions and Autype variables You can freely combine n8n's expression syntax with Autype's `${...}` variable placeholders. In the node's JSON fields, n8n expressions are evaluated first, then Autype substitutes its own variables during rendering: ``` Invoice for ${companyName} — generated on {{ $now.format('yyyy-MM-dd') }} ``` In this example: * `{{ $now.format('yyyy-MM-dd') }}` is an **n8n** expression evaluated at execution time * `${companyName}` is an **Autype** variable placeholder substituted during rendering The `${...}` syntax is only for **input**. If you retrieve document content from the API (e.g., via the Get Document operation), variable placeholders will always be returned as `{{...}}`. ## Built-in variables The following Autype variables are always available and work with both syntaxes: | `${...}` syntax | `{{...}}` equivalent | Description | | -------------------- | --------------------- | ------------------------------- | | `${pageNumber}` | `{{pageNumber}}` | Current page number | | `${totalPages}` | `{{totalPages}}` | Total number of pages | | `${date}` | `{{date}}` | Current date (DD.MM.YYYY) | | `${date/YYYY-MM-DD}` | `{{date/YYYY-MM-DD}}` | Current date with custom format | ## Getting started In your n8n instance, go to **Settings → Community Nodes** and install `n8n-nodes-autype`. Go to the [Autype Dashboard](https://app.autype.com) and navigate to **Settings → API Keys**. Create a new key — it will start with `ak_...`. In n8n, go to **Credentials → Add Credential** and search for **Autype**. Paste your API key and save. Add the **Autype** node to your workflow, choose a resource and operation (e.g. **Render → Render from JSON**), and configure it. Execute the workflow to generate your first document. API keys are scoped to your organization. Keep them secret — never commit them to version control or store them in plain text. ## Available operations The Autype community node provides **40+ operations** across 8 resources. Each operation maps directly to an endpoint of the [Developer API](/api-reference/introduction). ### Rendering | Operation | Description | | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Render from JSON** | Submit a complete document as structured JSON and render it to PDF, DOCX, or ODT. Optionally waits for completion and returns binary output. | | **Render from Markdown** | Submit content as Extended Markdown and render it to PDF, DOCX, or ODT. Supports page size, orientation, margins, variables, defaults, abbreviations, citations, and style options. | | **Render Persistent Document** | Render an existing document from your Autype workspace by its ID. Optionally override variables and output format. | | **Validate JSON** | Validate a document JSON configuration without rendering. Returns validation errors if any. | | **Validate Markdown** | Validate Markdown content without rendering. | | **List Render Jobs** | List all render jobs for your organization with pagination. | ### Bulk Rendering | Operation | Description | | ------------------------- | -------------------------------------------------------------------------------------------- | | **Bulk Render from JSON** | Create up to 100 documents at once by providing a document ID and an array of variable sets. | | **Bulk Render from File** | Upload a CSV, Excel, or JSON file with variable data to generate documents in bulk. | ### Documents | Operation | Description | | -------------------------- | ----------------------------------------------------------------- | | **List Documents** | List all documents, optionally filtered by project. | | **Get a Document** | Retrieve a document by ID including its latest content. | | **Create a Document** | Create a new document in a project with optional initial content. | | **Get Document Variables** | Get variable definitions for a document. | ### Projects | Operation | Description | | -------------------- | --------------------------------------- | | **List Projects** | List all projects in your organization. | | **Create a Project** | Create a new project. | ### Files (Tool Files) | Operation | Description | | ---------------------------- | ----------------------------------------------------------------------------------------------------------------- | | **Upload a File** | Upload a file (PDF, DOCX, ODT, PNG, JPEG) for use with tool operations. Files expire after 60 minutes. | | **Get File Details** | Get metadata for a specific tool file. | | **Download a File** | Download a tool file by ID as binary data. | | **List Tool Files** | List all non-expired tool files. | | **Delete a File** | Delete a tool file from storage. | | **Upload a Temporary Image** | Upload an image for use in ad-hoc renders (expires after 24 hours). Returns a `refPath` for use in document JSON. | | **List Temporary Images** | List all non-expired temporary images. | | **Delete a Temporary Image** | Delete a temporary image. | ### PDF Tools | Operation | Description | | ------------------------ | ------------------------------------------------------------------------------- | | **Merge PDFs** | Merge 2–20 PDF files into a single document. | | **Split PDF** | Split a PDF into multiple parts by page ranges. Output is a ZIP file. | | **Rotate PDF Pages** | Rotate specific pages by 90°, 180°, or 270°. | | **Keep or Remove Pages** | Keep or remove specific pages using page specs like `1`, `2-5`, `3-`. | | **Add Watermark** | Add a text watermark with configurable font size, opacity, rotation, and color. | | **Get Metadata** | Extract page count, title, author, and creation date. | | **Protect PDF** | Encrypt a PDF with user and/or owner passwords. | | **Unlock PDF** | Remove password protection from a PDF. | | **Compress PDF** | Reduce file size (low, medium, or high compression). | | **PDF to Image** | Convert pages to PNG or JPEG (configurable DPI). | | **Get Form Fields** | Extract form field names, types, and values. | | **Fill Form** | Fill form fields with text, checkboxes, dropdowns, and radio values. | ### Document Tools | Operation | Description | | ------------------------ | -------------------------------------------------------------------- | | **Convert DOCX to PDF** | Convert a DOCX file to PDF. | | **Convert ODT to PDF** | Convert an ODT file to PDF. | | **Replace Placeholders** | Replace placeholder tags in a DOCX or ODT document with text values. | | **List Tool Jobs** | List tool jobs with pagination. | ## How tool operations work Most PDF and document tool operations follow the same pattern: 1. **Submit** — The node sends a request to the API and receives a job ID 2. **Poll** — When "Wait for Completion" is enabled, the node polls automatically (every 2 seconds, up to 5 minutes) 3. **Return** — Once completed, the node returns the job ID, status, output file ID, metadata, and optionally the binary output Enable **Download Output** to receive the result as binary data directly attached to the node output. This lets you chain results into subsequent nodes (e.g., send the PDF via email or upload to cloud storage). Input files are **not deleted** after a tool job completes. They remain available until they expire (default: 60 minutes). You can reuse the same file ID across multiple tool operations in your workflow. ## Common workflow patterns ### Generate a PDF from dynamic data 1. Use a trigger node (e.g., Webhook, Google Sheets, Airtable) to get your data 2. Add the **Autype** node with **Render → Render from JSON** and build your document JSON 3. Enable **Download Output** to get the PDF as binary data 4. Send the PDF via email, upload to S3, or save to disk ### Bulk generate personalized documents 1. Add the **Autype** node with **Bulk Render → Bulk Render from JSON** 2. Provide a document ID and an array of variable sets 3. Enable **Download Output** to get a ZIP file with all documents ### Process an existing PDF 1. Use an **HTTP Request** node to download a PDF from any source 2. Add the **Autype** node with **File → Upload** to upload it as a tool file 3. Chain another **Autype** node with any PDF tool operation (e.g., **PDF Tools → Watermark**, **PDF Tools → Compress**) 4. Enable **Download Output** to get the processed result ### AI agent document generation The Autype node has `usableAsTool` enabled, which means n8n AI agents can use it as a tool. Add the Autype node as a tool to your AI agent workflow, and the agent can generate documents, render PDFs, and perform tool operations autonomously. # VS Code Extension Source: https://docs.autype.com/automation/integrations/vscode/overview Write professional documents in Markdown and export as PDF, DOCX & ODT — directly from VS Code ## Overview The [Autype VS Code Extension](https://marketplace.visualstudio.com/items?itemName=centerbit.autype) lets you write reports, papers, invoices, API docs, and any other document using an extended Markdown syntax. Render a live PDF preview side-by-side with your editor, then export to **PDF**, **DOCX**, or **ODT** with a single click. The extension uses the Autype Developer API. Pro and Team include automation credits; Engine and Editor can unlock API access with a permanent credit top-up. ## Product demo ![Autype VS Code Extension demo](https://autype.com/vscode/vscode-demo.gif) ## What You Can Build Autype goes far beyond plain Markdown. Write professional documents with: * **Charts** — bar, line, pie, doughnut, radar, scatter, bubble, polar area * **Math equations** — LaTeX syntax rendered as images (`$$E = mc^2$$`) * **Styled tables** — captions, colored headers, alternating rows, images in cells * **Code blocks** — syntax-highlighted, optionally rendered as images * **Table of Contents** — auto-generated from headings with page numbers * **List of Figures / Tables** — auto-numbered figure and table indices * **QR codes** — URL, WiFi, vCard * **Page layouts** — page breaks, orientation changes, spacers, cover pages * **Multi-column layouts** — two- or three-column sections (like academic papers) * **Variables** — dynamic placeholders like `{{companyName}}` or `{{date/DD.MM.YYYY}}` * **Cross-references** — link to headings, figures, and tables by anchor * **Headers & footers** — with page numbers, logos, and dynamic content * **Images** — local images auto-uploaded with hash-based caching The extension includes three example projects (business report, API documentation, scientific paper) so you can see everything in action. ## Getting Started Install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=centerbit.autype). Create an account at [app.autype.com](https://app.autype.com), activate Developer API access through Pro, Team, or a permanent credit top-up, and copy your API key (starts with `ak_`). Run **Autype: Set API Key** from the command palette (`Ctrl+Shift+P` / `Cmd+Shift+P`), or click the **Autype** button in the VS Code status bar and select **Set API Key**. The key is stored securely in VS Code's secret storage. ![The Autype status bar button opens a menu — use "Set API Key" to store your key](https://autype.com/vscode/bottombar-autype-open-menu.png) ![Autype quick-pick menu with all commands — "Set API Key" highlighted](https://autype.com/vscode/set-api-key-vscode.png) Create a folder with an `autype.json` config file and a `.md` content file: ``` my-document/ ├── autype.json # Document configuration (required) ├── document.md # Your content └── images/ # Local images (optional) └── logo.png ``` Or right-click any folder in the Explorer and select **Autype: Create New Document** to scaffold a project automatically. ```json theme={null} { "document": { "type": "pdf", "size": "A4", "orientation": "portrait", "marginTop": 2.5, "marginBottom": 2.5, "marginLeft": 2.0, "marginRight": 2.0, "title": "My Document" }, "defaults": { "fontFamily": "Arial", "fontSize": 11, "lineHeight": 1.15 } } ``` See the full [document JSON reference](/api-reference/json-syntax/overview) for page sizes, fonts, headers, footers, variables, and more. Open any `.md` file in the project folder, then click the **Autype icon** in the editor title bar (or run `Autype: Show Preview`). ![Click the Autype icon or the Render button in the editor title bar to open the preview panel](https://autype.com/vscode/open-preview-vscode.png) Click **Render** to generate the PDF, then **Ctrl+Scroll** (Cmd+Scroll on macOS) to zoom. Choose a format from the dropdown and click **Export**. ## Features ### Live PDF Preview Render your document and view the result side-by-side with the editor. The preview uses PDF.js for fast, native rendering with text selection and zoom. ### Insert Toolbar A vertical toolbar next to the preview gives you one-click access to all formatting options — headings, bold, italic, underline, strikethrough, highlight, links, images, tables, code blocks, math, charts, QR codes, variables, page breaks, columns, TOC, and more. ### Auto-Rerender Enable auto-rerender to automatically re-render the preview whenever you edit the Markdown or `autype.json`. 10-second cooldown between renders. ### Syntax Highlighting The extension registers a dedicated `autype-markdown` language for `.mdd` files with a custom TextMate grammar that highlights Autype-specific syntax like variables (`{{name}}`), page breaks, directives, and more. ### Image Caching Local images are uploaded to the Autype API with SHA-256 hash-based deduplication. Unchanged images are not re-uploaded, making repeated renders fast. ## Commands | Command | Description | | ----------------------------- | ----------------------------------- | | `Autype: Show Preview` | Open the preview panel | | `Autype: Render Document` | Render the current document | | `Autype: Export as PDF` | Export as PDF | | `Autype: Export as DOCX` | Export as DOCX | | `Autype: Export as ODT` | Export as ODT | | `Autype: Clean Image Cache` | Clear cached image uploads | | `Autype: Create New Document` | Scaffold a new project in a folder | | `Autype: Set API Key` | Store your API key securely | | `Autype: Remove API Key` | Delete the stored API key | | `Autype: Open Menu` | Quick-pick menu from the status bar | ## Settings | Setting | Default | Description | | ------------------------- | ----------------------------------- | ---------------------------------------------- | | `autype.apiBaseUrl` | `https://api.autype.com/api/v1/dev` | Autype Developer API base URL | | `autype.toolbar.visible` | `true` | Show the insert toolbar in the preview panel | | `autype.toolbar.iconSize` | `small` | Toolbar icon size (`small`, `medium`, `large`) | ## Plans & Pricing VS Code rendering and exports use automation credits. Pro and Team include monthly credits; a permanent top-up enables the same workflow on Engine and Editor. Purchased credits never expire. | Feature | Availability | | ----------------------- | ----------------------------------------------------------------- | | Preview rendering | Developer API access; 1 credit per successful render | | PDF / DOCX / ODT export | Developer API access; 1 credit per successful render | | Auto-rerender | Included in the extension; each completed render consumes credits | See [Pricing](/getting-started/pricing) for credit details. ## Example Projects The extension ships with three example projects in the `example/` folder: * **`business-report/`** — A quarterly business report with TOC, list of figures, charts, styled tables, and images * **`api-documentation/`** — REST API documentation with code blocks, endpoint tables, and request/response examples * **`scientific-paper/`** — A two-column academic paper with equations, citations, bibliography, and figures Open any example folder, set your API key, and click Render to see it in action. # Abbreviations Schema Source: https://docs.autype.com/automation/llm-resources/abbreviations-schema JSON Schema for abbreviation definitions. Abbreviations map short forms to their full text. The first occurrence of each abbreviation in the document is automatically expanded. JSON Schema (draft-07) — abbreviation key/value definitions ## Format A simple key/value object: ```json theme={null} { "abbreviations": { "API": "Application Programming Interface", "PDF": "Portable Document Format", "UI": "User Interface" } } ``` ## Related Resources * [JSON Syntax: Abbreviations](/api-reference/json-syntax/abbreviations) * [Complete Document Schema](/automation/llm-resources/document-schema) # Citations Schema Source: https://docs.autype.com/automation/llm-resources/citations-schema JSON Schema for bibliography entries in CSL-JSON format. The citations schema defines bibliography entries in CSL-JSON format. Reference them in text with `@[citationKey]` or `@[citationKey, p. 42]`. JSON Schema (draft-07) — CSL-JSON bibliography entries ## Supported Citation Styles Set via `defaults.citationStyle`: | Style | Value | | --------- | ----------- | | APA 7th | `apa7` | | Harvard | `harvard` | | IEEE | `ieee` | | Chicago | `chicago` | | MLA | `mla` | | Vancouver | `vancouver` | ## Related Resources * [JSON Syntax: Citations](/api-reference/json-syntax/citations) * [Complete Document Schema](/automation/llm-resources/document-schema) # Defaults Schema Source: https://docs.autype.com/automation/llm-resources/defaults-schema JSON Schema for global defaults and legacy styling; use the focused document styling schemas for page design. The defaults schema defines the complete `defaults` object, including global typography, element styles, legacy page settings, and legacy headers/footers. All properties are optional — unset values use sensible defaults. For new master pages, first/odd/even variants, reusable multi-row headers and footers, backgrounds, and page decoration, use the smaller focused document styling schemas below. The bundle still lives under `defaults.styles`; it is not a second document-level styling object. JSON Schema (draft-07) — fonts, colors, spacing, heading styles, header/footer, citation style ## Key Areas | Area | Description | | ---------------------- | ------------------------------------------------------------------------ | | `fontFamily` | Default font for the document | | `fontSize` | Default font size in pt | | `color` | Default text color (hex) | | `lineHeight` | Line height multiplier | | `spacing` | Global before/after spacing for paragraphs | | `styles.h1`–`h6` | Per-heading-level styling | | `styles.table` | Table styling defaults | | `styles.code` | Code block defaults (e.g. `renderAsImage`) | | `header` / `footer` | Legacy three-slot header/footer contract (still supported) | | `styles.schemaVersion` | `2` for the current document styling bundle | | `styles.pages` | Flat master, first, odd, even, section-first, and blank page entries | | `styles.regions` | Reusable header and footer grids with multiple blocks per cell | | `citationStyle` | Citation style: `apa7`, `harvard`, `ieee`, `chicago`, `mla`, `vancouver` | | `chart.colors` | Default chart color palette | ## Related Resources * [Complete Document Schema](/automation/llm-resources/document-schema) * [JSON Syntax: Defaults](/api-reference/json-syntax/defaults) * [Document Styling](/api-reference/json-syntax/document-styling) * [Style Bundle schema](https://autype.com/llm-resources/style-bundle.schema.json) * [Page Style Entry schema](https://autype.com/llm-resources/page-style-entry.schema.json) * [Page Region schema](https://autype.com/llm-resources/page-region.schema.json) * [Region Block schema](https://autype.com/llm-resources/region-block.schema.json) * [Style Operations schema](https://autype.com/llm-resources/style-operations.schema.json) # Complete Document Schema Source: https://docs.autype.com/automation/llm-resources/document-schema Full JSON Schema for Autype documents — all element types, sections, styling, variables, citations, and abbreviations. The complete document schema covers the entire Autype document structure. Use it to validate or construct any document JSON before sending it to the API. JSON Schema (draft-07) — all element types, sections, defaults, variables, citations, abbreviations ## Top-level Structure | Field | Required | Description | | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `document` | ✓ | Page settings (size, margins, orientation, output format) | | `stylePresetId` | — | Optional workspace style UUID or immutable built-in `system:`. Use this to keep API/MCP payloads compact while reusing shared styles. | | `sections` | ✓ | Array of content sections (flow or page type) | | `defaults` | — | Global styling defaults (fonts, colors, spacing, header/footer) | | `variables` | — | Template variable definitions | | `abbreviations` | — | Abbreviation definitions | | `citations` | — | Bibliography entries (CSL-JSON) | ## Related Resources * [Sections & Elements Schema](/automation/llm-resources/sections-schema) — focused schema for section and element types * [Defaults Schema](/automation/llm-resources/defaults-schema) — styling configuration * [Developer API](/api-reference/introduction) — use this schema to generate documents via the API For AI agents, Extended Markdown plus `stylePresetId` is usually easier than generating the full JSON shape. The full schema remains available for clients that need complete structural control. # Document Settings Schema Source: https://docs.autype.com/automation/llm-resources/document-settings-schema JSON Schema for page settings — output format, page size, margins, orientation, and metadata. The document settings schema defines page-level configuration for a document. JSON Schema (draft-07) — output format, page size, margins, orientation, metadata ## Key Fields | Field | Description | | ----------------------------- | ---------------------------------------------- | | `type` | Output format: `pdf`, `docx`, or `odt` | | `size` | Page size: `A4`, `A3`, `A5`, `Letter`, `Legal` | | `orientation` | `portrait` or `landscape` | | `marginTop/Bottom/Left/Right` | Page margins in cm | | `title` | Document title (metadata) | | `author` | Document author (metadata) | | `subject` | Document subject (metadata) | | `filename` | Output filename (without extension) | ## Related Resources * [Complete Document Schema](/automation/llm-resources/document-schema) # Autype Extended Markdown Reference Source: https://docs.autype.com/automation/llm-resources/markdown-syntax Complete reference for Autype Extended Markdown — all directives, attributes, and examples for LLMs. Autype Extended Markdown (AEM) is Autype's semantic document language, not plain Markdown. This reference is optimized for LLMs and covers its standard-Markdown base plus every supported Autype structure and extension. For API and MCP usage, pair this Markdown content with a `stylePresetId` whenever possible. The style preset is resolved by Autype during rendering, so agents can focus on content while reusing organization typography, spacing, headers, footers, table styles, and chart defaults. Markdown file — all syntax elements with one example each, optimized for LLM consumption ## What's Covered * Inline formatting extensions (`++underline++`, `==highlight=={#color}`, `text`, `~~strikethrough~~`) * Math inline and block (`$...$`, `$$...$$`) * Variables (`{{varName}}`) and citations (`@[key]`) * Internal references and anchors * Page layout directives (page breaks, spacers, flowing columns, page sections) * Semantic 1–4 column layouts with independently editable column content * Fixed canvas compositions with positioned text, images, and shapes * Pagination controls, advanced typography, image crop/focal point, and page backgrounds * Images with attributes * Tables with captions, block alignment, column widths, and Markdown separator alignment (`:---`, `:---:`, `---:`) * Form fields, choice groups, variable binding, field styling, and fields in table cells * Reusable block references and snapshots * Code blocks and diagram rendering (Kroki) * Charts (Chart.js) * QR codes * Styled blockquotes * Indices (TOC, list of figures, bibliography) ## Full Syntax Documentation For the complete human-readable reference, see the **[Markup Reference](/markup-reference/overview)** tab. # LLM Resources Source: https://docs.autype.com/automation/llm-resources/overview Machine-readable schemas and references for LLMs and AI agents to work with Autype documents. ## Overview Autype provides machine-readable resources specifically designed for LLMs, AI agents, and automation tools. These resources enable AI systems to construct valid Autype documents, understand the extended Markdown syntax, and work with the full document schema — without any manual configuration. All resources are publicly accessible at **[autype.com/llm-resources/](https://autype.com/llm-resources/index.json)** and are always up to date. ## Available Resources Full JSON Schema (draft-07) covering all element types, styling, variables, citations, abbreviations, and sections. Complete Zod schema as TypeScript source. Use for validation in TypeScript/JavaScript projects. Full reference for Autype's extended Markdown syntax with all directives, attributes, and examples. JSON index of all available LLM resources with descriptions and URLs. ## Sub-Schemas These focused schemas cover individual parts of the document structure. Use them when you only need to work with a specific area. Fonts, colors, spacing, heading, table, block quote and form-field styles, header/footer, citation style. Template variables: text, number, image, list, and table types. Use `{{varName}}` in text. Abbreviation definitions mapping short forms to full text. Bibliography entries in CSL-JSON format. 6 citation styles supported. Page size, margins, orientation, output format (PDF/DOCX/ODT), and metadata. All public content element types, including text, tables, images, charts, code, math, QR codes, form fields, and reusable block references. Typography, tokens, master-page variants, reusable regions, and page decoration. One flat default, first, odd, even, section-first, or blank page entry. A reusable multi-row and multi-column header or footer grid. One text, image, field, variable, rule, spacer, QR code, or shape block. Atomic targeted edits without regenerating a complete style bundle. ## Usage with AI Agents ### MCP Server The [Autype MCP Server](/automation/integrations/mcp/overview) has built-in access to these schemas. When an AI agent connects via MCP, it can generate documents directly. ### Direct API Integration For custom AI integrations, point your LLM to the resource index: ``` https://autype.com/llm-resources/index.json ``` The LLM should fetch the Markdown reference first and use Extended Markdown for normal document authoring. The complete JSON schema remains available for advanced clients that need direct access to the canonical document model. ### Example: System Prompt ```text theme={null} You are a document generation assistant. Author document content as Autype Extended Markdown. Use compact request metadata for variables, document settings, and a stylePresetId. Use raw document JSON only when explicitly required by the client. Markdown syntax: https://autype.com/llm-resources/markdown-syntax.md Advanced JSON schema: https://autype.com/llm-resources/document-schema.json ``` # Sections & Elements Schema Source: https://docs.autype.com/automation/llm-resources/sections-schema JSON Schema for all document section types and content elements. This schema defines all section types and the 21 content element types that can appear inside them. JSON Schema (draft-07) — FlowSection, PageSection, and all 21 element types ## Section Types | Type | Description | | ------ | -------------------------------------------------------------- | | `flow` | Flowing content across multiple pages (standard) | | `page` | Positioned content on a single page (cover pages, title pages) | ## Element Types | Type | Description | | -------------------------- | -------------------------------------------------------- | | `h1`–`h6`, `text`, `text2` | Headings and paragraphs | | `image` | Image with dimensions and alignment | | `table` | Data table with headers and rows | | `list` | Ordered or unordered list | | `chart` | Chart.js chart (bar, line, pie, etc.) | | `code` | Code block with syntax highlighting or diagram rendering | | `math` | LaTeX math block | | `blockquote` | Styled block quote container | | `qrcode` | QR code (url, wifi, vcard, text) | | `pageBreak` | Page break with optional orientation change | | `spacer` | Vertical spacing | | `toc` | Table of contents | | `listOfFigures` | List of figures | | `listOfTables` | List of tables | | `listOfCodeListings` | List of code listings | | `listOfAbbreviations` | List of abbreviations | | `bibliography` | Bibliography | | `variableRef` | Block-level variable reference | ## Related Resources * [Complete Document Schema](/automation/llm-resources/document-schema) — full document structure * [Markdown Syntax Reference](/automation/llm-resources/markdown-syntax) — how to write these elements in Markdown # Variables Schema Source: https://docs.autype.com/automation/llm-resources/variables-schema JSON Schema for template variable definitions — text, number, image, list, and table types. Variables allow dynamic content replacement in documents using `{{varName}}` syntax. JSON Schema (draft-07) — string, number, image, list, and table variable types ## Variable Types | Type | Description | | -------- | ---------------------------------- | | `string` | Simple text replacement | | `number` | Numeric value | | `image` | Image URL or base64 | | `list` | Array of text values | | `table` | Tabular data with headers and rows | ## Built-in Variables | Variable | Description | | ---------------- | --------------------- | | `{{pageNumber}}` | Current page number | | `{{totalPages}}` | Total number of pages | | `{{date}}` | Current date | ## Related Resources * [JSON Syntax: Variables](/api-reference/json-syntax/variables) * [Complete Document Schema](/automation/llm-resources/document-schema) # Integrations Source: https://docs.autype.com/automation/overview Connect Autype to your AI agents, automation platforms, and developer workflows Autype integrates with the tools you already use — from AI coding assistants and agents to no-code automation platforms. Generate documents, render PDFs, and manage content directly from your workflows. Connect any MCP-compatible AI agent or IDE to Autype. Generate documents, render PDFs, and manage content directly from Claude, Cursor, Windsurf, and more. Trigger document generation from Make scenarios. Connect Autype to thousands of apps without writing code. Automate document workflows with Zapier. Connect Autype to your CRM, forms, spreadsheets, and more. Build self-hosted document automation workflows with n8n's visual editor and Autype's community node. Machine-readable schemas and references for LLMs and AI agents to construct valid Autype documents. ## Why integrate Autype? Autype stores a complete structured JSON document, but integrations and AI agents should normally author **Extended Markdown plus compact metadata**. This keeps requests readable and token-efficient while preserving lossless conversion to the internal model. Advanced clients can still read and render the full JSON structure. Agents use the shared Extended Markdown reference and focused tools for long-document retrieval, patching, styles, blocks, and records. Render jobs complete asynchronously and notify your integration via webhook — no polling required. Every integration is built on top of the same REST API. Use it directly or through an integration layer. ## Getting started All integrations require an API key. You can create one in the [Dashboard](https://app.autype.com) under **Settings → API Keys**. API keys are scoped to your organization. Keep them secret — never commit them to version control or expose them in client-side code. Once you have an API key, choose your integration and follow the setup guide. # AI workflows Source: https://docs.autype.com/getting-started/concepts/ai Generate complete documents from a goal and source files, or use the document-aware assistant and inline AI for focused edits. Autype uses structured agent workflows instead of sending the complete JSON schema with every request. Agents work with Extended Markdown and focused tools for content, styles, variables, citations, reusable blocks, records, images, uploaded files, and web research. Every proposed document is converted to the central document model and validated before it is saved. ## Generate a complete document Describe the result in the workspace input. You can select a project and style, attach source files, or type `/` to reference an existing document. The agent determines whether to create a new document, fill an existing one, or reuse a similar document and asks a focused question when the intent or required values are unclear. During a run, the agent can: * read PDF, DOCX, spreadsheet, image, Markdown, JSON, and text attachments, * search within large source files instead of placing every file in one prompt, * use web research when current external information is required, * find organization styles and reusable blocks, * generate protected document images, * write or patch Extended Markdown in one or more steps, and * validate and repair the result before creating the document. A selected organization style is applied directly. With **Auto style**, the agent can reuse a suitable existing preset or create a matching document style. ## Document assistant The AI assistant lives in a chat sidebar within the editor. It can complete multi-step changes instead of being limited to one predefined action. You can ask it to: * **Generate content** — "Write an executive summary for this report" * **Edit and restructure** — "Move the conclusion before the appendix" * **Adjust formatting** — "Make all headings blue and centered" * **Explain and improve** — "Simplify this paragraph for a non-technical audience" The assistant maps large documents into addressable regions and reads only the content needed for the current task. It can search and reread resources during a run, patch specific Markdown ranges, and update document metadata without rewriting unrelated content. Long conversations are compacted before they exceed the model context limit. ### Inline and selection-based actions Use **Edit with AI** from a selected text range, or choose **Write with AI** from the slash/insert menu to generate a new block. A preview appears before anything is inserted; selection edits include a diff that you can accept or discard. * Rewrite a paragraph in a different tone * Translate selected content * Expand bullet points into full paragraphs * Summarize a long section ## Style generation Describe the look you want in plain language, and the AI generates matching style definitions: * "Corporate design with dark blue headings and a clean sans-serif font" * "Academic paper style with serif fonts and numbered headings" * "Modern report with accent colors and large section headers" The generated styles are applied instantly to your document and can be saved as reusable presets. ## Image generation Generate illustrations and graphics directly within the editor: * Describe what you need in natural language * The AI creates the image and inserts it at the correct position * Images are automatically sized and captioned AI documents, assistant tasks, translations, and AI images use separate monthly allowances from your plan. Automation credits are reserved for the Developer API and bulk generation. See [Pricing](/getting-started/pricing). ## Why Autype is AI-native Most document editors store content in proprietary binary formats that AI models cannot safely patch. Autype separates a readable authoring format from a complete structured model: | Traditional editors | Autype | | ------------------------------------ | --------------------------------------------------- | | Binary/XML formats (`.docx`, `.odt`) | Extended Markdown plus compact metadata | | AI rewrites whole files | Agents retrieve and patch relevant ranges | | Edits may break formatting | Markdown is converted and schema-validated | | Limited to text generation | Focused tools update content and document resources | The complete JSON model remains the conversion and persistence base and is still available through the Developer API. Markdown-first agent tools keep the normal AI workflow smaller, clearer, and more reliable. # Collaboration and organizations Source: https://docs.autype.com/getting-started/concepts/collaboration Optional Markdown collaboration, contextual comments, organization roles, and document version history. Autype keeps normal single-user editing simple: both the visual editor and Markdown editor save directly through the API. Real-time collaboration is an explicit document mode for teams that need to edit the same Markdown document together. ## Real-time co-editing Enable collaboration from the document toolbar when several users need to work on the same document. A document uses one collaboration mode at a time, which prevents the visual and Markdown editors from maintaining competing real-time states. See exactly where each collaborator is working in real-time. Cursors are color-coded per user. See what text others have selected. Useful for discussions and reviews — you always know what someone is looking at. CRDT-based updates synchronize Extended Markdown while collaboration is active. Documents without an active collaboration room use API autosave and manual Ctrl/Cmd+S saves without connecting to the real-time service. ## Comments and discussions Comments are a core part of the Autype workflow — not an afterthought. Use them for reviews, feedback, and team discussions directly inside the document. Markdown comments attach to lines; visual-editor comments attach to the selected content block. Start a discussion on any comment. Threaded replies keep conversations organized and in context — no separate chat tool needed. Mark comments as resolved when the feedback has been addressed. Reopen them if something needs another look. Perfect for client reviews, team approvals, and editorial feedback. Share a document, collect comments, iterate — all in one place. ## Organizations Every Autype account is part of an organization. Organizations are the top-level container for everything: * **Projects and documents** — All content belongs to the organization * **Team members** — Invite colleagues and assign roles * **Reusable styles** — Define your corporate design once, apply it across all documents * **API keys** — Scoped to the organization for automation * **Plan and automation balance** — Shared organization entitlements and automation credits * **Settings** — Billing, branding, and preferences ### Roles and permissions | Role | Capabilities | | ---------- | ------------------------------------------------------- | | **Owner** | Full access. Manage billing, members, and all settings. | | **Admin** | Manage members and projects. Cannot change billing. | | **Editor** | Create and edit documents within assigned projects. | | **Viewer** | Read-only access to documents. | ### Invitations Invite team members by email. They receive a link to join your organization. You can also set a default role for new members. ## Version history Autype automatically tracks changes to your documents: * **Automatic snapshots** — Captured by the active persistence path * **Manual versions** — Save named snapshots at any time (e.g., "Final Draft", "Client Review") * **Diff view** — Compare any two versions side by side * **One-click restore** — Roll back to any previous version instantly Version history is per-document. Each document maintains its own independent history, so restoring one document never affects others. For details on managing organizations, inviting members, and configuring roles, see the [Guides](/getting-started/guides/overview) section. # Features Source: https://docs.autype.com/getting-started/concepts/features Autype's full feature set: Markdown syntax, citations, automatic indices, reusable styles, page layouts, charts, variables, collaboration, automation, and more. A complete overview of what Autype can do — from writing and styling to automation and security. ## Editor and authoring Autype supports familiar Markdown syntax with extensions for professional documents. You can also use the visual editor if you prefer clicking over typing — switch between views anytime. **What you can write**: Headings, paragraphs with rich formatting, ordered and unordered lists, tables, LaTeX math, highlighted code, images, interactive form fields, and more. ## Citations and bibliography Academic-grade citation management built right into the editor. Add citations with a simple inline syntax and Autype handles the rest. * **7 citation styles** — APA 7, Harvard, IEEE, Chicago, MLA, Vancouver, ABNT * **Import your existing bibliography** — BibTeX, RIS, EndNote XML, Zotero * **Automatic bibliography** — Only cited sources appear, always in the correct format * **Cross-references** — Reference any heading, figure, or table by anchor. Autype keeps them correct as your document changes. Broken references and missing citations are highlighted immediately in the editor — no need to export first to find errors. ## Automatic indices Autype generates and maintains all indices automatically as you write: * **Table of contents** — with configurable depth * **List of figures** — auto-numbered with clickable links * **List of tables** — auto-numbered, same as figures * **List of abbreviations** — define once, reference everywhere * **Bibliography** — generated from your citations All indices update in real-time. Page numbers are inserted on export. ## Reusable document styles Define your corporate design once — fonts, colors, heading styles, headers, footers — and apply it across every document in your organization. * **Global defaults** — Set font, size, color, and element styles for the entire document * **Custom headers and footers** — Three-column layout with logos, titles, and page numbers * **Style presets** — Save and share styles across your team. Apply with one click. * **AI-generated styles** — Describe the look you want in plain language, and AI generates the matching style ## Flexible page layouts Mix portrait and landscape orientations within the same document. Full control over how content flows across pages. * **Page orientation per section** — Switch between portrait and landscape anywhere in the document * **Page sections** — Flow sections, multi-column layouts, and precise positioning * **Semantic layouts** — Independently editable columns with width, background, border, padding, and vertical alignment * **Fixed canvas** — Layered text, image, and shape items for covers, certificates, and title panels * **Page backgrounds** — Color or image backgrounds with fit, focal position, opacity, and per-page margins * **Page breaks** — Insert breaks with optional orientation changes * **Pagination hints** — Keep blocks together, keep with the next element, or start them on a new page ## Embedded visualizations Create charts and QR codes directly in your document — no external tools needed. * **Charts** — Bar, Line, Pie, Doughnut, Radar, Polar, Scatter, Bubble * **QR codes** — For URLs, WiFi credentials, vCards, and custom data * **Auto-captioned** — Figures are numbered and appear in the list of figures automatically ## Dynamic variables Insert placeholders anywhere in your document and fill them dynamically — via the UI, API, or bulk import. * **Text variables** — Names, dates, amounts, any text * **Image variables** — Logos, signatures, photos * **List variables** — Dynamic bullet points from data * **Table variables** — Invoice rows, product lists, any tabular data * **Built-in variables** — Page number, total pages, and more Variables make every document a reusable template. Fill them once in the UI, or fill them thousands of times via API. ## Form fields Add input controls directly to documents without building a separate form layout. Text, number, multiline, date, checkbox, select, signature, and initials fields can use global styling or local overrides and can also be placed inside table cells. * **Interactive PDF output** — fields become AcroForm widgets * **Variable binding** — prefill controls from document variables * **Choice groups** — single or multiple selection, square or circular controls * **Consistent styling** — outline, underline, borderless, colors, inset, radius, and spacing Signature and initials controls are form widgets; cryptographic and qualified electronic signing workflows are a separate future capability. ## Reusable blocks and records * **Reusable blocks** keep organization-approved clauses and standard sections centrally maintained. Insert them as linked references or editable copies. * **Records** store customer or case values against a document version, report compatibility when variable definitions change, and keep previous export history available. * **Import and bulk** share one workflow: create persistent records from source data or run a temporary batch without retaining every row. ## Language variants Generate read-only translations only when you need them. Variants remain linked to the source revision, preserve structure and formatting, and are marked outdated when the original document changes. Preview the translated PDF or export PDF, DOCX, and ODT without creating parallel editable documents. ## Real-time collaboration Eligible plans can activate collaboration for a document in either Write or Markdown mode. When collaboration is not active, the editor uses direct API autosave instead of routing solo editing through the realtime service. * **Live cursors** — See where everyone is editing * **Comments** — Anchored to Markdown lines or visual blocks, with threaded replies and resolve/reopen workflow * **Mode safety** — One collaboration mode is active for the document at a time ## Version history Every change to your document is tracked — automatically. Autype creates **automatic versions** in the background so you always have a safety net, even if you never think about versioning. Need more control? Create **named versions** at any point — before a major rewrite, after a milestone, or before sending to a client. * **Automatic versions** — created in the background as you work, no action required * **Manual named versions** — create a snapshot with a custom name at any time * **One-click rollback** — restore any previous version instantly * **Side-by-side diff** — compare any version against the current document to see exactly what changed, in Markdown or JSON view * **Author tracking** — every version records who made the change and when Version history with diff view Unlike Google Docs (limited history, no named snapshots) or Word (no built-in versioning at all), Autype gives you **full version control** with named versions, rollback, and diff — built right into the editor. No plugins, no external tools. ## Export formats Export your documents to the format you need: | Format | Use case | | -------- | --------------------------------------------- | | **PDF** | Final documents, print-ready output | | **DOCX** | Further editing in Microsoft Word | | **ODT** | Open-source compatible (LibreOffice) | | **PNG** | Lossless page images for review or publishing | | **JPEG** | Smaller page images for sharing | Before exporting, Autype can check document metadata, language, image descriptions, heading order, and table headers. PDF output profiles include standard PDF, PDF/A-1b, PDF/A-2b, PDF/A-3b, and PDF/UA-1. See [Export readiness](/getting-started/guides/export-readiness) for limitations and profile behavior. ## Automation and bulk generation Autype is built for automation from the ground up: * **Complete document generation** — Create entire documents via REST API * **Records and bulk jobs** — retain customer/case data or generate one-off batches from CSV, Excel, or JSON * **Template variables** — Fill templates dynamically via UI, API, or bulk import * **Webhooks** — Get notified when jobs complete * **No-code integration** — Works with n8n, Make, Zapier, and any HTTP-capable platform ## Real-time validation Autype validates your document as you type — no waiting for a compile or export to discover errors: * **Broken references** — highlighted immediately * **Undefined abbreviations** — flagged as you type * **Missing citations** — caught before export * **Invalid syntax** — instant feedback ## Security and hosting All data is stored and processed on **secured servers within the European Union**. Autype is fully GDPR-compliant with encryption at rest and in transit, role-based access control, and audit logs. # What is Autype? Source: https://docs.autype.com/getting-started/concepts/overview Autype is a structured document editor with visual and Extended Markdown authoring, reusable resources, professional exports, and automation. ## The problem with documents today Creating professional documents shouldn't be this hard. Yet teams everywhere struggle with the same issues: Formatting drifts between documents. Cross-references break silently. Styles are inconsistent across teams. And there's no way to automate generation — mail merge is the best you get. LaTeX produces beautiful output, but the learning curve is steep. Cryptic errors, complex toolchains, and slow compilation make it impractical for most business use cases. Word and Google Docs have no meaningful API. Generating 100 personalized documents means 100 times copy-paste. No-code platforms like n8n or Make can't produce professional documents. ## How Autype solves this Autype is a **structured document editor** with a visual block experience and an Extended Markdown view over the same content. It produces consistent PDF, DOCX, ODT, PNG, and JPEG output and exposes Markdown-first automation while retaining the full JSON document model for advanced clients. Visual authoring by default, Extended Markdown when needed, opt-in collaboration, document comments, autosave, and version history. Agentic document generation and editing use focused tools for content, styles, variables, references, reusable blocks, files, images, and web research. Generate and patch Extended Markdown through API or MCP, render records, run bulk jobs, and integrate with n8n or Make. All data stored and processed on secured servers in the EU. GDPR-compliant. Encrypted at rest and in transit. Role-based access control. ## Who is Autype for? * **Teams and agencies** — One template, unlimited personalized documents. Reusable styles ensure consistent corporate design across everything. Bulk generation from CSV or API. * **Consultants and freelancers** — Professional proposals in minutes instead of hours. Variables for client data, instant PDF export. Comments for client feedback. * **Developers and no-code builders** — Markdown-first REST and MCP workflows, full JSON access for advanced clients, scoped API keys, and webhooks. * **Technical writers** — Extended Markdown syntax with automatic indices, cross-references, and citation management. No more manual index maintenance. * **Students and researchers** — Academic-grade citations with BibTeX import, automatic bibliography, cross-references, and fast rendering. No LaTeX complexity. ## Next steps See what Autype can do in detail. Learn about Autype's built-in AI capabilities. Real-time editing, comments, organizations, and roles. How documents, versions, and variables are organized. # Projects Source: https://docs.autype.com/getting-started/concepts/projects Projects organize related documents while each document owns its content, variables, records, versions, and assets. A **project** is an organization-owned folder for related documents. It helps teams group contracts, reports, or customer material without coupling the individual documents to one shared set of variables or versions. ## What a project contains A project can contain multiple independently maintained documents. Dynamic placeholders like `{{company}}` or `{{logo}}` are defined per document. Snapshots and named versions belong to the document they describe. Protected images, source files, and generated media stay associated with their document and organization. ## Project structure ``` Project ├── Document A │ ├── Extended Markdown + JSON document model │ ├── Variables and records │ ├── Styles, citations, and abbreviations │ ├── Assets and language variants │ └── Version history └── Document B └── Independent document data ``` ## Projects and organizations Projects always belong to an organization. This means: * All team members with the right role can access the project * API keys scoped to the organization can interact with any project * Plan allowances and automation credits are scoped to the organization ## Working with projects ### In the editor You create and manage projects from the workspace. Search can find documents across projects, while each project view supports server-side filtering and pagination for larger workspaces. ### Via the API The Developer API provides endpoints to list projects and use them for rendering: * **List projects** — `GET /projects` returns all projects in your organization * **Get variables** — `GET /documents/{id}/variables` returns the variable definitions for a document * **Render** — `POST /render/document/{id}` generates a persistent document with optional variable overrides * **Bulk render** — `POST /bulk-render` generates multiple documents with different variable sets For step-by-step instructions on creating and managing projects, see the [Guides](/getting-started/guides/overview). For API details, see the [Developer API](/api-reference/introduction). # Syntax Cheatsheet Source: https://docs.autype.com/getting-started/concepts/syntax-cheatsheet Quick reference for all Autype markup syntax — standard Markdown and extended features at a glance. A compact overview of every syntax element supported by Autype. For detailed documentation, see the [Markup Reference](/markup-reference/overview). ## Block elements | Element | Standard Syntax | Extended Syntax | | -------------- | ---------------- | ---------------------------------------------------- | | Heading | `# Text` | `

Text

` | | Paragraph | `Text` | `

Text

` | | Text2 | `\| Text` | Secondary paragraph style | | Ordered list | `1. Item` | — | | Unordered list | `- Item` | — | | Image | `![alt](src)` | `![alt](src){width=200 align=center}` | | Code block | ` ```lang ` | ` ```lang{renderAsImage=true} ` | | Math (block) | `$$...$$` | `$${align=center}...$$` | | Block quote | `> Text` | `> {backgroundColor="#EEE" borderColor="#999"} Text` | | Table | `\| H1 \| H2 \|` | `:::table{caption="..." headerBg="#f0f0f0"}` | | Chart | — | `:::chart{type="bar"}...:::` | | QR Code | — | `:::qrcode{type="url"}...:::` | | Page break | `---` | `---pagebreak{orientation="landscape"}---` | | Spacer | — | `---spacer{height=2}---` | | Page section | — | `---page{align=center}---...---/page---` | ## Inline formatting | Format | Syntax | | ----------------- | ------------------------ | | Bold | `**text**` or `__text__` | | Italic | `*text*` or `_text_` | | Bold Italic | `***text***` | | Underline | `++text++` | | Strikethrough | `~~text~~` | | Highlight | `==text==` | | Highlight (color) | `==text=={#color}` | | Inline code | `` `code` `` | | Link | `[text](url)` | | Line break | `
` | ## References & special inline elements | Element | Syntax | | -------------------------- | ------------------------- | | Heading anchor | `# Title {#anchor-id}` | | Internal ref (auto) | `[](#anchor)` | | Internal ref (numbered) | `[Figure {num}](#anchor)` | | Internal ref (custom) | `[Custom text](#anchor)` | | Citation | `@[key]` | | Citation (locator) | `@[key, p. 42]` | | Citation (suppress author) | `@[-key]` | | Citation (author only) | `@[key!]` | | Abbreviation | `~ABK~` | | Variable | `{{name}}` | | Date variable | `{{date/DD.MM.YYYY}}` | ## Automatic indices | Index | Syntax | | --------------------- | ------------------------------------ | | Table of Contents | `::toc{title="Contents" maxLevel=3}` | | List of Figures | `::lof{title="Figures"}` | | List of Tables | `::lot{title="Tables"}` | | List of Abbreviations | `::loa{title="Abbreviations"}` | | Bibliography | `::bibliography{title="References"}` | # Editor Source: https://docs.autype.com/getting-started/editor/editor-overview The Autype document editor — write visually or in Extended Markdown, verify the PDF preview, and manage reusable document resources. The editor is where you write and design documents. **Write** mode is the default visual block editor; **MD** mode exposes the same content as Extended Markdown. The preview opens in PDF mode by default, and the sidebar manages variables, records, reusable blocks, references, images, styles, and history. Editor overview showing code editor, preview, and sidebar *** ## Layout The editor has three main areas: | Area | Position | Description | | ------------------- | -------------- | -------------------------------------------------------------------------- | | **Toolbar** | Top | Formatting buttons, block type selector, insert menus, export | | **Document Editor** | Center | Visual rich text by default, or Extended Markdown with syntax highlighting | | **Preview** | Right | Live-rendered preview of your document (Web or PDF mode) | | **Sidebar** | Far left/right | Panels for variables, styles, citations, images, and more | On mobile, the editor and preview are shown as separate tabs — switch between them with the **Editor** / **Preview** toggle. *** ## Toolbar The toolbar provides quick access to formatting and inserting elements. Hovering over any toolbar button shows a **tooltip** describing its function. Editor toolbar ### Block type selector A dropdown at the left of the toolbar lets you change the current block type: | Block type | Markdown prefix | | -------------- | ----------------- | | Paragraph | *(none)* | | Paragraph 2 | `\| ` | | Heading 1–6 | `# ` to `###### ` | | Code block | ` ``` ` | | Unordered list | `- ` | | Ordered list | `1. ` | ### Inline formatting buttons To apply formatting, **select the text** you want to format first, then click the corresponding button. To remove formatting, select the formatted text (including the Markdown syntax characters) and click the button again. | Button | Action | Markdown syntax | | ----------------------------- | ------------- | --------------- | | | Bold | `**text**` | | | Italic | `*text*` | | | Underline | `++text++` | | | Strikethrough | `~~text~~` | | | Highlight | `==text==` | | | Insert link | `[text](url)` | ### Insert menus The toolbar includes additional buttons and dropdown menus for inserting: * **Bullet List** / **Numbered List** — toggle list formatting * **Table** — insert a table with a size picker * **Image** — standard Markdown image or image directive * **Code Block** — insert a fenced code block * **Spacer** — insert vertical spacing (1–3 lines or custom px) * **Page Break** — insert a page break (portrait or landscape) * **Page Section** — insert a page section with alignment (top, center, bottom) * **Indices** — TOC, list of figures, list of tables, list of abbreviations, bibliography * **Math** — insert a block math expression * **QR Code** — URL, WiFi, or vCard * **Variable** — insert an inline variable reference * **Date** — insert a dynamic date variable with format, offset, and timezone * **Chart** — bar, line, pie, doughnut, radar, polar, scatter, bubble * **Form Field** — text, number, date, choice, signature, and initials controls * **Write with AI** — generate a block from a prompt and preview it before insertion In Rich Text mode, a page section's background is represented by the color swatch at the start of its **Page Section** chip. The editor intentionally does not fill the editable content area with that color, because the rich-text surface is for editing structure rather than simulating the final page. Click the swatch to change the page color and use the PDF preview for the authoritative rendered result. *** ## Preview modes The preview pane supports PDF and Web modes. PDF is the default and the source of truth for page layout. The Web preview is a faster structural approximation. ### Web preview (HTML) Web preview showing real-time HTML rendering * Renders your document as styled HTML **in real time** — updates instantly as you type * Shows **variable placeholders** as-is (not yet processed), so you can see where variables are used * Best for **everyday writing and editing** — the instant feedback makes it ideal for checking that your Markdown syntax is interpreted as expected * Shows a close approximation of the final output, though page layout details (margins, headers, footers, page breaks) are not represented ### PDF preview PDF preview showing the rendered document * Shows the **fully rendered document** exactly as it will look when exported — including page layout, margins, headers, footers, and page breaks * Best for **fine-tuning layout** and verifying the final appearance of your document * A new render is triggered after saving (either via the auto-save interval or a manual save) * A **refresh indicator** shows when a new render is in progress Rendering time depends on document size and current server load — it can take up to **1 minute** for large documents. Documents with many images will take longer to render. *** ## Auto-save When you work alone, changes are saved directly through the API after a short autosave delay. The editor coalesces rapid edits instead of sending every keystroke as a full document update. You can trigger a manual save by pressing **⌘S** (Mac) or **Ctrl+S** (Windows/Linux), or by clicking the **save icon** next to the document name in the top bar. ### Save icon states The save icon next to the document name indicates the current sync status: | Icon | State | Description | | -------------------- | -------------------- | ------------------------------------------------------------------------------- | | | **Synced** | All changes have been saved successfully | | | **Auto-save active** | Auto-save is enabled — changes will be saved automatically at the next interval | Versions are created independently from autosave and remain available through the [Version History](/getting-started/editor/sidebar-history) panel. Wait for the saved indicator before closing the page on an unstable connection. Use the manual save shortcut whenever you want an immediate API save. *** ## Real-time validation The editor highlights syntax errors and warnings directly in the code. **Clicking on an error or warning** navigates you directly to the line where the problem occurs. Hover over an underlined section to see the error message in a tooltip. ### Errors **Red underlines** indicate syntax errors — for example, invalid attribute values or unclosed directives. Documents with errors **cannot create a new version** and will **not trigger a new PDF render** or any other export format. Validation error — image width must be a number ### Warnings **Yellow underlines** indicate warnings — for example, missing citation references or undefined abbreviations. Documents with warnings can still be **saved and rendered** normally, but you should review them to ensure the output is as expected. Validation warnings — citation and abbreviation not found *** ## Real-time collaboration Real-time collaboration is activated per document and requires an eligible plan. A document uses one collaboration mode at a time: Write or Markdown. Documents without active collaboration continue to use normal API autosave. When multiple users have the same document open, their **avatars** appear in the top bar so you can see who is currently active. Collaborator presence indicators in the top bar Inside the editor, each collaborator has a **colored cursor** and their **text selections** are visible to everyone. Hover over a cursor to see who is typing. All changes from other users appear in real time. Live cursors and selection sync in the editor *** ## Export Click the **download button** in the top bar to export your document: Export button in the top bar | Format | Description | | -------- | ---------------------------------------------------------------------- | | **PDF** | Portable Document Format — most common for sharing | | **DOCX** | Microsoft Word format — editable in Word, Google Docs | | **ODT** | Open Document Format — editable in LibreOffice | | **PNG** | Page images; multiple pages are downloaded as a ZIP archive | | **JPEG** | Compressed page images; multiple pages are downloaded as a ZIP archive | The exported document will look virtually identical to the **PDF preview** (\~99% match). Minimal differences may occur if a font is rendered slightly differently between the preview and the export engine. *** ## Sidebar panels The sidebar on the left provides access to all document management panels. Click an icon to open the corresponding panel. | Icon | Panel | Description | | ------------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------ | | | [Documents](/getting-started/editor/sidebar-documents) | Switch between documents in the current project | | | [Version History](/getting-started/editor/sidebar-history) | View and restore previous versions | | | [Variables](/getting-started/editor/sidebar-variables) | Manage document variables | | | [Records](/getting-started/editor/sidebar-records) | Save variable datasets, import rows, and render historical outputs | | | [Reusable Blocks](/getting-started/editor/sidebar-reusable-blocks) | Insert shared content as a reference or copy | | | [Translations](/getting-started/editor/sidebar-translations) | Generate, preview, export, and refresh read-only language variants | | | References | Manage abbreviations and citations in one panel | | | [Images](/getting-started/editor/sidebar-images) | Upload and manage document images | | | [Styles](/getting-started/editor/sidebar-styles) | Manage and apply document style presets | | | [AI Assistant](/getting-started/editor/sidebar-chat) | Chat with AI to edit your document | | | [Comments](/getting-started/editor/sidebar-comments) | Add and manage inline comments | ### Advanced JSON view Enable **Advanced view** in Editor settings to inspect the raw JSON document schema. JSON remains the complete internal model and a fully supported API format, while Write and Markdown are the recommended interactive modes. JSON view of the document schema Only edit the JSON if you have a solid understanding of JSON and the document schema format. Invalid changes can break your document. JSON editing is **not available during live collaboration sessions** to prevent inconsistent document states between collaborators. ### Footnotes Place the cursor after a statement and choose **Add → Footnote** to insert an automatically numbered note. Select the visible number to edit or remove it. Write, Markdown, JSON, DOCX, and PDF use the same footnote definition; see the [Footnotes guide](/getting-started/editor/footnotes) for syntax and behavior. # Footnotes Source: https://docs.autype.com/getting-started/editor/footnotes Add, edit, number, and export document footnotes in Write or Markdown mode Footnotes add supporting detail without interrupting the main document flow. Autype assigns their visible numbers from the order in which references first appear. Moving a reference therefore updates its number automatically. ## Add a footnote in Write mode 1. Place the cursor immediately after the text that needs a note. 2. Select **Add → Footnote** in the editor toolbar. You can also type `/footnote`. 3. Enter the note in the modal and select **Insert footnote**. The editor displays the reference as a compact numbered link such as `[1]`. Select that link to edit or delete this occurrence. If the same footnote is referenced more than once, editing its text updates every occurrence. Footnote text supports inline formatting, links, and line breaks. A note must not contain another footnote. ## Markdown syntax Use `[^id]` in the document text and provide one matching definition: ```markdown theme={null} The figures were independently verified[^audit]. [^audit]: **External audit**, completed 12 March 2026. ``` IDs start with a letter and may contain letters, digits, `_`, and `-`. Continue a longer definition on lines indented with four spaces or a tab: ```markdown theme={null} [^audit]: First line of the note. Second line with [supporting material](https://example.com). ``` Footnotes are separate from citations (`@[key]`) and internal links (`[label](#anchor)`). Missing, duplicate, empty, and nested definitions are reported before a document is rendered. ## JSON and export In JSON, definitions are stored once in the top-level `footnotes` array while references remain `[^id]` inside text-capable elements. See the complete [Footnotes schema reference](/api-reference/json-syntax/footnotes). DOCX import and export preserve footnotes as native Microsoft Word footnotes. PDF output places them in the document's normal footnote area. Repeated references keep one shared definition and a stable visible number. # Using Autype Source: https://docs.autype.com/getting-started/editor/overview From sign-up to document export — everything you need to know about the Autype application. This section covers the full Autype application — from creating your account to exporting finished documents. Create your account with email, Google, or GitHub. Verify your email and sign in. AI document generation, project and document management, search, filters, and view modes. Profile, appearance, billing, team members, and API keys. Write visually or in Extended Markdown, verify the PDF preview, and manage reusable document resources. # Settings Source: https://docs.autype.com/getting-started/editor/settings Manage your profile, appearance, editor preferences, team members, and API keys from the settings modal. Open settings by clicking your **user icon** in the sidebar. The settings modal has five tabs. Open settings from user icon in sidebar *** ## Profile Manage your personal account information. Profile settings | Field | Description | | ------------------- | ---------------------------------------------------------------------------------------------------- | | **Profile Picture** | Upload a JPG, PNG, GIF, or WebP image (max 2 MB). Click the camera icon on your avatar to change it. | | **Display Name** | Your name shown in documents and to collaborators | | **Email Address** | Read-only. Contact support to change your email. | | **Bio / Role** | Brief description used in document metadata (e.g., author role) | At the bottom of the profile tab: * **Log Out** — end your current session * **Request Account Deletion** — permanently delete your account and all data (sends an email to support) *** ## Appearance Choose the visual theme for the Autype interface. Appearance settings ### Default themes | Theme | Description | | --------- | ----------------------------------------------- | | **Light** | Clean & bright — white backgrounds, dark text | | **Dark** | Easy on the eyes — dark backgrounds, light text | ### Custom themes | Theme | Description | | ----------- | --------------------------------- | | **Classic** | Elegant & warm tones | | **Neon** | Cyberpunk-inspired vibrant colors | A live **preview card** at the bottom shows how buttons and text look in the selected theme. The theme setting applies to the Autype interface only. It does not affect the styling of your exported documents. *** ## Editor Configure editor-specific behavior and defaults. Editor settings ### Spellcheck Enable or disable the browser's built-in spellchecker for the Markdown editor. When enabled, misspelled words are underlined directly in the code editor. | Option | Description | | --------------------- | ------------------------------------------------------------- | | **Enable Spellcheck** | Toggle the browser spellchecker on/off in the Markdown editor | ### Default preview mode Choose which preview mode opens by default when you open a document: | Mode | Description | | ------- | ----------------------------------------------------------------------- | | **Web** | HTML preview — fast, instant updates as you type | | **PDF** | Document preview — exact page layout with margins, headers, and footers | *** ## Team Members Manage who has access to your organization. Team settings Team management is available on the **Team** plan and above. Engine, Editor, and Pro are single-seat plans. ### Organization ownership Currently, each user can only **own and manage one organization**. This is due to how billing is structured — the organization owner is responsible for the subscription and all credit usage within the organization. However, a user can be a **member of multiple organizations** and switch between them freely. Billing and member administration depend on the user's role in the active organization. ### Inviting members 1. Enter the email address of the person you want to invite 2. Select their role: **Admin** or **Member** 3. Click **"Send Invite"** The invited person receives an email with a direct link to join your organization. Team subscriptions start with five seats and are billed centrally through the organization owner's subscription. Seat assignment and member access are managed from this page. ### Roles | Role | Permissions | | ---------- | -------------------------------------------------------------- | | **Owner** | Full access, billing, delete organization. Cannot be changed. | | **Admin** | Manage members, projects, and settings. Cannot manage billing. | | **Member** | Create and edit documents within assigned projects. | ### Managing members Click the **⋮** menu next to a member to: * **Change role** — promote or demote between Admin and Member * **Remove** — revoke access to the organization *** ## API Keys Create and manage API keys for programmatic access to Autype. API Keys settings API keys are **scoped to a specific organization**. If you are a member of multiple organizations, you can create separate API keys for each one. Select the desired organization before creating a key. ### Creating an API key 1. Select the organization the key belongs to 2. Click **"Create API Key"** 3. Enter a name for the key (e.g., "Production", "CI/CD") 4. Select the scopes (permissions) the key should have 5. Optionally set an expiration date 6. Click **"Create"** The full API key is only shown **once** after creation. Copy it immediately and store it securely. You will not be able to see it again. If you lose the key, you must delete it and create a new one. ### Managing API keys Each key shows: * **Name** and **key prefix** (first characters for identification) * **Scopes** — which operations the key can perform * **Created date** and **last used date** * **Expiration** — when the key becomes invalid (if set) Click **"Revoke"** to permanently disable a key. See the [Developer API documentation](/api-reference/introduction) for how to use API keys in your integrations. # AI Assistant Panel Source: https://docs.autype.com/getting-started/editor/sidebar-chat Chat with the AI assistant to edit, rewrite, or extend your document content — directly from the sidebar. The **AI Assistant** panel () runs a document-aware agent. It can plan and complete multi-step changes, retrieve only the relevant parts of long documents, and use focused tools for content, abbreviations, citations, variables, reusable blocks, and styles. AI Assistant sidebar panel *** ## Sending messages Type your message in the input field and press **Enter** to send (use **Shift + Enter** for a new line). The assistant analyzes your document and responds with text, proposed changes, or both. Each chat conversation is stored in the **chat history**. You can start a new chat with the button or browse previous conversations via the button. *** ## File attachments Click the button to attach a file to your message. The assistant can read and analyze the file content as part of the conversation. | Format | Extensions | Max size | | --------------- | --------------------------------------------------------- | -------- | | **Images** | JPG, PNG, GIF, WebP | 10 MB | | **PDF** | PDF | 20 MB | | **Word** | DOCX | 15 MB | | **Excel** | XLSX, XLS | 10 MB | | **CSV** | CSV | 5 MB | | **Text / Code** | TXT, MD, JSON, JS, TS, JSX, TSX, PY, HTML, CSS, XML, YAML | 2 MB | ## Editor selection You can select text in the editor and send it as context to the assistant: 1. **Select text** in the editor — an overlay button appears above the selection. 2. Click **Add to Chat** — the sidebar switches to the Assistant panel and the selection is attached to your next message. Add to Chat button appearing above a text selection in the editor The selection context is shown as a badge above the input field. You can remove it with the button. Chat input field showing selection context and file attachment *** ## Proposed changes When the assistant modifies your document, it shows a **change preview** below its response. The preview summarizes what was changed — sections added, updated, or deleted, as well as changes to variables, abbreviations, citations, or style defaults. Assistant response with proposed changes and Accept/Decline buttons You can: * **Accept** — applies the changes to your document * **Decline** — discards the proposed changes * **View diff** — expand the change preview to see a detailed before/after comparison * **Full diff** — open a full-screen modal showing the complete document diff with all changes highlighted Expanded diff view showing before and after comparison Click the expand button to open the full document diff in a modal view: Full document diff modal showing all changes across the entire document If you send a new message while changes are still pending, the pending changes are automatically declined. *** ## What the assistant can do The assistant is not limited to editing text content. It can modify multiple areas of your document: | Area | Examples | | ---------------------- | ------------------------------------------------------------------------------------- | | **Content** | Write, rewrite, extend, summarize, or restructure sections | | **Variables** | Add, update, or remove document variables | | **Abbreviations** | Add or modify abbreviation definitions | | **Citations** | Add or update bibliography entries | | **Reusable blocks** | Find and insert approved blocks when requested or after confirmation | | **Styles** | Apply a preset or adjust fonts, colors, spacing, captions, and other defaults | | **Document settings** | Change page size, orientation, margins | | **Files and research** | Read attached files and retrieve supporting web information when the task requires it | *** ## Billing Completed assistant tasks use the monthly assistant allowance of your plan. They do not consume automation credits. A task can contain multiple internal tool steps; it counts as one assistant task from the product perspective. For details on credit pricing and plan limits, see [Pricing](/getting-started/pricing). # Comments Panel Source: https://docs.autype.com/getting-started/editor/sidebar-comments Add contextual comments in Markdown or visual mode, reply to threads, and coordinate reviews. The **Comments** panel () lets you add comments to Markdown lines or visual-editor blocks. Use threads for feedback, questions, and review decisions without moving the discussion outside the document. Comments sidebar panel *** ## Creating a comment in Markdown To add a comment, hover over the area between the line number and the text in the editor. A button appears on the current line. Plus button appearing in the editor gutter on hover Click the button to open the **Add Comment** modal. The modal shows the target line number and a text field for your comment. Press **⌘ + Enter** (or **Ctrl + Enter**) to submit, or click **Add Comment**. Add Comment modal with line number and text input The comment is now anchored to that line and appears in the sidebar. ## Creating a comment in Write mode Right-click the visual block you want to discuss and choose **Add comment**. The same comment modal opens and stores an anchor adjacent to the corresponding Extended Markdown element. A comment icon appears to the right of the visual editor. Select it to open the Comments panel with that thread active. *** ## Comment anchor placement Comment anchors are invisible markers embedded directly in your Markdown source. Where exactly the anchor is placed depends on the type of content you comment on: * **Single-line elements** (headings, paragraphs, list items, etc.) — the anchor is inserted on the same line, at the end of the text. * **Multi-line elements** (code blocks, tables, lists, blockquotes, etc.) — the anchor is placed on a **new line directly below** the element. Commenting on any item within a list or any row within a table will place the anchor after the entire block. This is because inserting a marker inside a multi-line block would break its syntax. ### Anchor movement during editing Because anchors live inside the document text, they behave like any other character when you edit around them: * **Pressing Backspace** at the beginning of the line below the comment icon will delete the anchor. This happens because the anchor marker is stored at the end of that line — pressing Backspace merges the lines and removes the anchor in the process. * **Deleting lines** above the anchor shifts it upward. * **Adding lines** above the anchor shifts it downward. This means the comment may appear to "move" to a different line after edits — it is still attached to the same position in the text, but the line number changes as surrounding content shifts. If the anchor ends up in an unexpected position after editing, you can always click the comment in the sidebar to jump to its current location in the editor. *** ## Viewing comments The sidebar lists all comment threads for the current document. Each card shows the author's avatar, name, timestamp, and the comment text. Comments list showing two example comments Only the comments of the **selected** (expanded) thread are fully visible. Collapsed threads show a reply count if they have replies — click a thread to expand it. ### Filter tabs When comments exist, three filter tabs appear at the top: | Tab | Shows | | ------------ | ----------------------- | | **All** | All comment threads | | **Open** | Unresolved threads only | | **Resolved** | Resolved threads only | *** ## Navigating between editor and comments Comments and the editor are linked **bidirectionally**: * **Sidebar → Editor**: Click a thread to jump to its Markdown line or visual block. * **Editor → Sidebar**: Click the amber comment icon in the Markdown gutter or beside the visual editor to open and select the thread. Comment bubble icons in the editor gutter for navigating to comments *** ## Thread actions Hover over a comment thread and click the menu to access actions: Comment dropdown menu with Resolve and Delete options * **Resolve** — marks the thread as resolved. Resolved threads appear grayed out and move to the **Resolved** filter tab. You can reopen a resolved thread from the same menu. * **Delete** — permanently removes the thread (only available for your own comments). ### Replies When a thread is expanded (selected), a reply input appears at the bottom. Type your reply and press **Enter** to send. You can also use quick emoji reactions (👍 ❤️ 🎉 👀) via the button when the input is empty. *** ## Orphan comments Comment anchors are embedded in your document as hidden markers. If you delete the line that contains an anchor, the comment loses its position in the document. When a comment anchor is removed (e.g., by deleting the line), the comment is **not** automatically deleted. It remains in the sidebar but is grayed out with an amber "Removed from document" warning. You can still read it, but replying is disabled. To fully remove it, delete the thread manually via the menu. # Documents Panel Source: https://docs.autype.com/getting-started/editor/sidebar-documents Quickly access your most recently edited documents from the sidebar — without leaving the editor. The Documents panel () gives you a quick way to switch between your **recently edited documents** without navigating back to the workspace. Documents panel showing recently edited documents *** ## How it works When you open the Documents panel, it shows up to **15 of your most recently edited documents** across all projects. Each entry displays: * **Document title** * **Project name** the document belongs to * **Last edited date and time** The **currently open document** is highlighted with an accent border and a colored icon so you can always see which document you're working on. *** ## Switching documents Click any document in the list to open it directly in the editor. The switch happens instantly — there's no need to go back to the workspace, find the project, and then open the document. This is especially useful when you're working on multiple documents at the same time — for example, a main report and an appendix, or several related templates. # Version History Panel Source: https://docs.autype.com/getting-started/editor/sidebar-history View, compare, and restore previous versions of your document — with automatic and manual snapshots. The Version History panel () tracks every change to your document. Autype automatically creates snapshots in the background, and you can create named versions manually at any time. Version History panel showing auto-saved versions *** ## Automatic snapshots Autype creates **automatic snapshots** at regular intervals as you work. You don't need to do anything — they are created silently in the background whenever your document is saved. The last **50 snapshots** are retained per document. Older snapshots are automatically removed to keep the list manageable. Automatic snapshots are grouped under the **"Auto-saved"** section and labeled with a timestamp, the author, and a version number. *** ## Manual (named) versions In addition to automatic snapshots, you can create **named versions** at any point — for example, before a major rewrite, after completing a section, or before sending a document to a client. Click the **"+ Create Version"** button at the top of the panel to open the dialog: Create Version dialog with a version name input Enter a descriptive name (e.g., *"Before refactor"*, *"Version 2.1"*, *"Final draft"*) and click **Create**. The named version appears in its own **"Named Versions"** section above the auto-saved snapshots. Named versions are never automatically deleted. Use them to mark important milestones you may want to return to later. *** ## Version actions Each version entry shows the **version name or message**, **author avatar and name**, and **relative timestamp**. When you hover over a version, three action buttons appear: | Button | Action | Description | | -------------------------- | ------------- | ---------------------------------------------------------------------------- | | | **View diff** | Opens a side-by-side comparison of this version against the current document | | | **Restore** | Restores the document to this version (with confirmation) | | | **Delete** | Permanently deletes this version (with confirmation) | *** ## Diff view Clicking the button opens a full-screen **side-by-side diff view** powered by Monaco Editor. Diff view comparing a previous version (left) with the current document (right) * **Left side** — the selected version (the older state) * **Right side** — the current document (the latest state) Changes are highlighted inline: **red** for removed content, **green** for added content. You can scroll through the entire document to review all differences. ### Markdown / JSON toggle In the top-right corner of the diff dialog, a toggle lets you switch between **Markdown** and **JSON** view: | Mode | Shows | | ------------ | ------------------------------------------------------------------------------------------------ | | **Markdown** | The human-readable Markdown content — best for reviewing text changes | | **JSON** | The raw document schema — useful for inspecting structural changes (variables, styles, metadata) | From the diff view, you can also click **"Restore this version"** to restore directly without closing the dialog first. *** ## Restoring a version When you restore a version (either from the hover action or from the diff view), Autype: 1. **Creates a new snapshot** of the current document state — so you can always undo the restore 2. **Replaces the document content** with the selected version's content A confirmation dialog is shown before the restore is applied. Restoring a version is **not available during live collaboration sessions** with other active users to prevent conflicting document states. If other users are currently editing, you'll see an error message. # Images Panel Source: https://docs.autype.com/getting-started/editor/sidebar-images Upload, manage, and insert images into your document from the sidebar panel. The **Images** panel () lets you upload, generate, and browse images for your document. It has three tabs: **My Images**, **AI Gen**, and **Stock**. Images sidebar panel — My Images tab *** ## My Images This tab shows all images uploaded to the current document. At the top is a drop zone where you can **click or drag & drop** files to upload. **Upload limits:** | Constraint | Value | | ------------------------ | -------------------- | | **Formats** | PNG, JPG, JPEG, WebP | | **Max file size** | 25 MB | | **Max files per upload** | 5 | ### Inserting images into your document There are two ways to insert an uploaded image: 1. **Copy markdown** — hover over an image and click the **Copy** button. This copies the full markdown syntax to your clipboard, ready to paste into the editor. 2. **Drag & drop** — drag an image directly from the panel into the editor. The markdown syntax is inserted automatically at the drop position. Hover actions on an image — Copy and Delete buttons When hovering over an image, two buttons appear: * **Copy** — copies Markdown image syntax with the protected `/image/{assetId}` source * **Delete** — permanently removes the image from the document ### Markdown image syntax Images use standard Markdown syntax: ```markdown theme={null} ![Caption text](image-path) ``` The text inside the square brackets becomes the **figure caption**. Captions are auto-numbered (e.g., *Figure 1: Caption text*). If the square brackets are empty (`![](image-path)`), **no caption** is generated for the image. You can customize caption appearance (prefix, font size, font style, alignment) or disable captions entirely in the [Styles panel](/getting-started/editor/sidebar-styles#figure-captions). For the full image syntax reference including sizing, alignment, anchors, and the image directive, see [Markup Reference → Images](/markup-reference/images). *** ## AI Gen Generate images using AI directly from the sidebar. Enter a prompt, choose an aspect ratio, and optionally specify a style. AI image generation tab **Options:** | Setting | Values | | ---------------- | ---------------------------------------------------------------------- | | **Aspect Ratio** | 1:1 (Square), 16:9 (Wide), 9:16 (Tall), 4:3 (Standard), 3:4 (Portrait) | | **Style** | Optional — e.g., `cartoon`, `photorealistic`, `watercolor` | Generated images are automatically added to your **My Images** library and can be inserted into the document the same way as uploaded images. AI image generation uses one image from your plan's monthly AI image allowance. The panel shows the requirement before generation. *** ## Stock Search for free high-quality photos powered by **Unsplash**. Enter a search term and browse the results. Stock images tab — Unsplash search Stock images can be inserted via **drag & drop** or by clicking the **Copy** button (copies the markdown with the public Unsplash URL). An button opens the full-resolution image in a new tab. Photographer credits are shown on hover at the bottom of each image. # Records Source: https://docs.autype.com/getting-started/editor/sidebar-records Save reusable variable datasets for a document, check compatibility, render historical outputs, and import data in bulk. Records store one named set of variable values for a document, such as one customer, offer, contract, or case. They let you reuse a single maintained document without creating a separate document copy for every output. ## Create a record 1. Open **Records** in the document sidebar. 2. Click the add button. 3. Enter a label for the customer or case. 4. Fill the form generated from the document's current variables. 5. Review the live preview, save the record, and choose an export format when you are ready to render. Text, number, image, list, and table variables use type-specific controls. Images can be uploaded as protected document assets; tables can be edited as a grid rather than raw JSON. ## Edit and preview Open an existing record to edit its typed values next to a live document preview. Preview changes are rendered against the document version pinned to that record and do not overwrite the saved values until you explicitly save. This makes it possible to verify an older customer output even after the source document has evolved. Each successful export stores the resolved input snapshot and output metadata with the record. Re-exporting an old record therefore remains traceable instead of silently adopting unrelated current defaults. ## Compatibility when variables change Records remain associated with the document version they were created for. Autype compares their values with the current variable definitions and reports: * missing values, * unused values, * type mismatches, and * missing variable definitions. You can update a record for the current document or keep an older record pinned to its historical version and export it again. This prevents later variable changes from silently changing an old customer output. ## Import and bulk The second view in the Records panel supports two workflows: | Workflow | Result | | ------------------------- | ------------------------------------------------------- | | Temporary bulk generation | Render many rows without keeping each row as a record | | Import | Create persistent records from CSV, Excel, or JSON data | Use temporary bulk output for one-off batches. Use imported records when the customer/case data and its render history must remain available. # Reusable Blocks Source: https://docs.autype.com/getting-started/editor/sidebar-reusable-blocks Create, organize, edit, and insert organization-wide content blocks from the document editor. The **Reusable Blocks** sidebar contains organization-wide content that can be shared across documents: legal clauses, product descriptions, standard terms, disclaimers, and other repeated sections. ## Create and edit a block 1. Open **Reusable Blocks** in the editor sidebar. 2. Click the add button. 3. Enter a name, optional description, category, and tags. 4. Write the content in **Rich text** or **Markdown** mode. 5. Optionally add a short changelog note and save the block. Blocks are stored as Extended Markdown and versioned when their content is updated. Metadata-only edits such as changing a category do not create an unnecessary version. Categories and tags make larger libraries searchable. You can also right-click a supported block in the visual editor and choose **Save as reusable block**. Autype opens the same create flow with that document section as the initial content. ## Insert into a document Place the editor cursor where the block should appear, then choose: | Action | Behavior | | ------------- | ----------------------------------------------------------------------------------- | | **Reference** | Inserts a linked, read-only block. Updates can follow the selected library version. | | **Copy** | Inserts an editable snapshot that is independent from future library changes. | Referenced blocks display their name and resolved content in the rich text editor. Edit the source block from the sidebar instead of modifying the linked content directly. You can also drag a block from the sidebar to the current editor position. Drag-and-drop always creates a **Reference**, never a copied snapshot. ## History, restore, and detach Open **Library → Reusable blocks** for a searchable table of all blocks. Choose **History** on a row to review every published version, its changelog note, timestamp, rendered preview, and source Markdown. Choose **Restore this version** to return to earlier content. Restore never deletes or overwrites history: it copies the selected content into a new current version and records which version it came from. This keeps existing pinned references deterministic and makes every rollback auditable. A reference can follow the block's **latest** version or stay **pinned** to one specific version. When a newer version exists, update the pinned reference from its context toolbar. To customize linked content only for the current document, choose **Detach**; the resolved block becomes ordinary editable document content and no longer receives library updates. The document stores fallback content with a reference so conversions and previews remain deterministic even if the library item is temporarily unavailable. Organization permissions still control access to the source block. Use references for centrally maintained content. Use copies when the inserted text must be customized for one document. # Styles Panel Source: https://docs.autype.com/getting-started/editor/sidebar-styles Create, manage, and apply document style presets — control fonts, colors, spacing, headers, footers, and more. The **Styles** panel () lets you create, manage, preview, and apply organization-wide document style presets. Styles control fonts, colors, spacing, headers, footers, tables, form fields, charts, and more. The visual **Page Design** workspace supports document styling master pages, first/odd/even variants, reusable multi-row regions, mirrored margins, backgrounds, and repeating page decoration. Existing documents and presets remain fully supported. Legacy rendering remains available until a style is explicitly upgraded. See [Document Styling](/api-reference/json-syntax/document-styling). Styles sidebar panel *** ## How styles work Styles in Autype follow a **copy-on-apply** model: 1. You create a **style preset** (or choose a template) that defines fonts, colors, spacing, headers, footers, etc. 2. When you click **Apply** or **Use Template**, the style configuration is **copied into the document**. The document now has its own independent copy of that style. 3. You can further customize the document's style via **Edit Document Style** at the top of the panel. These changes only affect the current document. ### Permissions and shared assets Company styles and their images are readable across the organization so team members can consistently reuse logos, backgrounds, headers, and footers. Creating or changing a company style requires a licensed organization member; changing the organization default requires an organization owner or administrator. Applying a style never grants additional document access. The user must already have edit permission for the target document. Images used by a company style are copied into that document during application, which keeps existing documents independent from later preset changes. Autype prevents deletion of a company image while any style preset still references it. Remove or replace the image in those presets first. For users who belong to multiple organizations, the target organization must be selected explicitly when creating styles or uploading style images. If you later edit a style preset, documents that were previously styled with it are **not** updated automatically. You must re-apply the style to propagate changes. This is by design — otherwise modifying a shared preset would unexpectedly alter all documents that use it. *** ## Sidebar overview The panel has two main areas at the top: * **Document Style** — click **Edit Document Style** to open the Style Editor and modify the current document's styling directly. Changes apply only to this document. * **Create New Style** — creates a reusable style preset that can be applied to any document. Below that, two sub-tabs organize your styles: ### My Styles Lists style presets available to your organization. Each card includes a cached PDF preview, name, description, page size, and default font. Actions per style: * **Apply / Re-apply** — applies the style to the current document * **Edit** — opens the Style Editor to modify the preset * **Delete** — permanently removes the preset ### Templates Autype ships 30 complete schema-version-2 system styles covering executive reports, consulting and sales proposals, legal memoranda, research papers, journal manuscripts, ESG and nonprofit reports, clinical reports, financial statements, audit and compliance reports, whitepapers, product requirements, employee handbooks, invoices, policy briefs, investment memos, brand brochures, board minutes, and operations playbooks. Each system style includes typography, element styles, page geometry, background decorations, reusable header/footer regions, tables, forms, charts, references, and PDF/DOCX-safe defaults. Choose **Use Template** in a document to attach the immutable built-in style directly; no workspace copy is created. Choose **Customize** in the Workspace Library only when you want an editable, independently named preset. The built-in source is never modified. The thumbnails are prerendered from the exact shared definitions with the production document renderer. A catalog manifest hashes both definition and image, and the image hash is used as the browser/CDN cache key. Production builds fail when a definition changes without regenerating its preview, so users never receive a stale or per-card runtime placeholder. Style templates tab *** ## Style Editor The Style Editor is a full-screen design studio. **Page Design** uses a large, zoomable page canvas. Click the page, header, or footer to open only the tools for that area; close the inspector to use the full canvas width. Typography, text elements, tables, fields, charts, code, and references remain focused setting areas with a rendered PDF preview. The style name is always available in the top bar, so it is not hidden inside one tab. On Pro, Team, and Enterprise plans you can generate a complete style using AI. Click **Generate with AI**, describe the look you want, and the same strong text model used by the document agent returns a complete current `StyleDefinition`: document setup, typography, page variants, page objects, reusable regions, and element styles. Legacy `header`/`footer` output is rejected. The result must pass schema, physical layout, PDF, and DOCX compatibility checks before it reaches the editor. *** ### Page Design **Page Design** is the primary workspace for physical page layout: * switch directly between **Master**, **First page**, **Odd**, **Even**, **Section first**, and **Blank**; * use the always-visible **Page setup** control to choose A3, A4, A5, Letter, or Legal format and portrait or landscape orientation; * click the dashed content area, header, or footer directly on the page to open its contextual editor; * drag the blue margin guides on the page or enter exact millimetre values; * drag the two horizontal handles on a selected header or footer to change its distance from the page edge and its minimum height; * zoom the editing canvas in or out without changing the document; * switch to a two-page spread to review odd and even pages together; * set page background colors, gradients, images, content columns, and classic side strips; * create a header or footer from the visible empty area on the page, or reuse an existing region; * empty headers, footers, and region cells remain visible as dashed click/drop targets, so adding the first element does not require finding a form field; * choose a visual one-, two-, three-column, or two-row layout in the region inspector; * drag text, fields, images, lines, variables, spacing, QR codes, and shapes from the persistent element palette into any header or footer column; * drop several elements into the same column to stack or arrange them there; * select an element directly on the page to edit, reorder, replace, or remove it in the contextual inspector; * click an individual header or footer cell to set its horizontal left/center/right/stretch alignment and vertical top/middle/bottom/stretch alignment; * use custom grid controls only when the visual presets are insufficient; * undo and redo local changes while structural, physical-layout, DOCX, and PDF compatibility feedback remains visible in the bottom bar. The same palette also places free page objects directly on the selected master or variant. Text, fields, images, lines, and shapes can be dragged onto the page, then moved, resized, rotated, duplicated, locked, reordered, or removed. The contextual object inspector exposes physical millimeter coordinates, page/content anchoring, left/right/stretch constraints, background/foreground layers, opacity, mirroring on even pages, clipping and overlap intent, image fit and focal point, per-edge shape borders, arrows, and multi-stop linear or radial fills. The Layers panel remains usable for background objects covered by the gray content guide. Existing current styles are read without rewriting their constraint representation: right-anchored and stretched frames, token color references, gradient stops, object IDs, locking, and layer order remain intact until the corresponding value is edited. On First/Odd/Even/Section/Blank variants, inherited objects are labelled as coming from Master. The first variant-specific edit creates an explicit copy of the effective object list; **Edit Master instead** keeps the shared design linked. Design starters such as double rails, page frames, corner marks, top/bottom bands, and watermarks insert ordinary editable page objects rather than a second template data structure. Use **Output preview** to switch the center workspace from the fast editing canvas to the authoritative rendered PDF, then return with **Edit canvas**. Before a current style is applied, Autype validates the complete merged document and renders a temporary DOCX/PDF preview with the active renderer. The new document snapshot is written only after that preflight succeeds. If rendering fails, the existing document remains unchanged and copied style assets are rolled back. The editor also blocks Apply/Save while a page object or background still contains an unfinished image selection or an unsafe physical layout. The gray dashed rectangle is the document content area. It is deliberately not a document preview: it makes margins and repeating page elements easy to edit without pretending to be the final renderer. DOCX/PDF rendering remains the authoritative output. Odd and even margin controls update the master's mirrored inside/outside margins. Office formats cannot safely change section geometry on alternating page variants. Different page size, orientation, columns, or section margins therefore use an advanced section layout assigned to that section. For a legacy style the canvas initially shows a lossless preview and a warning. Merely opening and closing the editor does not migrate or rewrite it. Choose **Convert to visual design** explicitly before editing. The conversion stores the current page data while legacy import, validation, and rendering remain supported. *** ### Typography Set the global default font and configure heading numbering, figure captions, table captions, and code captions. Style Editor — Typography tab **Default Font** — applies to all text unless overridden by element-specific styles: | Setting | Description | | --------------- | ------------------------------------- | | **Font Family** | Choose from a wide selection of fonts | | **Font Size** | Size in points | | **Color** | Text color | | **Line Height** | Line spacing multiplier (e.g., 1.5) | **Heading Numbering** — automatically numbers headings using a format string: | Character | Style | | --------- | ---------------------------- | | `1` | Numeric (1, 2, 3) | | `a` | Lowercase letters (a, b, c) | | `A` | Uppercase letters (A, B, C) | | `i` | Roman lowercase (i, ii, iii) | | `I` | Roman uppercase (I, II, III) | | `α` | Greek letters | Example: `1.1.a` produces headings like *1. Title*, *1.1 Section*, *1.1.a Subsection*. **Figure Captions** — controls how image and chart captions are rendered: | Setting | Description | | --------------- | ------------------------------------------------------- | | **Prefix** | Text before the number (e.g., `Figure`, `Abb.`, `Fig.`) | | **Size** | Font size in points | | **Font Family** | Override or inherit from defaults | | **Weight** | Normal or Bold | | **Style** | Normal or Italic | | **Color** | Caption text color | | **Align** | Left, Center, or Right | | **Spacing** | Space between the image/chart and the caption | | **Disable** | Turn off figure captions entirely | A figure caption renders as: **Figure 1: Your caption text**. The number is auto-incremented across the document. Set the prefix to `"Abb."` for German documents or `"Fig."` for abbreviated English. **Table Captions** — same options as figure captions but for tables. A table caption renders as: **Table 1: Your caption text** (prefix defaults to `Table`). **Code Captions** — same options as figure captions but for code blocks. A code caption renders as: **Listing 1: Your caption text** (prefix defaults to `Listing`). Code blocks with a caption are automatically collected in the [List of Code Listings](/markup-reference/indices#list-of-code-listings). Diagram code blocks (e.g., `mermaid`, `plantuml`) use the **Figure Captions** style when rendered as images. The **Code Captions** style applies when `renderAsImage=false` or for non-diagram code blocks. *** ### Header & Footer Existing legacy left, center, and right values are normalized into the visual canvas without changing the stored style. Click the header or footer directly on the page to inspect it. Choose **Convert to visual design** before making changes; the legacy fields remain supported by import, validation, and rendering. The old three-position form is no longer a separate navigation item. This avoids presenting two competing header/footer editors for the same style. Drag one or more blocks from the persistent element palette into a header or footer column: | Type | Description | | ------------ | --------------------------------------------------------------------------------------- | | **Text** | Multi-line text with font size, weight, color, and alignment | | **Field** | Page number, total pages, document title, author, section title, chapter title, or date | | **Image** | Upload a managed style asset with its own dimensions | | **Line** | Horizontal or vertical separator | | **Variable** | A document variable with optional fallback | | **Space** | Explicit spacing between blocks | | **QR** | QR code generated from text or a URL | | **Shape** | A reusable decorative shape | **Available variables for text mode:** | Variable | Output | | ------------------------- | -------------------------------- | | `{{pageNumber}}` | Current page number | | `{{totalPages}}` | Total number of pages | | `{{date}}` | Current date (DD.MM.YYYY) | | `{{date/YYYY-MM-DD}}` | Custom date format | | `{{date/DD.MM.YYYY/+7d}}` | Date with offset (+/-Nd, Nm, Ny) | | `{{date/HH:mm//+01:00}}` | Date with timezone | Use the **First page** variant to hide, replace, or redesign the header or footer on the title page. Variants inherit the master until they are changed. *** ### Text Elements Configure the typography for each heading level (H1–H6) and two body text styles (Text, Text 2). Each element can override the global defaults. Style Editor — Text Elements tab Per element: | Setting | Description | | ------------------------ | ---------------------------------------------------- | | **Font Family** | Override or inherit from defaults | | **Size** | Font size in points | | **Weight** | Normal, Bold, or Inherit | | **Color** | Text color | | **Align** | Left, Center, Right, Justify, or Inherit | | **Line Spacing** | Line spacing multiplier, e.g. 1.5 (body text only) | | **Space Before / After** | Spacing in points | | **Page Break Before** | Start a new page before this heading (headings only) | **Text** is the default body style. **Text 2** is a secondary paragraph style activated by the `| text` prefix in Markdown. Both support the same properties but can be configured independently — useful for distinguishing regular paragraphs from supplementary text like annotations or side notes. *** ### Tables Control the visual appearance of tables in your document. Style Editor — Table tab **Borders:** | Setting | Options | | ---------------- | ---------------------------------------------- | | **Outer Border** | Width (pt), Style (Solid/Dashed/Dotted), Color | | **Inner Grid** | Width (pt), Style (Solid/Dashed/Dotted), Color | **Header Row** — background color and text color for the first row. **Cell Padding** — top, right, bottom, left padding in points. **Spacing** — space before and after the table element. *** ### Form Fields The **Form Fields** section controls document-wide defaults for text, number, date, multiline, choice, signature, and initials controls. | Setting | Description | | ------------------------------ | --------------------------------------------- | | **Border mode** | Outline, underline, or no border | | **Line style / width / color** | Solid, dashed, or dotted field border | | **Background / text color** | Field surface and entered text colors | | **Font size** | Text size inside controls | | **Inset / radius** | Inner padding and corner radius | | **Checkbox shape** | Square or circle | | **Checkbox border** | Independent checkbox border mode | | **Container / hints** | Show or hide editor-only framing and metadata | | **Spacing** | Space before and after form field blocks | These values are stored in `defaults.styles.formField` and `defaults.spacing`. A field can override them locally from its context toolbar. *** ### Charts Configure the color palette used for chart series. Style Editor — Chart tab Define up to 5 series colors, each with a **fill color** and a **border color**. These colors are applied to bar charts, line charts, pie charts, and other chart types. *** ### Code Blocks Style Editor — Code Blocks tab | Setting | Description | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Render as Image** | When enabled, code blocks are rendered as PNG images. This improves compatibility in DOCX exports where syntax highlighting may not be preserved natively. | *** ### Equations Style Editor — Equations tab | Setting | Description | | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Render as Image** | When enabled, math equations are rendered as PNG images. This improves compatibility in DOCX exports where LaTeX rendering may not be supported natively. | *** ### References & Citations Configure the styling for reference links, the List of Abbreviations, and the bibliography. Style Editor — References tab **Reference Links** — style for internal cross-reference links (e.g., `[](#anchor)`): | Setting | Options | | -------------- | --------------------------------- | | **Link Color** | Color picker | | **Text Style** | Bold, Italic, Underline (toggles) | **List of Abbreviations:** | Setting | Options | | --------------- | -------------------------------- | | **Sort Order** | Alphabetical or Document Order | | **Separator** | Dash, Hyphen, Colon, Equals, Tab | | **Font Size** | Size in points | | **Font Family** | Override or inherit | **Bibliography & Citations:** | Setting | Options | | ------------------ | --------------------------------------------------- | | **Citation Style** | APA 7, Harvard, IEEE, Chicago, MLA, Vancouver, ABNT | | **Font Family** | Override or inherit | | **Font Size** | Size in points | | **Entry Spacing** | Space between entries in points | | **Hanging Indent** | Indent for continuation lines in cm | *** ### JSON Editor For advanced users, the JSON Editor provides direct access to the raw configuration object. Changes are applied live as you type. Style Editor — JSON Editor The editor uses Monaco (the same engine as VS Code) with syntax highlighting, folding, and validation. This is useful for fine-tuning values that are not exposed in the visual UI or for copying configurations between documents. # Language Variants Source: https://docs.autype.com/getting-started/editor/sidebar-translations Generate read-only language variants, preview and export them, and regenerate variants when the source document changes. The **Translations** panel creates language variants that remain linked to one source document. A variant is generated only when you request it, does not create another editable document, and can be previewed or exported as PDF, DOCX, or ODT. ## Generate a language variant 1. Open **Translations** in the document sidebar. 2. Click **Generate translation**. 3. Search for a language or navigate the list with the arrow keys. 4. Select the language and wait for the translation to complete. Autype checks the job while the panel is open. Closing the panel stops UI polling but does not cancel the server-side translation. Supported languages are English, German, French, Spanish, Italian, Portuguese, Dutch, Polish, Swedish, Danish, Norwegian, Finnish, Czech, Romanian, Hungarian, and Turkish. ## Preview and export Completed variants are read-only. Use **Preview** to inspect the rendered PDF, or export the variant as PDF, DOCX, or ODT. The original document remains the single editable source of truth. If you need an independently editable translation, use the translated output as the starting point for a separate document instead of changing the linked variant. ## Outdated variants When the source document changes, existing variants are marked **Outdated**. Choose **Regenerate** to translate the current source revision. Previous exports are not modified. Autype preserves document structure, styles, variables, citations, formatting, page sections, tables, and form fields. It translates human-readable document text in context and validates that variable placeholders remain unchanged. Long documents are translated in ordered chunks with neighboring context. Content from referenced reusable blocks, code and formulas, diagram and QR sources, URLs, and variable values is not translated. Detach a reusable block first if its resolved text must become part of the translated document. # Variables Panel Source: https://docs.autype.com/getting-started/editor/sidebar-variables Define and manage document variables — text, numbers, images, lists, and tables — for reusable content, bulk generation, and API automation. The Variables panel () lets you define **named placeholders** that can be used throughout your document. Instead of repeating the same value in multiple places, define it once as a variable and reference it with `{{variableName}}` — when the value changes, every occurrence updates automatically. Variables panel showing text, number, image, list, and table variables *** ## Why use variables? * **Central updates** — Change a company name, logo, or document number in one place and it updates everywhere in the document. * **Bulk generation** — Variables serve as the template for [bulk document creation](/automation/overview). Define default values in the editor, then override them per document via CSV or API. * **API automation** — When generating documents via the [REST API](/api-reference/introduction), variables are passed as JSON. The values defined in the panel act as defaults that can be overridden at render time. *** ## Variable types Autype supports five variable types. Use the buttons at the top of the panel to add a new variable: | Type | Icon | Use case | | ---------- | ------------------------- | ------------------------------------------------- | | **Text** | | Short inline values — names, dates, labels | | **Number** | | Numeric values — amounts, counts, IDs, chart data | | **Image** | | Logos, signatures, photos — anything visual | | **List** | | Ordered or unordered lists of items | | **Table** | | Structured data with named columns and rows | When creating a variable, you choose a **name** that must start with a letter or underscore and can only contain letters, numbers, and underscores (e.g. `companyName`, `logo_image`, `featureList`). The name cannot be changed after creation. *** ## Text variables A text variable holds a single string value (max 1,000 characters). Use it for anything that appears inline in your document — company names, author names, dates, etc. Text variable with value set **Insert into document:** ```markdown theme={null} Dear {{companyName}}, please find attached... ``` Text variables can be placed **anywhere inline** — inside paragraphs, headings, table cells, or list items. *** ## Number variables A number variable holds a single numeric value (integer or decimal). Use it for amounts, counts, IDs, or any dynamic numeric content. **Insert into document:** ```markdown theme={null} Total: {{totalAmount}} EUR ``` Number variables are automatically converted to their string representation when used inline. They are especially useful in **chart data arrays**, where they are resolved to numeric values at render time. For chart variable substitution details, see the [JSON Syntax — Charts](/api-reference/json-syntax/sections/media#variable-substitution-in-charts) reference. *** ## Image variables An image variable stores a reference to an image file along with optional **width**, **height**, and **caption** properties. Image variable with source, dimensions, and caption fields You can either enter an image path manually or click the button to upload an image directly. Uploaded images are stored as project assets. | Field | Required | Description | | ----------- | -------- | ----------------------------------------------------------- | | **Source** | Yes | Image path (e.g. `/image/assetId`) or external URL | | **Width** | No | Width in pixels (10–2,000) | | **Height** | No | Height in pixels (10–2,000) | | **Caption** | No | Caption text displayed below the image (max 200 characters) | **Insert into document:** ```markdown theme={null} {{companyLogo}} ``` Image variables must be placed on their **own line** — they cannot be used inline within a paragraph. *** ## List variables A list variable holds an ordered or unordered list of text items (up to 100 items, each max 1,000 characters). Toggle between **Unordered** and **Ordered** using the switch at the top of the variable. List variable with three items and list type toggle Use **+ Add Item** to add entries and the button to remove individual items. **Insert into document:** ```markdown theme={null} {{featureList}} ``` List variables must be placed on their **own line** — they cannot be used inline within a paragraph. *** ## Table variables A table variable stores structured data with **named columns** and **rows** (max 100 rows × 20 columns, cell content max 1,000 characters). Click **Edit Table Data** to open the table editor modal. Table editor modal with editable column headers and data rows In the modal you can: * **Edit column headers** — click directly on the header cells to rename them * **Edit cell values** — click any cell to change its content * **Add / remove rows and columns** — use the buttons below the table * **Delete individual rows** — click the button on each row The modal also shows the syntax hint for referencing individual columns: `{{TableName.columnName}}`. **Insert into document:** ```markdown theme={null} :::table{dataSource="PerformanceTable"} | 2024 | 2025 | 2026 | | --- | --- | --- | ::: ``` The column headers in the Markdown must match the column names defined in the variable. The `| --- |` separator row is required. At render time, the table is populated with the data from the variable. Table variables use the directive syntax and must be placed on their **own line** — they cannot be used inline. *** ## Inserting variables Every variable in the panel has a **copy button** that copies the correct insertion syntax to your clipboard: | Variable type | Copied syntax | | ------------- | ------------------------------------------------------ | | **Text** | `{{variableName}}` | | **Number** | `{{variableName}}` | | **Image** | `{{variableName}}` | | **List** | `{{variableName}}` | | **Table** | `:::table{dataSource="variableName"}` + column headers | Paste the copied syntax directly into your document at the desired position. In Markdown mode the syntax remains visible. In Write mode Autype recognizes a known variable and displays it as a visual variable token instead of raw Markdown. You can also drag a variable from the sidebar into either editor. Autype inserts it at the drop position and preserves the required inline or block-level form for that variable type. You can also type `{{` manually in the editor and enter the variable name. The toolbar provides a searchable variable picker, including an option to create a new variable. *** ## Variables and bulk generation The variables you define in the panel serve as the **default template values**. When you use [bulk generation](/automation/overview) or the [API](/api-reference/introduction), you can override any variable per document: 1. **Define variables** in the sidebar with sensible defaults 2. **Reference them** throughout your document with `{{variableName}}` 3. **Override values** per document via CSV upload (bulk) or JSON payload (API) Any variable not overridden in a bulk job or API call keeps its default value from the panel. For a full reference on variable syntax — including built-in variables like `{{date}}`, date formatting, and block-level usage — see the [Markup Reference: Variables](/markup-reference/variables). # Signup & Login Source: https://docs.autype.com/getting-started/editor/signup-login Create your Autype account or sign in — with email/password or OAuth providers. ## Create an account To get started with Autype, create an account at [app.autype.com/register](https://app.autype.com/register). New accounts can explore Engine in read-only mode, start a 14-day Pro trial, or activate headless jobs with permanent pay-as-you-go credits. Autype Sign Up screen You can sign up using: * **Google** — one-click sign up with your Google account * **GitHub** — one-click sign up with your GitHub account * **Email & Password** — enter your name (optional), email, and a password (min. 8 characters) After signing up with email, you'll receive a **verification email**. Click the link in the email to activate your account. If you don't see the verification email, check your spam folder. You can also request a new verification link from the verification page. ### Email verification Email verification screen After registering with email, you are redirected to the verification page. Once you click the link in your inbox, your account is activated and you are automatically redirected to the workspace. Verification email example *** ## Sign in Go to [app.autype.com/login](https://app.autype.com/login) to sign in to your existing account. Autype Sign In screen ### Supported sign-in methods | Method | Description | | -------------------- | ----------------------------------------------- | | **Google** | Sign in with your Google account via OAuth | | **GitHub** | Sign in with your GitHub account via OAuth | | **Email & Password** | Sign in with your registered email and password | ### Forgot password If you forgot your password, click **"Forgot password?"** on the login page. Forgot password screen 1. Enter your email address 2. Click **"Send Link"** 3. Check your inbox for a password reset email 4. Click the link and set a new password OAuth users (Google/GitHub) don't need a password. If you signed up via OAuth, simply use the same provider to sign in. # Workspace Source: https://docs.autype.com/getting-started/editor/workspace Your central hub — create documents with AI, manage projects, switch organizations, and navigate your documents. The workspace is the first screen you see after signing in. It combines AI-powered document creation with project and document management. Workspace overview *** ## AI document generation At the top of the workspace, you'll find the **AI input field** — describe the document you want to create and Autype generates it for you. AI document generation input ### How to generate a document 1. **Select a project** — choose the target project from the folder dropdown (bottom-left of the input) 2. **Describe your document** — type a prompt like *"Create a business proposal with executive summary, problem statement, solution, and pricing"* 3. **Choose a writing style** — select from Professional, Academic, Casual, or Technical 4. **(Optional) Attach files** — attach up to 5 source files (PDF, DOCX, Excel, CSV, Markdown, text, JSON, or images) as reference material 5. **Choose a document style** — optionally select a reusable workspace or built-in style; otherwise the agent selects or creates a suitable style 6. **Reference an existing document** — type `/` in the prompt and choose a document with the keyboard or mouse 7. **Click the send button** — the agent may ask focused questions before it creates the document; open the result when generation completes Successful AI document generations use the monthly document allowance of your plan. Automation credits are used only for Developer API and bulk jobs. See [Pricing](/getting-started/pricing). ### Quick prompts Below the input field, four **prompt cards** offer ready-made starting points: * **Business Proposal** — executive summary, problem statement, solution, pricing * **Technical Documentation** — API overview, authentication, endpoints, examples * **Project Report** — introduction, methodology, findings, conclusion * **Project Plan** — timeline, milestones, risks, resources Click any card to fill the input with the prompt text, then customize it before generating. ### Writing styles | Style | Description | | ---------------- | ----------------------------------- | | **Professional** | Formal, business-appropriate tone | | **Academic** | Scholarly, research-oriented style | | **Casual** | Friendly, conversational tone | | **Technical** | Precise, detailed technical writing | | **Marketing** | Persuasive, benefit-focused copy | *** ## Organization switcher If you belong to multiple organizations, use the **organization switcher** at the top of the workspace to switch between them. Organization switcher dropdown Each organization has its own projects, documents, settings, and subscription. Your role (Owner, Admin, Member) is displayed next to each organization name. *** ## Projects & documents Autype organizes content in a two-level hierarchy: **Projects** contain **Documents**. ### Projects view When no project is selected, the workspace shows your projects in a compact list by default. **Last modified** reflects the newest document change inside each project, not only the project record itself. Projects in grid view Each project row or card shows: * **Project name** * **Last modified** date * **Lock icon** for private projects ### Creating a project Click the **"+ New Project"** card to create a new project. Create project dialog | Option | Description | | --------------- | ------------------------------------------------------------- | | **Name** | Project name (required) | | **Description** | Optional description | | **Visibility** | `Public` (visible to all org members) or `Private` (only you) | ### Project actions Open the **⋯** menu for a project to: * **Rename** the project * **Delete** the project (and all its documents) ### Documents view Click a project to see its documents. A **"← Back to Projects"** button appears at the top. Documents inside a project ### Creating a document Inside a project, click **"+ New Document"** to create a blank document. Create new document dialog You can also: * **Import** an existing `.aud` file (Autype's native format) * **Import** a PDF, DOCX, or ODT file. DOCX uses the validated editable roundtrip importer; any unavoidable normalizations are reported after import. ### Document actions Hover over a document card and click the **⋯** menu to: * **Rename** the document * **Duplicate** the document * **Download** the `.aud` file * **Delete** the document *** ## Tabs: Documents & Templates The workspace has two tabs: | Tab | Content | | ---------------- | --------------------------- | | **My Documents** | Your projects and documents | | **Templates** | Reusable document templates | ### Templates Templates are public starting points that anyone can browse. The template grid uses cached first-page previews so large catalogs remain fast to scan. Open **Details** to inspect the complete rendered PDF, page count, category, and template information. **Use template** copies the template into a project as a normal document that you can edit independently. Template owners can upload or update templates. Autype renders the full PDF and regenerates the cached preview when the template source changes; existing document copies are unaffected. *** ## Search, sort & view modes ### Search / filter Use the **search field** in the controls bar to find documents across projects. When the query is empty, the projects list is shown. Search and filters are applied server-side before pagination, so matches are not limited to the currently loaded page. Inside a project, the same control searches that project's documents. ### Sort Click the **sort dropdown** to order items by: * **Last Modified** (default) * **Name** * **Date Created** Click the same sort option again to toggle between ascending and descending order. ### View modes Toggle between two view modes using the icons in the controls bar: | Mode | Description | | -------- | ---------------------------------------------------------------------- | | **Grid** | Card-based layout with visual previews | | **List** | Compact table layout with columns for name, date, and author (default) | Documents in list view Projects, documents, and templates are loaded in server-side pages. Moving to another page does not change the active search, category filter, or sort order. *** ## Sidebar & navigation The workspace sidebar (visible on desktop) provides quick access to: * **Workspace** — return to the main workspace * **Settings** — open the settings modal * **Theme toggle** — switch between light and dark mode * **User menu** — profile, sign out # Export readiness and PDF profiles Source: https://docs.autype.com/getting-started/guides/export-readiness Check document semantics and export tagged, archival, or accessible PDF profiles. Autype includes a source-level **Export Readiness** check for documents created in the editor, through the Developer API, and through MCP. The check currently covers semantic source risks such as: * document title, author, and BCP 47 language metadata * alternative text or descriptive captions for images * heading hierarchy and skipped heading levels * visible, meaningful table headers * configured fonts that may not be portable to every renderer * footnote and footer combinations that may collide after pagination * circular charts whose dimensions could distort the result * repeated inline styling that should be moved into a reusable style The reported score is a **semantic source score**, not a visual approval of the rendered document. Even a score of 100 still requires inspection of the actual PDF, DOCX, or ODT output. Check pagination, overflow, collisions, dynamic fields, fonts, charts, headers, and footers separately for every target format. ## Check a document in the editor Open **Export** and select **Check export readiness**. The report shows the semantic source score, status, errors, warnings, and the document elements that were inspected. Many metadata, portability, and layout findings are advisory; actual structural errors can still block export. Edit the name and export metadata under **Editor options → Document settings**; the same dialog can save and run the readiness check. ## Check Extended Markdown through the API Use `POST /api/v1/dev/render/readiness/markdown` with the same body accepted by Markdown rendering: ```json theme={null} { "content": "# Quarterly report\n\nReport content.", "document": { "type": "pdf", "title": "Quarterly report", "author": "Acme GmbH", "language": "de-DE" } } ``` The equivalent advanced JSON endpoint is `POST /api/v1/dev/render/readiness`. ## Check through MCP Use the Markdown-first `check_export_readiness` tool before `render_document`. It performs the semantic source check without rendering and without consuming credits. Its response identifies the scope as `semantic_source`, labels the score as `semantic_source_score`, and sets `requiresRenderInspection` to `true` so clients do not mistake source validation for visual QA. ## Choose a PDF profile In the editor, open **Export → Export PDF** and choose the profile that matches the destination: | Profile | Use it for | Form fields | | ---------------- | ----------------------------------------------------------- | ----------- | | **Standard PDF** | Sharing, printing, and forms that should remain interactive | Interactive | | **PDF/A-2b** | Recommended archival output for most workflows | Flattened | | **PDF/A-1b** | Conservative compatibility with older archives | Flattened | | **PDF/A-3b** | Archival workflows that may embed source files | Flattened | | **PDF/UA-1** | Accessible, tagged output based on the document structure | Flattened | Compliance profiles flatten interactive form fields before export. This prevents a later AcroForm post-processing step from invalidating the profile metadata or tag structure. Use **Standard PDF** when recipients must complete the PDF interactively. The Developer API accepts `pdfProfile` on PDF render requests: ```json theme={null} { "content": "# Accessible report\n\nReport content.", "document": { "type": "pdf", "title": "Accessible report", "author": "Acme GmbH", "language": "en-US" }, "pdfProfile": "pdfua-1" } ``` Supported values are `standard`, `pdfa-1b`, `pdfa-2b`, `pdfa-3b`, and `pdfua-1`. MCP exposes the same choice as `pdf_profile` on `render_document` and `render_json`. ## Conformance scope Autype verifies the requested profile marker and tagged-PDF flag after rendering. This is a technical safeguard, not an independent legal certification or a replacement for a specialized conformance validator in regulated workflows. PDF/A-1b, PDF/A-2b, PDF/A-3b, PDF/UA-1, and tagged standard PDF are available without an external service. Their practical quality still depends on correct metadata, heading order, image descriptions, table headers, and reading order in the source document. Always inspect the rendered output in its target format; successful source validation cannot detect every pagination, font-substitution, or geometry issue. Cryptographic PAdES signing is not generated by these profiles. It requires a certificate, private-key handling, and usually a qualified trust-service integration. Autype signature fields remain available as form controls, but they are not a PAdES signature by themselves. # Guides Source: https://docs.autype.com/getting-started/guides/overview Step-by-step guides for real-world workflows — from your first document to bulk generation at scale. Guides combine the visual editor, Extended Markdown, reusable resources, and exports into complete workflows. ## Getting started Create your first project, write a document, and export it as PDF — in under 5 minutes. Start from a public template, customize the copied document, and use variables and records for repeatable output. Generate read-only translations, detect outdated variants, and export them without forking the source document. Check metadata and structure, then choose the appropriate PDF output profile. ## Use-case walkthroughs Build a proposal template with corporate styling, client variables, and one-click PDF export. Perfect for consultants and agencies. Set up citations with BibTeX import, automatic bibliography, cross-references, and all required indices (TOC, list of figures, list of tables). Prepare a template, upload a CSV with recipient data, and generate up to 100 personalized documents in one job. Create a style preset with your brand fonts, colors, headers, and footers. Share it across your organization so every document looks consistent. ## Automation & integration Create an API key, send your first render request, and download the result. A minimal end-to-end example. Trigger document generation from no-code platforms. Includes ready-to-use workflow examples. # Autype Documentation Source: https://docs.autype.com/getting-started/index Create structured documents visually or with Extended Markdown, reuse styles and content, export to professional formats, and automate the workflow through API and MCP. ## Stop fighting your document tools Autype combines a visual block editor with **Extended Markdown**, reusable organization resources, professional exports, and automation. Write visually, switch to Markdown when useful, and keep the complete structured JSON model available for advanced clients and conversions. Write in the visual editor or switch to Extended Markdown. Both modes edit the same structured document. Generate complete documents, attach source files, edit selections, and use document-aware AI without exposing the full JSON schema to every prompt. Use Markdown-first API and MCP workflows, records, reusable blocks, styles, bulk generation, and the full JSON model when needed. ## Why Autype? | | Word / Google Docs | LaTeX | **Autype** | | ------------------------------ | ------------------ | ----------- | ----------------------------------------------- | | **Easy to use** | Yes | No | Yes | | **Consistent styling** | Hard to maintain | Yes | Yes, by design | | **Cross-references** | Break silently | Yes | Yes, with real-time validation | | **API & automation** | No | No | Full REST API + bulk jobs | | **Bulk document generation** | No | No | Up to 100 documents per job | | **LLM / AI integration** | Limited | No | Agentic generation + Markdown-first API/MCP | | **Real-time collaboration** | Limited | No | Opt-in per document, with live cursors | | **Version history & rollback** | Limited | No | Auto + named versions, diff, one-click rollback | | **Markdown syntax** | No | No | Yes, with extensions | | **EU hosting & privacy** | Varies | Self-hosted | Yes, GDPR-compliant | ## Security and privacy All data is stored and processed on secured servers within the European Union. Fully GDPR-compliant. Encrypted data at rest and in transit. Role-based access control. API keys scoped to your organization. Audit logs for compliance. ## Get started Understand the core ideas and who Autype is for. Editor, citations, charts, variables, styling, and export capabilities. Learn how to use the Autype document editor. Full syntax reference for Autype's extended Markdown. ## Automate and integrate Complete document generation, bulk jobs, template variables, and no-code integrations. REST API for rendering, bulk export, image management, and project access. # Pricing and usage Source: https://docs.autype.com/getting-started/pricing Autype separates editor and AI allowances from permanent automation credits for the Developer API and bulk generation. Autype separates interactive product usage from automation usage: * **AI allowances** cover AI document generation, assistant tasks, translations, and AI images. They reset monthly and depend on the subscription plan. * **Automation credits** are used only for Developer API operations and bulk generation. Purchased top-ups never expire. ## Plans Headless document automation without the online editor. - Read existing resources and results - Activate API, MCP, VS Code, and runs with the first permanent credit top-up - No monthly subscription required Professional document editing with small AI allowances. - Unlimited projects and documents - All import and export formats - 1 AI document and 10 assistant tasks/month - 2 translations and 5 AI images/month AI-assisted document work and automation for professionals. - Everything in Editor - 10 AI documents and 100 assistant tasks/month - 20 translations and 30 AI images/month - 6,000 automation credits/month - Developer API and bulk generation Shared document workflows for teams of five or more. - Everything in Pro - Real-time collaboration and team management - AI allowances and automation credits scale per seat - 5-seat minimum Annual billing is available for Editor, Pro, and Team: | Plan | Monthly | Yearly | | ---------- | --------------- | --------------- | | **Editor** | \$9.90/month | \$69/year | | **Pro** | \$29.90/month | \$219/year | | **Team** | \$39/month/seat | \$279/year/seat | EUR checkout is also available. Enterprise plans add custom governance, SLA, and optional on-premises deployment. [Contact sales](mailto:service@centerbit.co) for details. ## AI allowances Interactive AI is measured by successful tasks rather than automation credits. | Allowance per month | Engine | Editor | Pro | Team (per seat) | | ------------------- | ------ | ------ | --- | --------------- | | **AI documents** | 0 | 1 | 10 | 10 | | **Assistant tasks** | 0 | 10 | 100 | 100 | | **Translations** | 0 | 2 | 20 | 20 | | **AI images** | 0 | 5 | 30 | 30 | A first-time subscriber can start a **14-day Pro trial** with a payment method. The trial can only be redeemed once and includes 2 AI documents, 15 assistant tasks, 2 translations, 5 AI images, and **500 one-time automation credits**. Developer API, MCP, VS Code, and bulk generation are available during the trial, so the complete Pro workflow can be evaluated before the first charge. ## Automation credits Automation credits apply to successful Developer API and bulk-generation operations. Pro includes 6,000 credits per month; Team includes 6,000 pooled credits per licensed seat per month. Engine is activated by its first successful top-up; Editor can add the same headless automation capabilities with a top-up. | Permanent top-up | Price | | ------------------ | -------------- | | **2,500 credits** | **\$10 / €10** | | **7,500 credits** | **\$25 / €25** | | **25,000 credits** | **\$75 / €75** | Purchased credits never expire and remain on the organization after plan changes or cancellation. Top-ups are unavailable during the Pro trial. ### Automation operation costs | Operation | Credit cost | | --------------------------------------------------------------------------------- | --------------: | | Upload, download, status, read, patch, records, blocks, validation without render | Free | | Single render | 1 per document | | Bulk render | 1 per document | | Standard PDF tools and format conversions | 1 per operation | | Lens OCR to plain Markdown | 2 per page | | Lens classification | 6 per request | | Lens filename generation | 6 per request | | Lens structured field extraction | 14 per page | | Lens recovery to Extended Markdown or document JSON | 18 per page | ### PDF limits Tool uploads are limited to **50 MB per file**. Engine supports PDFs up to 20 pages. Editor, Pro, the Pro trial, and Team support PDFs up to **150 pages**. Enterprise page limits are custom or unlimited. ## Plan comparison | | Engine | Editor | Pro | Team | Enterprise | | --------------------------- | ----------------------------------------------- | ----------- | --------- | --------- | ---------- | | **Online editor** | — | Included | Included | Included | Included | | **Projects and documents** | Read-only until activated; then API/MCP managed | Unlimited | Unlimited | Unlimited | Custom | | **PDF export** | With top-up | Included | Included | Included | Included | | **DOCX and ODT export** | With top-up | Included | Included | Included | Included | | **DOCX/PDF import** | With top-up | Included | Included | Included | Included | | **AI allowances** | — | Small | Extended | Per seat | Custom | | **Developer API** | With top-up | With top-up | Included | Included | Included | | **Bulk generation** | With top-up | With top-up | Included | Included | Included | | **Real-time collaboration** | — | — | — | Included | Included | | **Seats** | 1 | 1 | 1 | 5 minimum | Custom | ## Subscription changes * Upgrades and a switch from monthly to yearly billing can be started from workspace billing settings. * A downgrade or switch from yearly to monthly becomes available after the paid subscription period ends. Schedule cancellation in the Stripe billing portal first. * Purchased automation credits remain available across upgrades, downgrades, and cancellations. * Invoices and payment methods are managed in the Stripe customer portal. # Quickstart Source: https://docs.autype.com/getting-started/quickstart Create your first Autype document in under 5 minutes — from sign-up to PDF export. Get from zero to your first exported PDF in under 5 minutes. ## 1. Create your account Go to [app.autype.com](https://app.autype.com) and sign up with your email or use Google / GitHub OAuth. After verifying your email, you'll land in your **Workspace**. Sign up for Autype Your workspace after signing up ## 2. Create a project Click **New Project** in your workspace. Give it a name — for example, "My First Document". Projects are folders for related documents. Variables and version history stay with each document, so templates and customer outputs remain independently maintainable. Create a new project ## 3. Create a document Inside your project, click **New Document**. You'll be taken directly into the editor. Create a new document ## 4. Write your content Start typing in the visual **Write** editor. Switch to **MD** whenever you want to edit the same content as Extended Markdown. Here's a simple example to get you started: ```markdown theme={null} # My First Report ## Introduction This is my first document in Autype. It supports **bold**, *italic*, and much more. ## Key Findings - Finding one with important details - Finding two with supporting data - Finding three with conclusions | Metric | Value | Change | |--------|-------|--------| | Revenue | €150,000 | +12% | | Customers | 1,200 | +8% | | Satisfaction | 94% | +3% | ## Conclusion Autype makes document creation simple and consistent. ``` You'll see your content rendered in real-time as you type. The Autype editor ## 5. Export as PDF Click the **Export** button in the top toolbar and select **PDF**. Your document will be rendered and downloaded in seconds. Export your document You can also export as DOCX, ODT, PNG, or JPEG. Multi-page image exports are delivered as a ZIP archive. ## What's next? Citations, charts, variables, automatic indices, and more. Full syntax reference for Autype's extended Markdown. Invite collaborators, assign roles, and work together in real-time. Generate documents programmatically and integrate with your workflows. # Abbreviations Source: https://docs.autype.com/markup-reference/abbreviations Define abbreviations inline with ~ABK~ syntax and generate an automatic list of abbreviations. Abbreviations let you mark short forms in your text. They are collected automatically and can be rendered as a List of Abbreviations. ## Syntax Wrap an abbreviation in single tildes: ```markdown theme={null} The ~WHO~ recommends regular exercise. The ~EU~ has strict data protection laws (~GDPR~). ``` ### Rules * Must start with a letter (including Unicode letters like ä, ö, ü, é, etc.) * Can contain letters and numbers after the first character * Case-sensitive: `~WHO~` and `~who~` are different abbreviations * Examples: `~WHO~`, `~GDPR~`, `~API~`, `~REST~`, `~KfW~`, `~GmbH~` Do not confuse with strikethrough (`~~text~~` — double tildes). Abbreviations use **single** tildes. ## Abbreviations inside formatted text Abbreviations work inside bold, italic, and other formatting marks: ```markdown theme={null} **The ~WHO~ recommends this approach.** *According to the ~EU~ directive...* ``` ## List of Abbreviations Generate an automatic list of all abbreviations used in the document: ```markdown theme={null} ::listOfAbbreviations{title="List of Abbreviations"} ``` **Short alias:** ```markdown theme={null} ::loa{title="Abbreviations"} ``` ### Attributes | Attribute | Values | Description | | ----------- | -------------------------- | ------------------------------ | | `title` | String | Title displayed above the list | | `sortOrder` | `alphabetical`, `document` | Sort order of abbreviations | * **`alphabetical`** — sort abbreviations A–Z (default) * **`document`** — list abbreviations in the order they first appear in the document ### Example ```markdown theme={null} ::loa{title="Abkürzungsverzeichnis" sortOrder=alphabetical} ``` The abbreviation definitions (what each abbreviation stands for) are managed in your document settings, not in the Markdown source. The `~ABK~` syntax only marks where abbreviations are used. # Block Quotes Source: https://docs.autype.com/markup-reference/blockquotes Styled block quotes with optional properties for borders, backgrounds, alignment, and typography. ## Basic block quote Use `>` at the start of each line: ```markdown theme={null} > This is a block quote. > It can span multiple lines. ``` Consecutive `>` lines are merged into a single block quote. A blank line (or a line without `>`) ends the block quote. ## Multi-paragraph block quotes Block quotes can contain multiple paragraphs — separate them with a blank `>` line: ```markdown theme={null} > First paragraph of the quote. > > Second paragraph, still inside the same block quote. ``` ## Inline formatting Block quote content supports all [inline formatting](/markup-reference/inline-formatting): ```markdown theme={null} > This quote has **bold**, *italic*, and ++underlined++ text. > It can also contain [links](https://example.com) and `inline code`. ``` ## Styled block quotes Add properties on the first line using `{ key=value }` syntax to customize the block quote's appearance: ```markdown theme={null} > {backgroundColor="#E8F5E9" borderColor="#4CAF50"} This is a styled block quote > with a green background and green left border. ``` ### Available properties | Property | Type | Default | Description | | ----------------- | ------------------------------------ | --------- | ---------------------------------------------- | | `fontFamily` | string | inherited | Font family (e.g., `"Georgia"`) | | `fontSize` | number | inherited | Font size in pt (6–72) | | `fontWeight` | `normal`, `bold` | `normal` | Font weight | | `fontStyle` | `normal`, `italic` | `normal` | Font style | | `color` | hex color | inherited | Text color (e.g., `"#333333"`) | | `align` | `left`, `center`, `right`, `justify` | `left` | Text alignment | | `backgroundColor` | hex color | — | Background color (supports alpha: `#RRGGBBAA`) | | `borderWidth` | number | `3` | Border width in px (0–20) | | `borderColor` | hex color | `#CCCCCC` | Border color | | `borderTop` | boolean | `false` | Show top border | | `borderBottom` | boolean | `false` | Show bottom border | | `borderLeft` | boolean | `true` | Show left border | | `borderRight` | boolean | `false` | Show right border | | `indentLeft` | number | `10` | Left indent in mm (0–100) | | `indentRight` | number | `0` | Right indent in mm (0–100) | | `spacingBefore` | number | — | Space before the block quote in pt | | `spacingAfter` | number | — | Space after the block quote in pt | Properties are only applied from the **first line** of the block quote. All subsequent `>` lines inherit the same styling. ## Examples ### Callout-style box ```markdown theme={null} > {backgroundColor="#FFF3E0" borderColor="#FF9800" borderWidth=3} **Note:** Please review the attached > documents before the meeting on Friday. ``` ### Centered italic quote ```markdown theme={null} > {align="center" fontStyle="italic" color="#555555"} "The best way to predict the future is to invent it." ``` ### Box with all borders ```markdown theme={null} > {borderTop=true borderBottom=true borderLeft=true borderRight=true borderColor="#1976D2" backgroundColor="#E3F2FD"} This block quote > has borders on all four sides, creating a box-like appearance. ``` ### Custom indent ```markdown theme={null} > {indentLeft=20 indentRight=20} This block quote is indented further > from both sides, creating a narrower text area. ``` ## Defaults Configure default styles for block quotes via `defaults.styles.blockquote` in your document configuration: ```json theme={null} { "defaults": { "styles": { "blockquote": { "fontFamily": "Georgia", "fontStyle": "italic", "color": "#444444", "backgroundColor": "#F5F5F5", "borderColor": "#999999", "borderWidth": 3, "indentLeft": 15 } } } } ``` Block quote defaults are applied to all block quotes in the document. Properties set directly on a block quote override the defaults. # Charts Source: https://docs.autype.com/markup-reference/charts Create bar, line, pie, doughnut, radar, polar area, scatter, and bubble charts with the chart directive. Autype supports 8 chart types using the `:::chart` directive. Charts are rendered as images in the exported document. ## Basic syntax ```markdown theme={null} :::chart{type="bar" title="Monthly Sales"} labels: Jan, Feb, Mar, Apr, May, Jun dataset: Sales | 120, 150, 180, 140, 200, 220 ::: ``` Every chart needs: * A `type` attribute * `labels:` line (except scatter/bubble charts) * One or more `dataset:` lines ## Chart types ### Bar chart ```markdown theme={null} :::chart{type="bar" title="Monthly Sales"} labels: Jan, Feb, Mar, Apr, May, Jun dataset: Sales | 120, 150, 180, 140, 200, 220 ::: ``` ### Line chart ```markdown theme={null} :::chart{type="line" title="Temperature Trend"} labels: Mon, Tue, Wed, Thu, Fri, Sat, Sun dataset: Temperature | 22, 24, 23, 25, 27, 26, 24 ::: ``` ### Pie chart ```markdown theme={null} :::chart{type="pie" title="Market Share"} labels: Product A, Product B, Product C, Others dataset: Share | 35, 25, 20, 20 ::: ``` Pie, doughnut, and polar area charts automatically assign colors from a built-in palette if no colors are specified. ### Doughnut chart ```markdown theme={null} :::chart{type="doughnut" title="Budget Distribution"} labels: Development, Marketing, Operations, Support dataset: Budget | 40, 25, 20, 15 ::: ``` ### Radar chart ```markdown theme={null} :::chart{type="radar" title="Skills Assessment"} labels: JavaScript, Python, SQL, Design, Communication dataset: Alice | 90, 70, 85, 60, 80 | #3b82f6 dataset: Bob | 75, 85, 70, 90, 65 | #ef4444 ::: ``` ### Polar area chart ```markdown theme={null} :::chart{type="polarArea" title="Activity Distribution"} labels: Running, Cycling, Swimming, Hiking dataset: Hours | 12, 8, 5, 15 ::: ``` *** ## Multiple datasets Add multiple `dataset:` lines to compare data series: ```markdown theme={null} :::chart{type="bar" title="Quarterly Comparison"} labels: Q1, Q2, Q3, Q4 dataset: 2023 | 100, 120, 140, 160 | #3b82f6 dataset: 2024 | 110, 135, 155, 180 | #22c55e ::: ``` ## Dataset syntax ``` dataset: Label | value1, value2, value3 | #color ``` | Part | Required | Description | | ------ | -------- | ---------------------------- | | Label | Optional | Dataset name shown in legend | | Values | Yes | Comma-separated numbers | | Color | Optional | Hex color (e.g., `#3b82f6`) | ### Multiple colors per dataset For pie/doughnut charts, provide comma-separated colors: ```markdown theme={null} :::chart{type="pie" title="Revenue Split"} labels: Product, Service, Consulting dataset: Revenue | 50, 30, 20 | #3b82f6, #22c55e, #f59e0b ::: ``` ### Simple data syntax For single-dataset charts, use `data:` instead of `dataset:`: ```markdown theme={null} :::chart{type="bar" title="Simple Chart"} labels: A, B, C, D data: 10, 20, 30, 40 ::: ``` *** ## Scatter charts Scatter charts use coordinate pairs instead of simple values. Labels are not needed. ### Using dataset syntax ```markdown theme={null} :::chart{type="scatter" title="Correlation Analysis"} dataset: Group A | (10,20), (15,25), (20,30), (25,28) | #3b82f6 dataset: Group B | (12,15), (18,22), (22,18), (28,25) | #ef4444 ::: ``` ### Using series + point syntax An alternative syntax for scatter charts: ```markdown theme={null} :::chart{type="scatter" title="Data Points"} series: Measurements | #3b82f6 point: 10, 20 point: 15, 25 point: 20, 30 series: Predictions | #ef4444 point: 12, 22 point: 18, 28 ::: ``` `series:` starts a new dataset with a label and optional color. `point:` adds an x,y coordinate to the current series. *** ## Bubble charts Bubble charts extend scatter charts with a third value for the bubble radius: ```markdown theme={null} :::chart{type="bubble" title="Market Analysis"} dataset: Products | (10,20,15), (25,30,25), (15,15,10) | #3b82f6 ::: ``` The format is `(x, y, radius)`. Using series + point syntax: ```markdown theme={null} :::chart{type="bubble" title="Portfolio"} series: Stocks | #3b82f6 point: 10, 20, 15 point: 25, 30, 25 series: Bonds | #22c55e point: 5, 10, 8 point: 15, 12, 12 ::: ``` *** ## Figure captions Add a `caption` attribute for auto-numbering in the List of Figures: ```markdown theme={null} :::chart{type="bar" caption="Quarterly Revenue 2024"} labels: Q1, Q2, Q3, Q4 dataset: Revenue | 150000, 180000, 220000, 195000 | #3b82f6 ::: ``` This renders with: *Figure 1: Quarterly Revenue 2024* The caption prefix (e.g., `"Figure"`, `"Abb."`) and styling (font, alignment, color) are configured in your document's [style settings](/getting-started/editor/sidebar-styles#figure-captions). Charts share the same figure caption style as images. ### Anchors for cross-references Add an `anchor` attribute to reference the chart from elsewhere: ```markdown theme={null} :::chart{type="bar" anchor="chart-sales" caption="Sales 2024"} labels: Q1, Q2, Q3, Q4 dataset: Sales | 100, 150, 200, 175 | #3b82f6 ::: ``` Then reference it: ```markdown theme={null} As shown in [Figure {num}](#chart-sales), sales grew steadily. ``` *** ## Attribute reference | Attribute | Values | Description | | ------------ | --------------------------------------------------------------------------- | --------------------------------- | | `type` | `bar`, `line`, `pie`, `doughnut`, `radar`, `polarArea`, `scatter`, `bubble` | Chart type (required) | | `title` | String | Title displayed on the chart | | `caption` | String | Figure caption for auto-numbering | | `anchor` | String | Anchor ID for cross-references | | `width` | Number (pixels) | Chart width | | `height` | Number (pixels) | Chart height | | `align` | `left`, `center`, `right` | Horizontal alignment | | `showLegend` | `true`, `false` | Show/hide the legend | | `showGrid` | `true`, `false` | Show/hide grid lines | ## Default color palette When no colors are specified, charts use this built-in palette: | Index | Color | Hex | | ----- | ------ | --------- | | 1 | Blue | `#3b82f6` | | 2 | Red | `#ef4444` | | 3 | Green | `#22c55e` | | 4 | Amber | `#f59e0b` | | 5 | Violet | `#8b5cf6` | | 6 | Cyan | `#06b6d4` | | 7 | Pink | `#ec4899` | | 8 | Orange | `#f97316` | | 9 | Teal | `#14b8a6` | | 10 | Indigo | `#6366f1` | # Citations & Bibliography Source: https://docs.autype.com/markup-reference/citations Inline citations with page, chapter, and volume locators, author suppression, narrative mode, and automatic bibliography generation. Autype supports academic-style inline citations and automatic bibliography generation. ## Inline citations Use `@[citeKey]` to insert a citation: ```markdown theme={null} This has been shown in previous research @[smith2023]. ``` ### Citations with locators Add page numbers, chapters, sections, or volumes after the cite key: ```markdown theme={null} @[smith2023, p. 42] @[smith2023, pp. 42-45] @[smith2023, ch. 3] @[smith2023, sec. 2.1] @[smith2023, vol. 2] ``` **Supported locator prefixes:** | Prefix | Full form | Description | | ------ | --------- | -------------- | | `p.` | `page` | Single page | | `pp.` | `pages` | Page range | | `ch.` | `chapter` | Chapter number | | `sec.` | `section` | Section number | | `vol.` | `volume` | Volume number | ### Combining locators Multiple locators can be combined with commas: ```markdown theme={null} @[smith2023, vol. 2, pp. 42-45] @[smith2023, ch. 3, p. 15] ``` ### Adding notes Add a custom note to a citation: ```markdown theme={null} @[smith2023, p. 42, note="emphasis added"] @[jones2022, note="translated by the author"] ``` *** ## Author control ### Suppress author Prefix the cite key with `-` to suppress the author name (useful when the author is already mentioned in the text): ```markdown theme={null} Smith @[-smith2023, p. 42] showed that... ``` This renders as: Smith (2023, p. 42) instead of Smith (Smith, 2023, p. 42). ### Author only (narrative mode) Append `!` to the cite key to show only the author name: ```markdown theme={null} @[smith2023!] showed that the effect is significant @[smith2023, p. 42]. ``` This renders as: Smith showed that the effect is significant (Smith, 2023, p. 42). *** ## Citations inside formatted text Citations work inside bold, italic, and other formatting marks: ```markdown theme={null} **This is important @[smith2023, p. 42].** *As noted by @[jones2022!], the results are clear.* ``` *** ## Bibliography Generate an automatic bibliography from all citations in the document: ```markdown theme={null} ::bibliography{title="References"} ``` **Short aliases:** ```markdown theme={null} ::bib{title="References"} ::references{title="Literaturverzeichnis"} ``` The bibliography collects all cited sources and formats them according to the configured citation style. ### Attribute reference | Attribute | Values | Description | | --------- | ------ | -------------------------------------- | | `title` | String | Title displayed above the bibliography | The bibliography only includes sources that are actually cited in the document. Uncited sources from your library are not included. *** ## Full example ```markdown theme={null} # Introduction The relationship between X and Y has been studied extensively @[smith2023, pp. 1-15]. @[jones2022!] provided a comprehensive overview of the field, while @[-doe2021, ch. 3] focused specifically on the methodology. As **Smith @[-smith2023, p. 42]** noted, the effect size is significant. This aligns with earlier findings @[brown2020, vol. 2, p. 88]. # References ::bibliography{title="References"} ``` # Code Blocks Source: https://docs.autype.com/markup-reference/code-blocks Syntax-highlighted code blocks with optional render-as-image, custom background colors, alignment, and spacing. ## Standard code blocks Use triple backticks with an optional language identifier: ````markdown theme={null} ```javascript const greeting = "Hello, World!"; console.log(greeting); ``` ```` Without a language: ````markdown theme={null} ``` Plain code block without syntax highlighting ``` ```` ## Extended attributes Append `{attrs}` after the language identifier to customize rendering: ````markdown theme={null} ```python{renderAsImage=true width=600 align=center} def fibonacci(n): if n <= 1: return n return fibonacci(n-1) + fibonacci(n-2) print([fibonacci(i) for i in range(10)]) ``` ```` ### Render as image Convert code blocks to PNG images in the exported document. This preserves syntax highlighting exactly as displayed: ````markdown theme={null} ```typescript{renderAsImage=true width=500} interface Config { apiUrl: string; timeout: number; } ``` ```` ### Custom background color ````markdown theme={null} ```typescript{backgroundColor="#1e293b"} interface Config { apiUrl: string; timeout: number; } ``` ```` ### Alignment and spacing ````markdown theme={null} ```sql{renderAsImage=true width=500 align=center spacingBefore=20 spacingAfter=20} SELECT * FROM users WHERE status = 'active' ORDER BY created_at DESC; ``` ```` ## Captions and anchors Add `caption` and `anchor` attributes to include the code block in the [List of Code Listings](/markup-reference/indices#list-of-code-listings) and enable [cross-references](/markup-reference/references): ````markdown theme={null} ```typescript{caption="Configuration interface" anchor="code-config"} interface Config { apiUrl: string; timeout: number; } ``` ```` This renders with: *Listing 1: Configuration interface* Reference it elsewhere: ```markdown theme={null} See [Listing {num}](#code-config) for the configuration interface. ``` The caption prefix (e.g., `"Listing"`, `"Quellcode"`) and styling are configured in your document's [style settings](/getting-started/editor/sidebar-styles#code-captions). ## Diagrams Code blocks with a supported diagram language (e.g., `mermaid`, `plantuml`, `graphviz`) are automatically rendered as images in the exported document. See [Diagrams](/markup-reference/diagrams) for the full list of supported diagram languages, examples, and options. ````markdown theme={null} ```mermaid{caption="System Architecture" anchor="fig-arch" align="center"} graph LR A[Client] --> B[API] B --> C[Database] ``` ```` Diagram code blocks with a `caption` are numbered as **figures** and appear in the List of Figures. Set `renderAsImage=false` to treat them as regular code listings instead — see [Diagrams — renderAsImage](/markup-reference/diagrams#rendering-as-code-renderasimagefalse). ## Attribute reference | Attribute | Values | Description | | ----------------- | ----------------------------- | ---------------------------------------------------------------------------------- | | `renderAsImage` | `true`, `false` | Render code as a PNG image in the exported document | | `backgroundColor` | CSS color (e.g., `"#1e1e1e"`) | Background color of the code block | | `width` | Number (pixels, 10–2000) | Width of the rendered image | | `align` | `left`, `center`, `right` | Horizontal alignment | | `caption` | String | Caption for auto-numbering (List of Code Listings or List of Figures for diagrams) | | `anchor` | String | Anchor ID for cross-references | | `spacingBefore` | Number (pt) | Spacing before the code block | | `spacingAfter` | Number (pt) | Spacing after the code block | The `renderAsImage` option is particularly useful for PDF/DOCX exports where you want pixel-perfect syntax highlighting. Without it, code blocks are rendered as styled text. # Diagrams Source: https://docs.autype.com/markup-reference/diagrams Render diagrams from text using Mermaid, PlantUML, GraphViz, and 15+ other diagram languages. Autype renders diagrams directly from text-based diagram languages. Write your diagram code in a fenced code block with the diagram language as the language identifier — it will be automatically rendered as an image in the exported document. Diagrams are only rendered as images when **Render as Image** is enabled. You can control this globally via the [Styles panel → Code Blocks](/getting-started/editor/sidebar-styles#code-blocks) setting, or override it per block with the `renderAsImage` attribute directly on the code block. ## Basic syntax Use a fenced code block with a supported diagram language: ````markdown theme={null} ```mermaid graph TD A[Start] --> B{Decision?} B -->|Yes| C[Action 1] B -->|No| D[Action 2] C --> E[End] D --> E ``` ```` The diagram is automatically rendered as a PNG image in the exported PDF/DOCX document. ## Supported diagram languages | Language | Code identifier | Description | | ---------------------------------------------------------------- | ------------------- | --------------------------------------------------------------------- | | [Mermaid](https://github.com/knsv/mermaid) | `mermaid` | Flowcharts, sequence diagrams, class diagrams, Gantt charts, and more | | [PlantUML](https://github.com/plantuml/plantuml) | `plantuml` | UML diagrams (class, sequence, activity, use case, etc.) | | [GraphViz](https://www.graphviz.org/) | `graphviz` or `dot` | Graph and network visualizations | | [Structurizr](https://github.com/structurizr/dsl) | `structurizr` | C4 architecture diagrams | | [BlockDiag](https://github.com/blockdiag/blockdiag) | `blockdiag` | Simple block diagrams | | [SeqDiag](https://github.com/blockdiag/seqdiag) | `seqdiag` | Sequence diagrams | | [ActDiag](https://github.com/blockdiag/actdiag) | `actdiag` | Activity diagrams with swimlanes | | [NwDiag](https://github.com/blockdiag/nwdiag) | `nwdiag` | Network topology diagrams | | [PacketDiag](https://github.com/blockdiag/nwdiag) | `packetdiag` | Packet/protocol header diagrams | | [C4 with PlantUML](https://github.com/RicardoNiepel/C4-PlantUML) | `c4plantuml` | C4 architecture model using PlantUML syntax | | [DBML](https://github.com/softwaretechnik-berlin/dbml-renderer) | `dbml` | Database markup language for ER diagrams | | [Ditaa](https://ditaa.sourceforge.net) | `ditaa` | ASCII art to diagram conversion | | [ERD](https://github.com/BurntSushi/erd) | `erd` | Entity-relationship diagrams | | [TikZ](https://github.com/pgf-tikz/pgf) | `tikz` | LaTeX-based technical drawings | | [UMlet](https://github.com/umlet/umlet) | `umlet` | UML diagrams | | [Vega](https://github.com/vega/vega) | `vega` | Declarative data visualizations | | [WireViz](https://github.com/formatc1702/WireViz) | `wireviz` | Wiring harness and cable documentation | ## Mermaid examples ### Flowchart ````markdown theme={null} ```mermaid graph TD A[Start] --> B{Decision?} B -->|Yes| C[Action 1] B -->|No| D[Action 2] C --> E[End] D --> E ``` ```` ### Sequence diagram ````markdown theme={null} ```mermaid sequenceDiagram participant Client participant API participant DB Client->>API: POST /render API->>DB: Save job DB-->>API: Job ID API-->>Client: 202 Accepted ``` ```` ### Class diagram ````markdown theme={null} ```mermaid classDiagram class Document { +String title +Section[] sections +render() PDF } class Section { +String type +Element[] content } Document "1" --> "*" Section ``` ```` ## PlantUML example ````markdown theme={null} ```plantuml @startuml start :Create document; :Write content; if (Has variables?) then (yes) :Substitute variables; else (no) endif :Render DOCX; :Convert to PDF; stop @enduml ``` ```` ## GraphViz example ````markdown theme={null} ```graphviz digraph G { rankdir=LR; node [shape=box, style=filled, fillcolor="#e8f4fd"]; Frontend -> API; API -> Database; API -> Redis; Worker -> Redis; Worker -> S3; } ``` ```` *** ## Captions and anchors Add `caption` and `anchor` attributes to include the diagram in the [List of Figures](/markup-reference/indices#list-of-figures) and enable [cross-references](/markup-reference/references): ````markdown theme={null} ```mermaid{caption="System Architecture" anchor="fig-architecture"} graph LR A[Client] --> B[API] B --> C[Database] B --> D[Cache] ``` ```` This renders with: *Figure 1: System Architecture* Reference it elsewhere: ```markdown theme={null} As shown in [Figure {num}](#fig-architecture), the system uses a layered design. ``` ## Alignment Control horizontal alignment with the `align` attribute: ````markdown theme={null} ```mermaid{align="center" caption="Centered Diagram" anchor="fig-centered"} graph LR A --> B --> C ``` ```` *** ## Rendering as code (renderAsImage=false) By default, diagram language code blocks are rendered as images. Set `renderAsImage=false` to display the source code as a regular code block instead: ````markdown theme={null} ```mermaid{renderAsImage=false} graph TD A --> B B --> C ``` ```` This is useful when you want to show the diagram source code to the reader rather than the rendered diagram. When `renderAsImage=false` is set on a diagram code block, the block is treated as a regular code block. If it has a `caption`, it appears in the [List of Code Listings](/markup-reference/indices#list-of-code-listings) instead of the List of Figures. ### Global default You can set the default for all code blocks in your document's style settings: * **defaults → styles → code → renderAsImage**: `true` (default) or `false` The element-level `renderAsImage` attribute always overrides the global default. *** ## Attribute reference | Attribute | Values | Description | | --------------- | ------------------------- | --------------------------------------------------------------------------- | | `renderAsImage` | `true`, `false` | Render as image (default: `true` for diagram languages) or show source code | | `caption` | String | Figure caption for auto-numbering in the List of Figures | | `anchor` | String | Anchor ID for cross-references | | `align` | `left`, `center`, `right` | Horizontal alignment | | `width` | Number (pixels) | Width of the rendered diagram image | | `spacingBefore` | Number (pt) | Spacing before the diagram | | `spacingAfter` | Number (pt) | Spacing after the diagram | Diagrams are rendered server-side during document export. In the live editor preview, diagram code blocks are displayed as syntax-highlighted code. # Form Fields Source: https://docs.autype.com/markup-reference/form-fields Add text, number, date, choice, signature, and initials fields to Autype documents and interactive PDF exports. Form fields are document elements that stay visible in every export and become interactive **AcroForm widgets in PDF exports**. They can use fixed values or read their initial value from a document variable. ## Supported field types | Type | Purpose | Variable type | | ----------- | ---------------------- | -------------------------------- | | `text` | Single-line text | text | | `number` | Numeric value | number | | `multiline` | Multi-line text | text | | `date` | Date input | text | | `checkbox` | One or several choices | text (single) or list (multiple) | | `select` | Dropdown choice | text | | `signature` | Empty signature widget | none | | `initials` | Empty initials widget | none | ## Basic syntax ```markdown theme={null} ::field{name="customerName" type=text label="Customer name" required=true} ::field{name="invoiceTotal" type=number label="Invoice total" value=149.9} ::field{name="dueDate" type=date label="Due date" placeholder="YYYY-MM-DD"} ::field{name="department" type=select label="Department" options="Sales|Finance|Legal"} ::field{name="signature" type=signature label="Signature" required=true signerRole="customer-signer" width=60 height=72} ``` The `name` is a stable field identifier. Labels are optional; an empty label renders only the input control without reserving label spacing. ## Checkboxes and choices A checkbox field contains one or more visible options. Use `selectionMode` to choose whether users may select one or several options. ```markdown theme={null} ::field{name="approval" type=checkbox options="I approve"} ::field{name="interests" type=checkbox options="Product updates|Events|Research" selectionMode=multiple selected="Events|Research"} ::field{name="contactMethod" type=checkbox options="Email|Phone|Post" selectionMode=single selected="Email"} ``` `placeholder` is not used for checkbox labels. Each value in `options` is both the visible label and the submitted option value. ## Variable binding Use `variable` to prefill a field from the document's variables: ```markdown theme={null} ::field{name="customerName" type=text label="Customer" variable="customerName"} ::field{name="interests" type=checkbox options="Events|Research" selectionMode=multiple variable="interests"} ``` The field does not create the variable. Define it in the document's variables first, using a compatible type. A local `value` or `selected` value remains a fixed initial value when no variable is bound. ## Multiline values Use `\n` inside a quoted fixed value. Autype converts it to actual line breaks and escapes it exactly once when converting back to Markdown. ```markdown theme={null} ::field{name="notes" type=multiline label="Notes" value="First line\nSecond line\nThird line" height=80} ``` ## Form fields in tables A form field can be the sole content of a table cell: ```markdown theme={null} :::table{columnWidths="1fr,2fr"} | Label | Value | | --- | --- | | Customer | ::field{name="customer" type=text} | | Department | ::field{name="department" type=select options="Sales,Legal"} | | Approval | ::field{name="approval" type=checkbox options="Approved"} | ::: ``` Inside table cells, separate choice options with commas because `|` is already the Markdown table delimiter. ## Attributes | Attribute | Description | | | ------------------------------- | --------------------------------------------------------------------------------------------- | ----------------------------- | | `name` | Stable identifier; required | | | `type` | One of the supported field types; required | | | `label` | Optional visible label | | | `placeholder` | Hint for an empty non-checkbox field | | | `variable` | Compatible document variable used as the initial value | | | `value` | Fixed string, number, or boolean value | | | `options` | Choice values separated by \` | \` (or commas in table cells) | | `selectionMode` | `single` or `multiple` for checkboxes | | | `selected` | Initially selected checkbox options | | | `required` | Mark the PDF widget as required | | | `readOnly` | Prevent editing of the PDF widget | | | `signerRole` | Process role allowed to fill a `signature` or `initials` field; rejected on other field types | | | `width` | Percentage of available content width (`10`-`100`) | | | `height` | Minimum height in points (`16`-`300`) | | | `spacingBefore`, `spacingAfter` | Local vertical spacing in points | | ## Styling The following attributes override the global `defaults.styles.formField` settings for one field: | Attribute | Values | | --------------------------------------------- | --------------------------------- | | `borderMode` | `outline`, `underline`, `none` | | `borderLineStyle` | `solid`, `dashed`, `dotted` | | `borderWidth` | `0`-`10` pt | | `borderColor`, `backgroundColor`, `textColor` | Hex color | | `fontSize` | `6`-`72` pt | | `inset` | Inner padding (`0`-`50`) | | `borderRadius` | Corner radius (`0`-`30`) | | `showHints` | Show or hide visual editor hints | | `showContainerBorder` | Show or hide the editor container | | `checkboxBorderMode` | Border mode for checkbox controls | | `checkboxShape` | `square` or `circle` | Global vertical spacing is configured through `defaults.spacing.before.formField` and `defaults.spacing.after.formField`. ## Output behavior | Output | Behavior | | ---------------- | --------------------------------------------------------------- | | PDF | Interactive AcroForm widgets with required/read-only flags | | DOCX / ODT | Printable visual representation | | Web preview | Visual preview of fields and current values | | Rich text editor | Editable document blocks with properties in the context toolbar | `signature` and `initials` create PDF form widgets. They do not apply a cryptographic signature, qualified electronic signature, or PAdES seal. A Workspace signature process can fill these widgets with its audited typed-name simple electronic signature when `required=true` and `signerRole` matches the signer role. # Headings & Paragraphs Source: https://docs.autype.com/markup-reference/headings-paragraphs Headings (h1–h6), paragraphs, and the text2 variant — with standard Markdown and extended HTML syntax for full styling control. ## Headings Standard Markdown headings from `h1` to `h6`: ```markdown theme={null} # Heading 1 ## Heading 2 ### Heading 3 #### Heading 4 ##### Heading 5 ###### Heading 6 ``` Headings support inline formatting: ```markdown theme={null} # **Bold** Heading ## *Italic* Heading ### ~~Strikethrough~~ Heading #### **Bold** and *Italic* Combined ``` ### Heading anchors Add an anchor ID to any heading with `{#id}` at the end. This allows cross-referencing from elsewhere in the document: ```markdown theme={null} # Introduction {#intro} ## Methods {#methods} ### Data Analysis {#data-analysis} ``` Anchor IDs must start with a letter and can contain letters, numbers, underscores, and hyphens. See [References & Anchors](/markup-reference/references) for how to link to anchored headings. ### Extended HTML syntax For full styling control, use HTML heading tags with attributes: ```html theme={null}

Centered Heading

Styled Heading

Custom Font Heading

``` **Available attributes:** | Attribute | Values | Description | | --------------------------- | ---------------------------------------------- | ------------------------------------------------------------ | | `align` | `left`, `center`, `right`, `justify` | Text alignment | | `color` | Hex color (e.g., `#ff0000`) | Text color | | `fontSize` | Number (points) | Font size | | `fontFamily` | Font name (e.g., `Georgia`, `Arial`) | Font family | | `fontWeight` | `normal`, `bold` | Font weight | | `fontStyle` | `normal`, `italic` | Font style | | `letterSpacing` | `-5` to `20` | Character spacing in points | | `textTransform` | `none`, `uppercase`, `lowercase`, `capitalize` | Visual case transformation | | `indentLeft`, `indentRight` | `0` to `100` | Left and right indents in points | | `firstLineIndent` | `-50` to `100` | First-line indent in points | | `hangingIndent` | `0` to `100` | Hanging indent in points | | `backgroundColor` | Hex color | Background behind the heading | | `spacing` | `before,after` (e.g., `10,20`) | Spacing before/after in points | | `keepTogether` | Boolean | Keep the heading content together on one page where possible | | `keepWithNext` | Boolean | Keep the heading with the following element | | `pageBreakBefore` | Boolean | Start the heading on a new page | | `widowControl` | Boolean | Avoid isolated first or last lines where supported | *** ## Paragraphs Standard Markdown paragraphs — just write text: ```markdown theme={null} This is a regular paragraph. It can span multiple lines and will be joined together. A blank line starts a new paragraph. ``` Consecutive lines without a blank line between them are merged into a single paragraph. ### Text2 style (secondary paragraph) Use the pipe prefix `| ` to apply the `text2` style — a secondary paragraph style defined in your document defaults (e.g., smaller font, different color): ```markdown theme={null} | This is a text2 paragraph. | Multiple lines can use text2 style. | Each line starts with pipe and space. ``` The `text2` style uses the styling defined in your document's `defaults.styles.text2` configuration. This is useful for subtitles, captions, or secondary information. Lines starting with `|` that also **end** with `|` are parsed as table rows, not text2 paragraphs. ### Extended HTML syntax For full styling control, use HTML paragraph tags: ```html theme={null}

This paragraph is justified.

Styled paragraph text.

Custom styled paragraph.

``` Multi-line HTML paragraphs are also supported: ```html theme={null}

This is a longer paragraph that spans multiple lines in the source.

``` **Available attributes:** | Attribute | Values | Description | | --------------------------- | ---------------------------------------------- | -------------------------------------------------- | | `align` | `left`, `center`, `right`, `justify` | Text alignment | | `color` | Hex color (e.g., `#ff0000`) | Text color | | `fontSize` | Number (points) | Font size | | `fontFamily` | Font name | Font family | | `fontWeight` | `normal`, `bold` | Font weight | | `fontStyle` | `normal`, `italic` | Font style | | `letterSpacing` | `-5` to `20` | Character spacing in points | | `textTransform` | `none`, `uppercase`, `lowercase`, `capitalize` | Visual case transformation | | `indentLeft`, `indentRight` | `0` to `100` | Left and right indents in points | | `firstLineIndent` | `-50` to `100` | First-line indent in points | | `hangingIndent` | `0` to `100` | Hanging indent in points | | `backgroundColor` | Hex color | Paragraph background | | `spacing` | `before,after` (e.g., `5,10`) | Spacing before/after in points | | `keepTogether` | Boolean | Keep the paragraph on one page where possible | | `keepWithNext` | Boolean | Keep the paragraph with the following element | | `pageBreakBefore` | Boolean | Start the paragraph on a new page | | `widowControl` | Boolean | Avoid isolated first or last lines where supported | HTML syntax is optional. Use it only when you need styling that goes beyond what your document defaults provide. For most documents, standard Markdown headings and paragraphs are sufficient. # Images Source: https://docs.autype.com/markup-reference/images Embed images with sizing, crop, fit, focal point, opacity, captions, and anchors. ## Standard Markdown ```markdown theme={null} ![Alt text](image.png) ![Alt text](image.png "Hover title") ``` The alt text is automatically used as the **figure caption** for auto-numbering in the List of Figures. ## Extended attributes Append `{attrs}` after the image to control size, alignment, and more: ```markdown theme={null} ![Company Logo](logo.png){width=200 height=100 align=center} ![Photo](photo.jpg){width=400 align=right spacing=10,20} ![Hero](hero.jpg){width=700 height=320 fit=cover focalPoint="65,35" opacity=0.9} ![Detail](photo.jpg){crop="10,5,70,80"} ``` ### Auto-captioning The alt text becomes the figure caption: ```markdown theme={null} ![Sales Dashboard 2024](dashboard.png){width=600 align=center} ``` This renders as: *Figure 1: Sales Dashboard 2024* The caption prefix (e.g., `"Figure"`, `"Abb."`) and styling (font, alignment, color) are configured in your document's [style settings](/getting-started/editor/sidebar-styles#figure-captions). Override the caption explicitly: ```markdown theme={null} ![](chart.png){width=400 caption="Revenue by Quarter"} ``` ### Anchors for cross-references Add an `anchor` attribute to reference the image from elsewhere: ```markdown theme={null} ![System Architecture](diagram.png){anchor=fig-diagram width=600} ``` Then reference it: ```markdown theme={null} See [Figure {num}](#fig-diagram) for the architecture overview. ``` See [References & Anchors](/markup-reference/references) for all cross-reference options. ## Attribute reference | Attribute | Values | Description | | ------------ | ------------------------------ | -------------------------------------------- | | `width` | Number (pixels) | Image width | | `height` | Number (pixels) | Image height | | `align` | `left`, `center`, `right` | Horizontal alignment | | `fit` | `contain`, `cover`, `fill` | How the image fits explicit width and height | | `crop` | `x,y,width,height` percentages | Crop rectangle within the source image | | `focalPoint` | `x,y` percentages | Preferred focal point when `fit=cover` | | `opacity` | `0`–`1` | Image opacity | | `caption` | String | Override caption (default: alt text) | | `anchor` | String | Anchor ID for cross-references | | `spacing` | `before,after` (e.g., `10,20`) | Spacing before/after in points | The optional Markdown image title remains separate from the visible caption: ```markdown theme={null} ![Visible caption](photo.jpg "Image title"){fit=contain} ``` Crop and focal-point values use percentages. A crop rectangle must remain inside the source image, so `x + width` and `y + height` cannot exceed 100. *** ## Image directive For an alternative syntax, use the `:::image` directive: ```markdown theme={null} :::image{width=300 height=200 align=center} ![Product Image](product.png) ::: ``` ```markdown theme={null} :::image{width=150 align=left} ![Thumbnail](thumb.png) ::: ``` The directive supports the same attributes as the inline syntax, including `fit`, `crop`, `focalPoint`, `opacity`, `caption`, `anchor`, and `spacing`. The alt text from the inner `![alt](src)` is used as the caption if no explicit `caption` attribute is provided. # Automatic Indices Source: https://docs.autype.com/markup-reference/indices Generate a table of contents, list of figures, list of tables, list of code listings, and list of abbreviations automatically from your document content. Autype can automatically generate indices from your document content. All indices use inline directive syntax (`::directive{attrs}`). ## Table of Contents Generate a TOC from all headings in the document: ```markdown theme={null} ::toc ``` ### With options ```markdown theme={null} ::toc{title="Table of Contents" maxLevel=3 hyperlink=true} ``` ### Attributes | Attribute | Values | Default | Description | | ----------- | --------------- | -------- | -------------------------------- | | `title` | String | *(none)* | Title displayed above the TOC | | `maxLevel` | 1–6 | 3 | Maximum heading level to include | | `hyperlink` | `true`, `false` | `true` | Make entries clickable | The TOC is generated as a document field. When opening in Word or LibreOffice, you may be prompted to update fields to populate the TOC with page numbers. ### Example ```markdown theme={null} # My Document ::toc{title="Contents" maxLevel=2} --- ## Chapter 1 Content... ## Chapter 2 Content... ``` *** ## List of Figures Generate a list of all figures (images and charts with captions): ```markdown theme={null} ::listOfFigures ``` **Short alias:** ```markdown theme={null} ::lof ``` ### With options ```markdown theme={null} ::listOfFigures{title="List of Figures"} ::lof{title="Abbildungsverzeichnis" tabStyle=hyphen} ``` ### Attributes | Attribute | Values | Default | Description | | ---------- | ------------------------------------- | -------- | ------------------------------------------------ | | `title` | String | *(none)* | Title displayed above the list | | `tabStyle` | `dot`, `hyphen`, `underscore`, `none` | `dot` | Tab leader style between caption and page number | ### How figures are numbered Figures are automatically numbered based on: * **Images** with alt text (alt text becomes the caption): `![Sales Dashboard](img.png)` * **Images** with explicit `caption` attribute: `![](img.png){caption="Sales Dashboard"}` * **Charts** with a `caption` attribute: `:::chart{caption="Revenue 2024"}` The figure prefix (e.g., `"Figure"`, `"Abb."`) and caption styling are configured in your document's [style settings](/getting-started/editor/sidebar-styles#figure-captions). *** ## List of Tables Generate a list of all tables with captions: ```markdown theme={null} ::listOfTables ``` **Short alias:** ```markdown theme={null} ::lot ``` ### With options ```markdown theme={null} ::listOfTables{title="List of Tables"} ::lot{title="Tabellenverzeichnis" tabStyle=hyphen} ``` ### Attributes | Attribute | Values | Default | Description | | ---------- | ------------------------------------- | -------- | ------------------------------------------------ | | `title` | String | *(none)* | Title displayed above the list | | `tabStyle` | `dot`, `hyphen`, `underscore`, `none` | `dot` | Tab leader style between caption and page number | ### How tables are numbered Tables are automatically numbered based on tables that have the `caption` attribute in the `:::table` directive: ```markdown theme={null} :::table{caption="Revenue by Quarter"} | Quarter | Revenue | |---------|---------| | Q1 | €150,000 | ::: ``` The table prefix (e.g., `"Table"`, `"Tabelle"`) and caption styling are configured in your document's [style settings](/getting-started/editor/sidebar-styles#table-captions). *** ## List of Code Listings Generate a list of all code blocks with captions: ```markdown theme={null} ::listOfCodeListings ``` **Short alias:** ```markdown theme={null} ::loc ``` ### With options ```markdown theme={null} ::listOfCodeListings{title="List of Code Listings"} ::loc{title="Quellcodeverzeichnis" tabStyle=hyphen} ``` ### Attributes | Attribute | Values | Default | Description | | ---------- | ------------------------------------- | -------- | ------------------------------------------------ | | `title` | String | *(none)* | Title displayed above the list | | `tabStyle` | `dot`, `hyphen`, `underscore`, `none` | `dot` | Tab leader style between caption and page number | ### How code listings are numbered Code listings are automatically numbered based on code blocks that have the `caption` attribute: ````markdown theme={null} ```typescript{caption="Configuration interface" anchor="code-config"} interface Config { apiUrl: string; timeout: number; } ``` ```` The listing prefix (e.g., `"Listing"`, `"Quellcode"`) and caption styling are configured in your document's [style settings](/getting-started/editor/sidebar-styles#code-captions). Diagram code blocks (e.g., `mermaid`, `plantuml`) with captions are numbered as **figures** and appear in the List of Figures, not the List of Code Listings — unless `renderAsImage=false` is set. See [Diagrams](/markup-reference/diagrams) for details. *** ## List of Abbreviations Generate a list of all abbreviations used in the document: ```markdown theme={null} ::listOfAbbreviations ``` **Short alias:** ```markdown theme={null} ::loa ``` ### With options ```markdown theme={null} ::listOfAbbreviations{title="List of Abbreviations" sortOrder=alphabetical} ::loa{title="Abkürzungsverzeichnis" sortOrder=document} ``` ### Attributes | Attribute | Values | Default | Description | | ----------- | -------------------------- | -------------- | ------------------------------ | | `title` | String | *(none)* | Title displayed above the list | | `sortOrder` | `alphabetical`, `document` | `alphabetical` | Sort order | * **`alphabetical`** — abbreviations sorted A–Z * **`document`** — abbreviations in the order they first appear See [Abbreviations](/markup-reference/abbreviations) for how to mark abbreviations in your text with `~ABK~` syntax. *** ## Tab leader styles The `tabStyle` attribute controls the visual separator between the entry text and the page number: | Style | Appearance | | ------------ | ---------------------------- | | `dot` | `Chapter 1 .............. 3` | | `hyphen` | `Chapter 1 ------------ 3` | | `underscore` | `Chapter 1 ____________ 3` | | `none` | `Chapter 1 3` | *** ## Full example: Academic document ````markdown theme={null} ---page{align=center}--- # Research Paper Title **Author Name** {{date/D. MMMM YYYY}} ---/page--- --- ::toc{title="Table of Contents" maxLevel=3} --- ::lof{title="List of Figures"} --- ::lot{title="List of Tables"} --- ::loc{title="List of Code Listings"} --- ::loa{title="List of Abbreviations" sortOrder=alphabetical} --- ## Introduction {#intro} The ~WHO~ has published guidelines on this topic @[who2023]. ## Results :::chart{type="bar" caption="Survey Results" anchor="chart-results"} labels: Group A, Group B, Group C dataset: Score | 85, 72, 91 | #3b82f6 ::: :::table{caption="Detailed Scores"} | Group | Mean | SD | |-------|------|----| | A | 85.2 | 4.1 | | B | 72.1 | 6.3 | | C | 91.0 | 2.8 | ::: As shown in [Figure {num}](#chart-results), Group C performed best. ## Implementation ```typescript{caption="Data Processing Function" anchor="code-process"} async function processResults(data: RawData[]): Promise { const validated = data.filter(d => d.isValid); return generateReport(validated); } ``` See [Listing {num}](#code-process) for the data processing implementation. ## References ::bibliography{title="References"} ```` # Inline Formatting Source: https://docs.autype.com/markup-reference/inline-formatting Bold, italic, underline, strikethrough, highlight, inline code, links, and line breaks — all inline formatting options in Autype. Autype supports all standard Markdown inline formatting plus additional marks for underline, highlight, text color, and abbreviations. ## Bold ```markdown theme={null} **bold text** __also bold__ ``` ## Italic ```markdown theme={null} *italic text* _also italic_ ``` ## Bold + Italic ```markdown theme={null} ***bold and italic*** ``` ## Underline ```markdown theme={null} ++underlined text++ ``` ## Strikethrough ```markdown theme={null} ~~strikethrough text~~ ``` ## Highlight Highlight text with a default highlight color: ```markdown theme={null} ==highlighted text== ``` Highlight with a custom color: ```markdown theme={null} ==highlighted text=={#ff6600} ==highlighted text=={yellow} ``` The color value inside `{...}` accepts any CSS color. ## Text color Color only part of a paragraph with a `span`: ```markdown theme={null} This paragraph contains red text and normal text. ``` The `color` value accepts hexadecimal `#RGB` or `#RRGGBB` values such as `#c62828` or `#0f766e`. Text color is an inline mark, so it can be combined with other formatting: ```markdown theme={null} This is **blue and bold**. ``` For whole paragraphs or headings, prefer the element/style color settings instead of wrapping the entire text in a span. ## Inline code ```markdown theme={null} Use the `parseMarkdown()` function to convert text. ``` Content inside backticks is preserved exactly as-is — no further formatting is applied inside inline code. ## Links ```markdown theme={null} [Link text](https://example.com) [Link with title](https://example.com "Hover title") ``` Links starting with `#` are treated as [internal references](/markup-reference/references), not external links. ## Line breaks Use `
` for a line break within a paragraph: ```markdown theme={null} First line
Second line
Third line ``` Without `
`, consecutive lines in the same paragraph are joined with a space. ## Inline variables Reference variables inline with double curly braces: ```markdown theme={null} Dear {{customer.name}}, your order #{{order.id}} is ready. ``` See [Variables](/markup-reference/variables) for the full variable reference. ## Nesting Inline formatting can be nested. For example, bold text can contain abbreviations or citations: ```markdown theme={null} **The ~WHO~ recommends this approach @[smith2023, p. 42].** ``` The parser correctly handles abbreviations (`~ABK~`) and citations (`@[key]`) inside bold, italic, underline, strikethrough, and highlight marks. ## Summary | Format | Syntax | | ----------------- | ----------------------------------- | | Bold | `**text**` or `__text__` | | Italic | `*text*` or `_text_` | | Bold Italic | `***text***` | | Underline | `++text++` | | Strikethrough | `~~text~~` | | Highlight | `==text==` | | Highlight (color) | `==text=={#color}` | | Text color | `text` | | Inline code | `` `code` `` | | Link | `[text](url)` | | Variable | `{{name}}` | | Line break | `
` | # Lists Source: https://docs.autype.com/markup-reference/lists Ordered and unordered lists with nesting and inline formatting support. ## Unordered lists Use `-` or `*` to create unordered list items: ```markdown theme={null} - Item 1 - Item 2 - Item 3 ``` ```markdown theme={null} * Item 1 * Item 2 * Item 3 ``` ## Ordered lists Use numbers followed by a period: ```markdown theme={null} 1. First item 2. Second item 3. Third item ``` The starting number is preserved. If you start with `3.`, the rendered list begins at 3. ## Task lists Use `[x]` for a completed task and `[ ]` for an open task after an unordered list marker: ```markdown theme={null} - [x] Critical workloads classified - [x] Backup power system assessed - [ ] Full-load black-start test completed - [ ] Supplier emergency chain contractually secured ``` The checkbox is stored as list-item state. It can be toggled in the rich-text editor and is exported as a checked or unchecked box in DOCX and PDF rather than as literal Markdown text. Uppercase `[X]` is accepted and normalized to `[x]` when serialized. Task state is also supported in numbered lists, for example `1. [ ] Verify the first deliverable`. Numbering and its starting value are preserved across conversions. ## Nested lists Indent with 2 spaces to create nested lists: ```markdown theme={null} - Parent Item 1 - Child Item 1.1 - Child Item 1.2 - Grandchild 1.2.1 - Parent Item 2 - Child Item 2.1 ``` Ordered nested lists: ```markdown theme={null} 1. First parent 1. First child 2. Second child 2. Second parent 1. Another child ``` You can mix ordered and unordered lists at different nesting levels: ```markdown theme={null} 1. First item - Sub-bullet A - Sub-bullet B 2. Second item - Sub-bullet C ``` ## Inline formatting in lists List items support all inline formatting: ```markdown theme={null} - **Bold item** - *Italic item* - ~~Strikethrough item~~ - Item with **bold** and *italic* mixed - Item with a [link](https://example.com) - Item with `inline code` - Item referencing @[smith2023, p. 42] ``` Lists do not support extended attributes. Styling is controlled by your document defaults. # Math (LaTeX) Source: https://docs.autype.com/markup-reference/math Block math expressions with LaTeX syntax, alignment options, and render-as-image for perfect PDF output. Autype supports LaTeX math expressions as display equations using the `$$` block syntax. Inline math (`$E=mc^2$`) is not currently supported. Use block math for all equations. ## Block math ### Multi-line syntax Use double dollar signs on separate lines: ```markdown theme={null} $$ E = mc^2 $$ ``` ```markdown theme={null} $$ \int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2} $$ ``` ### Single-line syntax For short equations, put everything on one line: ```markdown theme={null} $$E = mc^2$$ ``` ### Alignment Default alignment is left. There are two syntaxes depending on whether the equation is single-line or multi-line. **Single-line** — use `:left`, `:center`, or `:right` between `$$` and the content: ```markdown theme={null} $$:center E = mc^2$$ $$:right \nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t}$$ ``` **Multi-line** — use `{align=...}` as an attribute on the opening `$$`: ```markdown theme={null} $${align=center} \sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6} $$ $${align=right} \nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t} $$ ``` ### Extended attributes Use `{attrs}` after `$$` for additional control: ```markdown theme={null} $${align=center renderAsImage=true spacing=10,20} \int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2} $$ ``` ## Attribute reference | Attribute | Values | Description | | --------------- | ------------------------------ | -------------------------------------------- | | `align` | `left`, `center`, `right` | Horizontal alignment | | `renderAsImage` | `true`, `false` | Render as PNG image for pixel-perfect output | | `spacing` | `before,after` (e.g., `10,20`) | Spacing before/after in points | The `renderAsImage` option is recommended for complex equations in PDF/DOCX exports. It ensures the math renders exactly as displayed, regardless of the viewer's font support. ## Common LaTeX examples ### Fractions and roots ```markdown theme={null} $$ x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$ ``` ### Summations and integrals ```markdown theme={null} $$ \sum_{i=1}^{n} i = \frac{n(n+1)}{2} $$ $$ \int_a^b f(x)\,dx = F(b) - F(a) $$ ``` ### Matrices ```markdown theme={null} $$ \begin{pmatrix} a & b \\ c & d \end{pmatrix} $$ ``` ### Greek letters ```markdown theme={null} $\alpha, \beta, \gamma, \delta, \epsilon, \theta, \lambda, \mu, \pi, \sigma, \omega$ ``` # Markup Reference Source: https://docs.autype.com/markup-reference/overview Complete reference for Autype's extended Markdown syntax — standard Markdown plus powerful extensions for professional documents. Autype uses **standard Markdown** as its foundation and extends it with optional attributes for styling, layout, and professional document features. Everything you know from Markdown works as-is — extended properties are purely additive. ## How it works Autype supports three syntax layers: 1. **Standard Markdown** — headings, paragraphs, bold, italic, links, lists, tables, code blocks, images, math 2. **Extended attributes** — add `{key=value}` after elements to control styling, alignment, size, and rendering 3. **Directives** — use `:::directive{attrs}` blocks or `::directive{attrs}` one-liners for charts, QR codes, tables with styling, page sections, indices, and bibliography ### Extended attribute syntax Append `{key=value}` after an element to customize it: ```markdown theme={null} ![Logo](logo.png){width=200 align=center} ``` Values can be strings (`"value"`), numbers (`400`), or booleans (`true`/`false`). ### Directive syntax **Block directives** wrap content between `:::` markers: ```markdown theme={null} :::chart{type="bar" title="Sales"} labels: Q1, Q2, Q3, Q4 dataset: Revenue | 100, 150, 200, 175 | #3b82f6 ::: ``` **Inline directives** are single-line with `::`: ```markdown theme={null} ::toc{title="Table of Contents" maxLevel=3} ``` ## Element reference h1–h6, paragraph styles, text2 variant, HTML syntax for styling. Bold, italic, underline, strikethrough, highlight, inline code, links, line breaks. Ordered, unordered, nested lists with inline formatting. Styled block quotes with borders, backgrounds, alignment, and typography. Standard and styled tables with 16+ attributes, images in cells. Sizing, crop, fit, focal point, opacity, captions, and anchors. Syntax highlighting, render-as-image, background color, alignment. Block math equations, alignment, render-as-image. 8 chart types — bar, line, pie, doughnut, radar, polar, scatter, bubble. URL, WiFi, and vCard QR codes with size and error correction. Inline citations with page/chapter locators, bibliography generation. Cross-references to headings, figures, and charts with auto-numbering. Define and reference abbreviations with automatic list generation. Inline and block variables, built-in variables, date formatting. Text, number, date, choice, signature, and initials fields with PDF AcroForms. Organization-managed content inserted as a live reference or editable snapshot. Page sections, semantic layouts, fixed canvas compositions, backgrounds, and pagination. Table of contents, list of figures, list of tables, list of abbreviations. Looking for a compact overview of all syntax? See the [Syntax Cheatsheet](/getting-started/concepts/syntax-cheatsheet). # Page Layout Source: https://docs.autype.com/markup-reference/page-layout Control page layout with page sections, columns layout, spacers, page breaks, and orientation changes for professional document output. Autype provides several elements to control how content is positioned on pages in the exported document. ## Page breaks ### Simple page break A horizontal rule (`---`) is treated as a page break in the rendered document: ```markdown theme={null} Content on page 1. --- Content on page 2. ``` ### Explicit page break with orientation Change page orientation with the explicit page break syntax: ```markdown theme={null} ---pagebreak{orientation="landscape"}--- ``` ```markdown theme={null} ---pagebreak{orientation="portrait"}--- ``` This is useful for inserting a landscape page for wide tables or charts, then switching back to portrait. ### Example: Mixed orientations ```markdown theme={null} # Introduction Regular portrait content here. ---pagebreak{orientation="landscape"}--- ## Wide Data Table | Col 1 | Col 2 | Col 3 | Col 4 | Col 5 | Col 6 | Col 7 | Col 8 | |-------|-------|-------|-------|-------|-------|-------|-------| | Data | Data | Data | Data | Data | Data | Data | Data | ---pagebreak{orientation="portrait"}--- ## Conclusion Back to portrait for the conclusion. ``` *** ## Page sections Page sections let you position content at specific vertical locations on a page. This is essential for title pages, certificates, and custom layouts. ### Syntax variant 1: Dash syntax ```markdown theme={null} ---page{align=center}--- # Centered Content This content is vertically centered on the page. ---/page--- ``` ### Syntax variant 2: Directive syntax ```markdown theme={null} :::page{align=center} # Centered Content This content is vertically centered on the page. ::: ``` Both syntaxes are equivalent. ### Vertical alignment | Value | Description | | -------- | ------------------------------------- | | `top` | Content starts at the top of the page | | `center` | Content is vertically centered | | `bottom` | Content is aligned to the bottom | ### Absolute positioning with startY Position content at an exact vertical position (in points from the top): ```markdown theme={null} ---page{align=top startY=100}--- Content starting at 100 points from the top. ---/page--- ``` ### Attribute reference | Attribute | Values | Description | | -------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------- | | `align` | `top`, `center`, `bottom` | Vertical alignment on the page | | `startY` | Number (points) | Absolute Y position from top of page | | `orientation` | `portrait`, `landscape` | Page orientation | | `backgroundColor` | Hex color | Page background color | | `backgroundImage` | Asset or HTTP(S) source | Full-page background image | | `backgroundFit` | `contain`, `cover`, `fill` | Background image fit | | `backgroundPositionX`, `backgroundPositionY` | `0`–`100` | Image focal position | | `backgroundOpacity` | `0`–`1` | Background image opacity | | `margins` | `top,right,bottom,left` | Per-side page margins in cm | | `showHeader`, `showFooter` | `true`, `false` | Override header/footer visibility | | `pageStyleId` | Style ID | Select a reusable document page style | | `pageStart` | `auto`, `next`, `odd`, `even` | Control section page start | | `restartPageNumber` | Positive integer | Restart visible page numbering | | `pageNumberFormat` | `decimal`, `lowerRoman`, `upperRoman`, `lowerAlpha`, `upperAlpha` | Page number format | ### Example: Title page ```markdown theme={null} ---page{align=center}--- # Annual Report 2024 ## Acme Corporation *Confidential* ---/page--- --- # Table of Contents ::toc{maxLevel=3} ``` ### Flow page assignment Use `---flow---` when a normal editable flow needs page-design metadata but no column wrapper: ```markdown theme={null} ---flow{id="appendix" pageStyleId="appendix" pageStart=odd restartPageNumber=1 pageNumberFormat=upperRoman}--- # Appendix This section uses the appendix master page. ---/flow--- ``` The same attributes work on `---columns---`. See [Document Styling](/api-reference/json-syntax/document-styling) for master-page and region definitions. ### Example: Certificate ```markdown theme={null} ---page{align=center}--- # Certificate of Completion This certifies that **{{recipientName}}** has successfully completed the course. **Date:** {{date/D. MMMM YYYY}} ---/page--- ``` *** ## Columns layout Create multi-column layouts similar to LaTeX two-column papers. Content flows automatically from one column to the next. ### Basic two-column layout ```markdown theme={null} ---columns{count=2}--- Content in the first column flows here. When the column is full, text continues automatically in the second column. ## Section Title All element types work inside columns — headings, paragraphs, lists, images, tables, math, and more. ---/columns--- ``` ### Three-column layout ```markdown theme={null} ---columns{count=3 space=0.8}--- Content flows across three columns with 0.8 cm spacing between them. ---/columns--- ``` ### With separator line Add a vertical line between columns: ```markdown theme={null} ---columns{count=2 space=1.5 separate=true}--- Left column content here... Right column content here... ---/columns--- ``` ### Attribute reference | Attribute | Values | Default | Description | | ---------- | --------------- | ------- | -------------------------------------------- | | `count` | `1`–`4` | `2` | Number of columns | | `space` | Number (cm) | `1.27` | Gap between columns | | `separate` | `true`, `false` | `false` | Show vertical separator line between columns | ### Example: Academic paper style ```markdown theme={null}

Research Paper Title

Author Name — Institution

## Abstract This is a single-column abstract paragraph. --- ---columns{count=2}--- ## 1. Introduction The introduction text flows across two columns, just like a typical academic paper layout. ## 2. Methods Describe your methodology here. Tables, math blocks, and images all work within the column layout. $$E = mc^2$$ ## 3. Results | Metric | Value | |--------|-------| | Score | 95.2 | ## 4. Conclusion Final remarks in two-column format. ---/columns--- ``` Columns are a section-level property — all content between `---columns{...}---` and `---/columns---` flows across the specified number of columns. In PDF/DOCX export, this uses native document column support for accurate rendering. *** ## Semantic layouts Semantic layouts place independently editable content side by side. Use them for summaries, image/text combinations, KPI rows, and other layouts where each column needs its own content. Unlike flowing columns, content never moves automatically from one semantic column into another. ```markdown theme={null} ---layout{gap=12 backgroundColor="#f8fafc" padding="8,8,8,8" keepTogether=true}--- ---column{width="1fr" verticalAlign=top backgroundColor="#ffffff"}--- ## Summary Editable text in the first column. ---/column--- ---column{width="2fr" verticalAlign=center backgroundColor="#ecfdf5"}--- ![Product](product.png){width=360 align=center} ---/column--- ---/layout--- ``` ### Layout attributes | Attribute | Values | Description | | ------------------------------------------- | ----------------------- | ----------------------------- | | `gap` | Number | Gap between columns in points | | `backgroundColor` | Hex color | Whole-layout background | | `borderWidth`, `borderColor`, `borderStyle` | Border values | Whole-layout border | | `padding` | `top,right,bottom,left` | Whole-layout padding | | `spacingBefore`, `spacingAfter` | Number | External spacing | | Pagination attributes | Boolean | Keep and page-break controls | Column `width` accepts a fixed centimeter number, `%`, `fr`, or `auto`. Columns can independently define `verticalAlign`, background, border, and padding. Semantic layouts are exported as fixed-width DOCX tables. Their headings, paragraphs, lists, images, and form fields remain editable in Word and LibreOffice. *** ## Fixed canvas Canvas is intended for cover pages, certificates, title panels, and other deliberately fixed visual compositions. Item positions and dimensions are percentages of the canvas. ```markdown theme={null} ---canvas{height=100 backgroundColor="#0f172a" pageBreakBefore=true}--- ::canvasShape{x=0 y=0 width=100 height=100 shape=rectangle fillColor="#0f172a" zIndex=0} ::canvasImage{x=8 y=8 width=24 height=16 src="/image/logo-id" fit=contain zIndex=2} ::canvasText{x=10 y=38 width=80 height=20 text="Annual Report" fontSize=34 fontWeight=bold color="#ffffff" align=center zIndex=3} ::canvasText{x=20 y=62 width=60 height=10 text="{{companyName}}" fontSize=16 color="#cbd5e1" align=center zIndex=3} ---/canvas--- ``` Supported items: * `canvasText`: text, typography, colors, alignment, vertical alignment, padding * `canvasImage`: source, alt text, fit, and focal point * `canvasShape`: rectangle, ellipse, or line with fill and border styling Common item attributes are `id`, `x`, `y`, `width`, `height`, `rotation`, `opacity`, and `zIndex`. Canvas items remain editable in Autype. For deterministic DOCX and LibreOffice output, the complete canvas is exported as one high-resolution image, so its individual items are not editable in Word. Form fields are not supported inside canvas; use semantic layouts for editable controls. *** ## Pagination controls Extended block elements can use the following attributes: | Attribute | Description | | ----------------- | ----------------------------------------- | | `keepTogether` | Avoid splitting the block across pages | | `keepWithNext` | Keep the block with the following block | | `pageBreakBefore` | Start the block on a new page | | `widowControl` | Enable or disable widow/orphan protection | These map to native DOCX pagination where available and to equivalent print CSS for HTML output. *** ## Spacers Add vertical spacing between elements: ```markdown theme={null} ---spacer--- ``` ### Custom height **Lines** (default unit): ```markdown theme={null} ---spacer{height=2}--- ``` This adds 2 lines of vertical space. **Pixels:** ```markdown theme={null} ---spacer{height="50px"}--- ``` This adds exactly 50 pixels of vertical space. ### Height values | Format | Description | Example | | ---------------- | --------------- | --------------------------- | | Number | Lines of space | `height=2` → 2 lines | | String with `px` | Pixels of space | `height="50px"` → 50 pixels | | *(omitted)* | Default: 1 line | `---spacer---` | Spacers are useful for fine-tuning layout on title pages or between sections where the default paragraph spacing isn't enough. # QR Codes Source: https://docs.autype.com/markup-reference/qr-codes Generate URL, WiFi, vCard, and text QR codes directly in your documents with customizable size, captions, and error correction. Autype can embed QR codes in your documents using the `:::qrcode` directive. QR codes are rendered as images in the exported document. ## URL QR Code ```markdown theme={null} :::qrcode{type="url" size=150 align=center} https://example.com ::: ``` You can also use the `url:` prefix: ```markdown theme={null} :::qrcode{type="url" size=200} url: https://docs.autype.com ::: ``` Both formats are equivalent. If the content doesn't start with `url:`, the entire first line is used as the URL. *** ## WiFi QR Code Generate a QR code that lets users connect to a WiFi network by scanning: ```markdown theme={null} :::qrcode{type="wifi" size=200} ssid: MyNetwork password: secret123 encryption: WPA ::: ``` ### WiFi fields | Field | Required | Values | Description | | ------------ | -------- | ---------------------- | ----------------------------- | | `ssid` | Yes | String | Network name | | `password` | No | String | Network password | | `encryption` | No | `WPA`, `WEP`, `nopass` | Encryption type | | `hidden` | No | `true`, `false` | Whether the network is hidden | ### Example: Guest WiFi ```markdown theme={null} :::qrcode{type="wifi" size=150} ssid: GuestWiFi password: guest2024 encryption: WPA hidden: false ::: ``` *** ## vCard QR Code Generate a contact card QR code: ```markdown theme={null} :::qrcode{type="vcard" size=180} firstName: John lastName: Doe organization: Acme Corp phone: +1-555-123-4567 email: john.doe@example.com url: https://johndoe.com address: 123 Main St, City, Country ::: ``` ### vCard fields | Field | Required | Description | | -------------- | -------- | -------------------------------------- | | `firstName` | No | First name | | `lastName` | No | Last name | | `name` | No | Full name (auto-split into first/last) | | `phone` | No | Phone number | | `email` | No | Email address | | `organization` | No | Company / organization name | | `url` | No | Website URL | | `address` | No | Physical address | | `note` | No | Additional note | The `name` field is a shortcut that splits on the first space into `firstName` and `lastName`. Use `firstName` and `lastName` separately for more control. ### Minimal vCard ```markdown theme={null} :::qrcode{type="vcard"} firstName: Jane lastName: Smith email: jane@company.com phone: +49-123-456789 ::: ``` *** ## Text QR Code Encode arbitrary text without treating it as a URL: ```markdown theme={null} :::qrcode{type="text" size=180 caption="Scan for details"} Any text payload ::: ``` *** ## Attribute reference | Attribute | Values | Description | | ----------------- | ------------------------------ | ---------------------------------- | | `type` | `url`, `wifi`, `vcard`, `text` | QR code type (required) | | `size` | Number (pixels) | Size of the QR code image | | `errorCorrection` | `L`, `M`, `Q`, `H` | Error correction level | | `align` | `left`, `center`, `right` | Horizontal alignment | | `caption` | String | Optional caption below the QR code | ### Error correction levels | Level | Recovery | Best for | | -------------- | -------- | ----------------------------------------- | | `L` (Low) | \~7% | Clean environments, maximum data capacity | | `M` (Medium) | \~15% | Default, good balance | | `Q` (Quartile) | \~25% | Moderate damage tolerance | | `H` (High) | \~30% | Printed materials that may get damaged | If no `size` is specified, the QR code renders at a default size. For print documents, use `size=200` or larger for reliable scanning. # References & Anchors Source: https://docs.autype.com/markup-reference/references Cross-reference headings, images, charts, and tables with automatic numbering — using anchors and three display modes. Internal references let you create clickable links to headings, images, charts, and tables within your document. References are automatically resolved with correct numbering at render time. ## Defining anchors ### Heading anchors Add `{#anchor-id}` at the end of a heading: ```markdown theme={null} # Introduction {#intro} ## Methods {#methods} ### Data Analysis {#data-analysis} ``` ### Image anchors Add an `anchor` attribute to an image: ```markdown theme={null} ![Diagram](image.png){anchor=fig-diagram caption="System Architecture"} ``` ### Chart anchors Add an `anchor` attribute to a chart directive: ```markdown theme={null} :::chart{type="bar" anchor="chart-sales" caption="Sales 2024"} labels: Q1, Q2, Q3, Q4 dataset: Sales | 100, 150, 200, 175 | #3b82f6 ::: ``` ### Table anchors Add an `anchor` attribute to a table directive: ```markdown theme={null} :::table{caption="Fee Schedule" anchor="tab-fees"} | Service | Monthly | Annual | |---------|---------|--------| | Basic | €10 | €100 | | Pro | €25 | €250 | ::: ``` ### Anchor ID rules * Must start with a letter (a–z, A–Z) * Can contain letters, numbers, underscores, and hyphens * Must be unique within the document * Examples: `intro`, `fig-1`, `section_2`, `data-analysis` *** ## Referencing anchors There are three display modes for internal references: ### Auto mode Use empty brackets `[]` to automatically show the target's numbered prefix and title: ```markdown theme={null} See [](#intro) for more details. ``` Renders as: *See Section 1 Introduction for more details.* ### Template mode Include `{num}` in the link text — it gets replaced with the target's number: ```markdown theme={null} As shown in [Figure {num}](#fig-diagram), the architecture... Refer to [Table {num}](#table-data) for the full dataset. See [Section {num}](#methods) for methodology. ``` Renders as: * *As shown in Figure 1, the architecture...* * *Refer to Table 2 for the full dataset.* * *See Section 2 for methodology.* ### Custom mode Provide any text without `{num}` — it's displayed as-is: ```markdown theme={null} For sales data, refer to [the chart below](#chart-sales). As discussed [earlier](#intro), the results are clear. ``` Renders as: * *For sales data, refer to the chart below.* * *As discussed earlier, the results are clear.* *** ## Summary | Syntax | Mode | Description | Example Output | | ------------------------ | -------- | ---------------------------- | -------------------------- | | `[](#anchor)` | Auto | Numbered prefix + title | "Section 2.1 Introduction" | | `[Text {num}](#anchor)` | Template | Replaces `{num}` with number | "Figure 1" | | `[Custom Text](#anchor)` | Custom | Shows your text as-is | "Custom Text" | *** ## Validation Autype validates references at render time: * **Duplicate anchors** — two elements with the same anchor ID will cause a validation error * **Broken references** — references to non-existent anchors will cause a validation error Use descriptive anchor IDs like `fig-architecture` or `sec-methodology` to make your document source readable and avoid accidental duplicates. # Reusable Blocks Source: https://docs.autype.com/markup-reference/reusable-blocks Insert organization-managed Extended Markdown blocks as live references or independent snapshots. Reusable blocks are organization-wide snippets such as legal clauses, company descriptions, disclaimers, or standard offer sections. Each block is versioned and stored as Extended Markdown. ## Reference mode Reference mode keeps the document connected to the reusable block. `latest` uses the current active version when the reference is resolved. ```markdown theme={null} ::block{id="550e8400-e29b-41d4-a716-446655440000" version=latest mode=reference locked=true} ``` Use a known block ID returned by the sidebar, API, or MCP tools. Do not invent IDs. ## Snapshot mode Snapshot mode copies the block content into the document. The copied elements can be edited independently and do not change when the library block is updated. The visual editor exposes both actions: * **Reference** inserts a linked, read-only block. * **Copy** inserts an editable snapshot at the current cursor position. ## Version behavior | Setting | Result | | ---------------- | ------------------------------------------------------------------------------ | | `version=latest` | Resolve the current active block version | | Pinned version | Keep using one specific block version | | `locked=true` | Keep a reference read-only in the visual editor | | Fallback content | Preserve renderable content if a referenced library block is later unavailable | Publishing changed block content creates an immutable version with an optional changelog note. Restoring an older version creates another version instead of rewriting history, so pinned references continue to resolve exactly as before. Metadata-only changes do not publish a content version. Manage blocks in the [Reusable Blocks sidebar](/getting-started/editor/sidebar-reusable-blocks) or through the Developer API and MCP tools. # Tables Source: https://docs.autype.com/markup-reference/tables Standard Markdown tables and the extended table directive with styling, column widths, alignment, captions, images, and form fields in cells. ## Standard Markdown tables ```markdown theme={null} | Header 1 | Header 2 | Header 3 | |----------|----------|----------| | Cell 1 | Cell 2 | Cell 3 | | Cell 4 | Cell 5 | Cell 6 | ``` The separator row (`|---|---|`) marks the first row as a header. Without a separator, all rows are treated as data rows. ### Tables with inline formatting Table cells support all inline formatting: ```markdown theme={null} | Name | Description | Status | |------|-------------|--------| | **Project A** | Main project | *Active* | | **Project B** | Secondary | ~~Cancelled~~ | | **Project C** | See @[smith2023] | `pending` | ``` ### Images in table cells Embed images directly in table cells: ```markdown theme={null} | Name | Logo | |------|------| | Company A | ![alt](logo-a.png){width=100 height=50} | | Company B | ![alt](logo-b.png){width=100 height=50} | ``` Image attributes `width` and `height` are supported inside table cells. ### Form fields in table cells A table cell can contain one form field instead of text or an image: ```markdown theme={null} :::table{columnWidths="1fr,2fr"} | Label | Value | | --- | --- | | Customer | ::field{name="customer" type=text} | | Department | ::field{name="department" type=select options="Sales,Legal"} | | Approval | ::field{name="approval" type=checkbox options="Approved"} | ::: ``` Use commas between select or checkbox options inside a table cell because the pipe character is the table column delimiter. See [Form Fields](/markup-reference/form-fields) for all field types and properties. *** ## Table directive For full styling control, captions, anchors, and column widths, wrap your table in a `:::table{attrs}` directive: ```markdown theme={null} :::table{caption="Sales Data" columnWidths="4,1fr,1fr" headerBg="#f0f0f0" rowAltBg="#fafafa"} | Product | Q1 | Q2 | |---------|----|----| | Widget | 100| 150| | Gadget | 200| 250| ::: ``` ### Column widths Use `columnWidths` to control table layout: ```markdown theme={null} :::table{columnWidths="4,1fr,1fr"} | Item | Description | Price | |------|-------------|-------| | A-100 | Long flexible description | €49 | | B-200 | Another description | €79 | ::: ``` Widths are comma-separated and map from left to right: | Width value | Meaning | | ------------ | ---------------------------------------- | | `4` | Fixed width in centimeters. | | `30%` | Percentage of the available table width. | | `1fr`, `2fr` | Flexible share of the remaining width. | | `auto` | Automatic/flexible column. | Mixed layouts are supported. For example, `columnWidths="4,1fr,2fr"` keeps the first column fixed at `4cm`; the remaining space is then split into one share for the second column and two shares for the third column. If fewer widths than columns are provided, the remaining columns use `auto`. More widths than columns are rejected during validation. ### Invisible tables (layout tables) Remove all borders and backgrounds to use tables for layout purposes: ```markdown theme={null} :::table{invisible=true cellPadding=12} | Logo | Company | |------|---------| | ![logo](a.png){width=50} | Company A | ::: ``` ### Hidden headers Hide the header row while keeping it for structure: ```markdown theme={null} :::table{hideHeaders=true} | Col 1 | Col 2 | |-------|-------| | Data | Data | ::: ``` ### Table captions Add a caption for automatic numbering in the List of Tables: ```markdown theme={null} :::table{caption="Revenue by Quarter"} | Quarter | Revenue | |---------|---------| | Q1 | €150,000 | | Q2 | €180,000 | ::: ``` This renders as: *Table 1: Revenue by Quarter* The caption prefix (e.g., `"Table"`, `"Tabelle"`) and styling (font, alignment, color) are configured in your document's [style settings](/getting-started/editor/sidebar-styles#table-captions). ### Anchors for cross-references Add an `anchor` attribute to reference the table from elsewhere: ```markdown theme={null} :::table{caption="Fee Schedule" anchor="tab-fees"} | Service | Monthly | Annual | |---------|---------|--------| | Basic | €10 | €100 | | Pro | €25 | €250 | ::: ``` Then reference it: ```markdown theme={null} See [Table {num}](#tab-fees) for the full pricing breakdown. ``` See [References & Anchors](/markup-reference/references) for all cross-reference options. *** ## Attribute reference ### General attributes | Attribute | Values | Description | | -------------- | ------------------------- | ------------------------------------------------------------ | | `caption` | String | Table caption text (enables auto-numbering) | | `anchor` | String | Anchor ID for cross-references | | `align` | `left`, `center`, `right` | Horizontal alignment of the complete table | | `invisible` | `true`, `false` | Hide all borders and backgrounds | | `hideHeaders` | `true`, `false` | Hide the header row | | `columnWidths` | Comma-separated widths | Fixed cm (`4`), percent (`30%`), flexible (`1fr`), or `auto` | | `cellPadding` | Number (pt) | Uniform cell padding | ### Header styles | Attribute | Values | Description | | ------------------ | ------------------------- | ----------------------- | | `headerBg` | CSS color | Header background color | | `headerColor` | CSS color | Header text color | | `headerFontSize` | Number (pt) | Header font size | | `headerFontWeight` | `normal`, `bold` | Header font weight | | `headerFontStyle` | `normal`, `italic` | Header font style | | `headerAlign` | `left`, `center`, `right` | Header text alignment | ### Row styles | Attribute | Values | Description | | --------------- | ------------------------- | -------------------------- | | `rowBg` | CSS color | Row background color | | `rowAltBg` | CSS color | Alternating row background | | `rowColor` | CSS color | Row text color | | `rowFontSize` | Number (pt) | Row font size | | `rowFontWeight` | `normal`, `bold` | Row font weight | | `rowFontStyle` | `normal`, `italic` | Row font style | | `rowAlign` | `left`, `center`, `right` | Row text alignment | ### Border styles | Attribute | Values | Description | | ------------- | --------------------------- | ------------ | | `borderWidth` | Number (pt) | Border width | | `borderColor` | CSS color | Border color | | `borderStyle` | `solid`, `dashed`, `dotted` | Border style | *** ## Full example ```markdown theme={null} :::table{caption="Team Overview" columnWidths="3,2fr,1fr" headerBg="#1e293b" headerColor="#ffffff" headerAlign=center rowAltBg="#f8fafc" borderWidth=1 borderColor="#e2e8f0" cellPadding=8} | Name | Role | Status | |------|------|--------| | Alice | Engineering Lead | Active | | Bob | Designer | Active | | Carol | Product Manager | On Leave | ::: ``` # Variables Source: https://docs.autype.com/markup-reference/variables Inline and block-level variables, built-in variables for headers/footers, and advanced date formatting with offsets and timezones. Variables let you insert dynamic content into your documents. They are replaced with actual values at render time. ## Inline variables Reference variables inline with double curly braces: ```markdown theme={null} Dear {{customer.name}}, your order #{{order.id}} is ready. The total amount is {{totalAmount}} EUR. ``` Variable names must start with a letter and can contain letters, numbers, and underscores. Dot notation (`customer.name`) is supported for nested values. ## Block-level variables Place a variable reference on its own line to render it as a standalone block: ```markdown theme={null} {{companyLogo}} {{signatureBlock}} {{footerContent}} ``` Block-level variables can contain images, text blocks, or other complex content defined in your document's variable configuration. ## Variable types Variables support multiple types. The type is determined by the value you provide: * **Text** — A simple string value (e.g., `"companyName": "Acme Inc"`) * **Number** — A numeric value (e.g., `"total": { "type": "number", "value": 1250.00 }`) * **Image** — An image with optional dimensions and alignment * **List** — An ordered or unordered list * **Table** — A 2D data table with optional column headers Number variables are rendered as text when used inline (`{{total}}` becomes `"1250"`). They are especially useful in chart dataset data arrays, where they are automatically resolved to numeric values. For full details on defining each variable type, see the [JSON Syntax — Variables](/api-reference/json-syntax/variables) reference. *** ## Built-in variables (headers & footers) These variables are automatically available in document headers and footers: | Variable | Description | Example Output | | ---------------- | ------------------------- | -------------- | | `{{pageNumber}}` | Current page number | `1` | | `{{totalPages}}` | Total page count | `99` | | `{{date}}` | Current date (DD.MM.YYYY) | `02.02.2026` | *** ## Date variable formatting The `{{date}}` variable supports custom formatting, date manipulation, and timezone offsets. ### Syntax ``` {{date}} → Default format (DD.MM.YYYY) {{date/FORMAT}} → Custom format {{date/FORMAT/OFFSET}} → With date manipulation {{date/FORMAT/OFFSET/TIMEZONE}} → With timezone offset ``` ### Format tokens | Token | Description | Example | | ------ | ---------------- | -------- | | `YYYY` | 4-digit year | 2026 | | `YY` | 2-digit year | 26 | | `MMMM` | Full month name | February | | `MMM` | Short month name | Feb | | `MM` | 2-digit month | 02 | | `M` | 1-2 digit month | 2 | | `dddd` | Full weekday | Sunday | | `ddd` | Short weekday | Sun | | `DD` | 2-digit day | 02 | | `D` | 1-2 digit day | 2 | | `HH` | 24-hour hour | 14 | | `mm` | Minutes | 35 | ### Format presets Instead of building a format string, use a preset name: | Preset | Equivalent Format | Example | | ----------- | ------------------ | ---------------- | | `iso` | `YYYY-MM-DD` | 2026-02-02 | | `time` | `HH:mm` | 14:35 | | `datetime` | `DD.MM.YYYY HH:mm` | 02.02.2026 14:35 | | `long` | `D. MMMM YYYY` | 2. February 2026 | | `monthYear` | `MMMM YYYY` | February 2026 | ### Date offset (manipulation) Shift the date forward or backward: | Offset | Description | | -------- | ------------------- | | `+1d` | Tomorrow | | `-7d` | 7 days ago | | `+1m` | Next month | | `-1y` | Last year | | `+2h` | 2 hours from now | | `+30min` | 30 minutes from now | ### Timezone offset Specify a UTC offset in `+HH:mm` or `-HH:mm` format: ```markdown theme={null} {{date/HH:mm//+01:00}} → Time in CET {{date/datetime/+7d/+02:00}} → Next week, CEST ``` When using a timezone offset without a date offset, leave the offset slot empty with double slashes: `{{date/FORMAT//TIMEZONE}}`. ### Examples ```markdown theme={null} {{date/DD.MM.YYYY}} → 02.02.2026 {{date/YYYY-MM-DD}} → 2026-02-02 {{date/D. MMMM YYYY}} → 2. February 2026 {{date/iso}} → 2026-02-02 {{date/DD.MM.YYYY/+1d}} → Tomorrow's date {{date/MMMM YYYY/-1y}} → February 2025 {{date/HH:mm//+01:00}} → Time in CET {{date/datetime/+7d/+02:00}} → Next week, CEST ```