Serveur MCP

Carbone MCP

io.carbone/carbone-mcp
Outils développeur Productivité Public et accessible MCP 2025-11-25

Ce que fait ce MCP

Generates documents from templates and JSON, converts files between document formats, and manages reusable templates.

convert_document
Convert Document
Convert any document to another format without storing a template. Supports 100+ input/output format combinations: Office documents, PDFs, images, web pages, spreadsheets, and more. The source file can be a local path, a URL, or a base64 string. Carbone tags are PRESERVED, not resolved: converting a template keeps every {d.field} intact, so this is also how you proof a template in another format (DOCX template → PDF, or DOCX → ODT while it stays a template). Use render_document instead when you need data injection ({d.field} tags resolved), translations, or batch generation. Common conversions: DOCX → PDF (file: "report.docx", convertTo: "pdf"; add converter: "I" for the fastest DOCX→PDF path), XLSX → PDF (file: "data.xlsx", convertTo: "pdf"), PPTX → PDF (file: "slides.pptx", convertTo: "pdf", converter: "O" for best fidelity), HTML → PDF (file: "page.html", convertTo: "pdf", converter: "C" for full CSS/JS rendering), DOCX → HTML (file: "doc.docx", convertTo: "html"), XLSX → CSV (file: "sheet.xlsx", convertTo: "csv"), PDF → PNG (file: "doc.pdf", convertTo: "png"), PPTX → PNG (first slide as image), MD → PDF (file: "readme.md", convertTo: "pdf").
Lecture seule Accès externe Idempotent
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['file', 'convertTo'], 'properties': {'file': {'type': 'string', 'minLength': 1, 'description': 'The document to convert. Two input forms are accepted: (1) HTTPS URL â\x80\x94 the file is downloaded automatically, e.g. "https://example.com/file.pptx". (2) Base64-encoded string â\x80\x94 the raw file content encoded as base64. Local file paths are NOT accepted â\x80\x94 this server is reached over HTTP, so a path would resolve on the server\'s disk rather than yours and is rejected. Upload the bytes as base64, or host the file at a URL. Supported input formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, XML, SVG, IDML, Markdown (MD), TXT, CSV, RTF, PDF, PNG and JPG. Carbone reads XML-based and text-based documents only, so the legacy BINARY Office formats DOC, XLS and PPT are REJECTED as input â\x80\x94 Carbone can produce them as output but cannot read them. Re-save such a file as DOCX/XLSX/PPTX first. Full conversion matrix: https://carbone.io/documentation/developer/http-api/generate-reports.md'}, 'convertTo': {'anyOf': [{'enum': ['pdf', 'docx', 'doc', 'xlsx', 'xls', 'pptx', 'ppt', 'odt', 'ods', 'odp', 'odg', 'html', 'xhtml', 'txt', 'csv', 'md', 'xml', 'rtf', 'png', 'jpg', 'jpeg', 'webp', 'svg', 'tiff', 'bmp', 'gif', 'zip', 'idml', 'epub', 'cdr'], 'type': 'string'}, {'type': 'object', 'required': ['formatName'], 'properties': {'formatName': {'enum': ['pdf', 'docx', 'doc', 'xlsx', 'xls', 'pptx', 'ppt', 'odt', 'ods', 'odp', 'odg', 'html', 'xhtml', 'txt', 'csv', 'md', 'xml', 'rtf', 'png', 'jpg', 'jpeg', 'webp', 'svg', 'tiff', 'bmp', 'gif', 'zip', 'idml', 'epub', 'cdr'], 'type': 'string', 'description': 'Target format name.'}, 'formatOptions': {'type': 'object', 'description': 'Advanced format options object. Examples by format: PDF â\x80\x94 { "EncryptFile": true, "DocumentOpenPassword": "secret", "DocumentPermissionPassword": "owner" } password-protect; PDF â\x80\x94 { "Watermarks": [{ "text": "DRAFT", "opacity": 0.2, "rotation": -45, "fontsize": 60 }] } up to 5 watermarks; PDF â\x80\x94 { "SelectPdfVersion": 1 } PDF/A-1b compliance (use 2 for PDF/A-2, 3 for PDF/A-3); PDF â\x80\x94 { "PageRange": "1-3,5" } export specific pages only; PDF â\x80\x94 { "ConvertSlideshow": true } convert each slide to a separate PDF page; Images (PNG/JPG/WEBP) â\x80\x94 { "Quality": 90 } set compression quality 0-100; Images â\x80\x94 { "density": 150 } set DPI for rasterisation (default 96); CSV â\x80\x94 { "fieldSeparator": ";" } custom column separator.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}}}], 'description': 'Target output format. Documents : "pdf", "docx", "xlsx", "pptx", "odt", "ods", "odp", "odg", "rtf", "epub", plus the legacy "doc", "xls", "ppt" (output only â\x80\x94 Carbone writes them but cannot read them back). Web/text  : "html", "xhtml", "txt", "csv", "md", "xml", "idml". Images    : "png", "jpg", "jpeg", "webp", "svg", "tiff", "bmp", "gif". Archive   : "zip" (batch output). Simple usage: "pdf". Advanced usage: { "formatName": "pdf", "formatOptions": { "EncryptFile": true, "DocumentOpenPassword": "secret" } }.'}, 'converter': {'enum': ['L', 'C', 'O', 'I'], 'type': 'string', 'description': 'Converter engine. Only relevant when convertTo is "pdf" (or an image format rasterised from a document). "L" â\x80\x94 LibreOffice (default): best all-round engine for DOCX, XLSX, PPTX, ODT, ODS, ODP. "O" â\x80\x94 OnlyOffice: highest fidelity rendering for Microsoft Office formats (DOCX, XLSX, PPTX). "C" â\x80\x94 Chromium: best for HTML, CSS, JavaScript â\x80\x94 full browser rendering. "I" â\x80\x94 Carbone ICE (Instant Converter Engine, Carbone 5.14.0+): DOCX â\x86\x92 PDF ONLY, no third-party converter â\x80\x94 up to 60x faster than LibreOffice on a 1000-page DOCX (3x on a one-page document). Any other input or output format is REJECTED â\x80\x94 use another converter for those. PDF options: only Watermarks are applied. EncryptFile, DocumentOpenPassword, RestrictPermissions and the other security options are SILENTLY IGNORED â\x80\x94 the PDF comes back readable by anyone, with no error â\x80\x94 so NEVER pick "I" when the request needs a password or restricted permissions; use "L" for those. Also unsupported: WEBP and EMF/WMF images, table of contents, SmartArt, complex charts, footnotes/endnotes, comments, tracked changes, form fields, equations, bookmarks and links; a missing font falls back to Noto Sans. If omitted, LibreOffice is used by default.'}, 'outputPath': {'type': 'string', 'description': "NOT AVAILABLE on this server, which is reached over HTTP: the converted document would be written to the server's disk instead of yours, so passing outputPath is rejected. Use asAttachment to receive the bytes, or returnLink for a one-time download URL."}, 'reportName': {'type': 'string', 'description': 'Filename (WITHOUT extension) for the converted document, returned in the Content-Disposition header. Carbone appends the extension matching convertTo, so do not include one â\x80\x94 "report.pdf" yields "report.pdf.pdf". Examples: "contract", "2026-invoice". Unlike render_document, Carbone tags are NOT resolved here (conversion does not run templating), so pass a literal name rather than a pattern like "{d.id}" â\x80\x94 a pattern would come back verbatim. Ignored when returnLink is set, which returns a download URL rather than a named file.'}, 'returnLink': {'type': 'boolean', 'description': 'If true, generate the document and return a public download URL instead of the file contents. The link is SHORT-LIVED and ONE-TIME â\x80\x94 Carbone deletes the file after the first download â\x80\x94 so it is meant for the end user to download once (do not fetch it programmatically). Works in stdio and HTTP. Mutually exclusive with outputPath and asAttachment.'}, 'hardRefresh': {'type': 'boolean', 'description': 'Forces Carbone to run the converter even when the output format already matches the input format. Only useful for PDF: converting PDF â\x86\x92 PDF to APPLY formatOptions (watermark, password, PDF/A, page range). Without it Carbone may pass the file straight through and none of those options take effect. Leave unset for any format-changing conversion (DOCX â\x86\x92 PDF, XLSX â\x86\x92 CSV, â\x80¦), where the converter runs anyway.'}, 'asAttachment': {'type': 'boolean', 'description': 'If true, return the document as a downloadable file attachment (a base64 EmbeddedResource), for any format. Default delivery: text and png/jpg/gif/webp are returned inline; other binary outputs (PDF, Office, â\x80¦) are saved to a temp file in stdio mode (path returned), or returned as an attachment in HTTP mode. Ignored when outputPath or returnLink is set.'}, 'egressAuthorization': {'type': 'string', 'maxLength': 512, 'description': 'Value for the Authorization header Carbone adds to its OUTBOUND (egress) requests during conversion â\x80\x94 e.g. when a Chromium HTMLâ\x86\x92PDF conversion fetches a protected external image or stylesheet. For example "Bearer abc123" makes Carbone send `authorization: Bearer abc123` to those hosts. Only the authorization header can be customised; max 512 characters.'}}}
delete_template
Delete Template
Delete a stored Carbone template. This is a soft delete: the template is marked for garbage collection and removed after a delay (default 24 hours). You can delete by Template ID (removes all versions) or by Version ID (removes only that specific version). For immediate or scheduled deletion, use update_template_metadata with expireAt = 42000000000 (NOW) or a future Unix timestamp.
Destructif Accès externe Idempotent
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['templateId'], 'properties': {'templateId': {'type': 'string', 'minLength': 1, 'description': 'Template ID (64-bit) or Version ID (SHA-256) to delete. Template ID â\x80\x94 deletes the template record and all its versions. Version ID â\x80\x94 deletes only that specific version, leaving other versions intact. Both formats are returned by upload_template and list_templates.'}}}
download_template
Download Template
Download the original source file of a stored Carbone template (e.g. the DOCX, XLSX, PPTX, or HTML file that was uploaded). Use this to inspect, edit, or back up a template. Pass a Template ID to download the currently deployed version, or a Version ID to download a specific version. Set sample:true to fetch the JSON sample dataset stored with the template instead of the template file itself.
Lecture seule Accès externe Idempotent
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['templateId'], 'properties': {'sample': {'type': 'boolean', 'description': 'If true, download the JSON SAMPLE DATASET saved with the template (the "sample" array passed to upload_template) instead of the template file. Returns JSON of the form [{ "data": {...}, "complement": {...}, "translations": {...}, "enum": {...} }]. Use it to recover the example data a template expects â\x80\x94 handy before calling render_document against an unfamiliar template. Errors if the template was uploaded without a sample.'}, 'outputPath': {'type': 'string', 'description': "NOT AVAILABLE on this server, which is reached over HTTP: the template file would be written to the server's disk instead of yours, so passing outputPath is rejected. Use asAttachment to receive the bytes, or returnLink for a one-time download URL."}, 'templateId': {'type': 'string', 'minLength': 1, 'description': 'Template ID (64-bit) or Version ID (SHA-256) to download. Template ID â\x80\x94 downloads the currently deployed version of the template. Version ID â\x80\x94 downloads that exact version regardless of deployment status. Both formats are returned by upload_template and list_templates.'}, 'asAttachment': {'type': 'boolean', 'description': 'If true, return the template as a downloadable file attachment (base64 resource) instead of inline text/image. Useful in HTTP mode where outputPath is unavailable. Default: false. Ignored when outputPath is set.'}}}
get_api_status
API Status
Check Carbone API health and version. Returns the current API version and a status message. Useful for verifying connectivity and confirming which Carbone version is active.
Lecture seule Accès externe Idempotent
Schéma d’entrée
{'type': 'object', 'properties': {}}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['version', 'message'], 'properties': {'message': {'type': 'string', 'description': 'Status message returned by the API.'}, 'version': {'type': 'string', 'description': 'The running Carbone API version.'}}, 'additionalProperties': False}
get_capabilities
Capabilities
Returns a summary of all Carbone capabilities: supported formats, features, tool usage examples, and links to full documentation. Call this first if you are unsure what Carbone can do.
Lecture seule Idempotent
Schéma d’entrée
{'type': 'object', 'properties': {}}
list_categories
List Categories
List all template categories currently in use in your Carbone account. Categories act like folders for organising templates (e.g. "invoices", "legal", "hr"). Use the returned names as the category filter in list_templates or upload_template.
Lecture seule Accès externe Idempotent
Schéma d’entrée
{'type': 'object', 'properties': {}}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['categories'], 'properties': {'categories': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Template category names in use.'}}, 'additionalProperties': False}
list_tags
List Tags
List all tags currently used across templates in your Carbone account. Tags are free-form labels attached to templates (e.g. "sales", "billing", "v2"). Note: the Carbone API does not support filtering list_templates by tag — use this tool to discover available tags, then call list_templates and filter the results manually.
Lecture seule Accès externe Idempotent
Schéma d’entrée
{'type': 'object', 'properties': {}}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['tags'], 'properties': {'tags': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Template tag names in use.'}}, 'additionalProperties': False}
list_templates
List Templates
List stored Carbone templates with filtering, search, and pagination. Filter by Template ID, Version ID, category, or upload origin. Use includeVersions to see the full version history of each template. Supports cursor-based pagination for large collections. Note: filtering by tags is not supported by the Carbone API — use list_tags to discover tags, then filter results manually. Note: templates uploaded with versioning disabled appear with id = null and are identified only by their versionId — pass that versionId where a Template ID is expected (e.g. delete_template, download_template).
Lecture seule Accès externe Idempotent
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'id': {'type': 'string', 'description': 'Filter by Template ID (64-bit format). Cannot be a Version ID.'}, 'limit': {'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Maximum number of results to return, between 1 and 100. Default: 100. Use cursor to page beyond that.'}, 'cursor': {'type': 'string', 'description': 'Pagination cursor from the previous response nextCursor field. Use to fetch the next page.'}, 'origin': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'Filter by upload origin. 0 = API, 1 = Carbone Studio, 2 = Salesforce, 3 = Odoo, 4 = HubSpot. Templates created through this MCP are origin 0.'}, 'search': {'type': 'string', 'description': 'Fuzzy search in template names, or exact match on Template ID / Version ID.'}, 'category': {'type': 'string', 'description': 'Filter by category (e.g. "invoices", "legal").'}, 'versionId': {'type': 'string', 'description': 'Filter by Version ID (SHA-256 format).'}, 'includeVersions': {'type': 'boolean', 'description': 'If true, returns all versions for each template. Default: false (only deployed version).'}}}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['templates', 'hasMore'], 'properties': {'hasMore': {'type': 'boolean', 'description': 'Whether more results are available via the cursor.'}, 'templates': {'type': 'array', 'items': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'description': 'The matching templates (all fields).'}, 'nextCursor': {'type': 'string', 'description': 'Cursor to pass to the next list_templates call.'}}, 'additionalProperties': False}
render_document
Generate Document
Generate a document by merging a Carbone template with JSON data. Two modes: (1) pass templateId to use a previously uploaded template; (2) pass template (file path, URL, or base64) to upload and render in a single request without storing a template. Supports output format conversion, multilingual rendering, currency conversion, batch generation, and advanced PDF options (watermark, password, PDF/A). Async mode: pass webhookUrl to render asynchronously — Carbone will POST the renderId to your URL when the document is ready. Async mode is required when using batch generation (batchSplitBy).
Lecture seule Accès externe Idempotent
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'data': {'anyOf': [{'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, {'type': 'array', 'items': {}}, {'type': 'string'}], 'description': 'JSON data merged into the template â\x80\x94 an object, or a top-level array (accessed with {d[i].field}). Access fields with {d.fieldName} tags. Nested objects: {d.customer.name}. Array loops: {d.items[i].description} â\x80¦ {d.items[i+1]}. Conditionals: {d.status == "active" ? "Yes" : "No"}. Optional â\x80\x94 if omitted, defaults to an empty object {} so the template is simply converted (tags resolve to empty). Useful to convert a stored template by templateId without data injection. Instead of inlining a large dataset, you may pass a STRING reference to the JSON: an HTTPS URL or a base64-encoded JSON string (local file paths are not accepted over HTTP) â\x80\x94 it is read and parsed server-side.'}, 'enum': {'anyOf': [{'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, {'type': 'string'}], 'description': 'Enumeration map used with the :convEnum(TYPE) formatter to translate code values into human-readable labels. Define one key per enum type; each value is an object mapping code â\x86\x92 label. Example: { "STATUS": { "1": "Active", "2": "Inactive", "3": "Pending" }, "ROLE": { "A": "Admin", "U": "User" } }. Template usage: {d.status:convEnum(STATUS)}, {d.role:convEnum(ROLE)}. May instead be passed by reference as a string â\x80\x94 an HTTPS URL or a base64-encoded JSON string (local file paths are not accepted over HTTP). Documentation: https://carbone.io/documentation.html#convenum-type-'}, 'lang': {'type': 'string', 'description': 'Locale of the generated document. Affects three things: (1) {t(key)} translation tags â\x80\x94 selects the matching translation from the translations map. (2) :formatN number formatter â\x80\x94 applies locale-specific thousand/decimal separators. (3) :formatC currency formatter â\x80\x94 applies locale-specific currency symbols and formatting. Format: BCP-47 lowercase, e.g. "fr-fr", "en-us", "de-de", "es-es", "pt-br", "zh-cn", "ja-jp". Full list: https://github.com/carboneio/carbone/blob/master/formatters/_locale.js'}, 'keepTags': {'type': 'boolean', 'description': 'If true, SKIP templating entirely and leave every Carbone tag in the document exactly as written â\x80\x94 {d.customer} comes out as the literal text "{d.customer}", formatters included. Use it to proof a stored template in another format (e.g. render templateId to PDF to check the tag layout), or to convert a template between formats while it stays a template. Mutually exclusive with data â\x80\x94 passing both is rejected, because data would have nothing to fill. Note the difference from omitting data: no data renders the template with an EMPTY dataset, so every tag resolves to an empty string; keepTags leaves the tags themselves in place. Requires Carbone 5.9.0+ (carbone-version: 5).'}, 'template': {'type': 'string', 'minLength': 1, 'description': 'Inline template for one-shot render without storing a template first. Two input forms are accepted: (1) HTTPS URL â\x80\x94 the file is downloaded automatically, e.g. "https://example.com/file.pptx". (2) Base64-encoded string â\x80\x94 the raw file content encoded as base64. Local file paths are NOT accepted â\x80\x94 this server is reached over HTTP, so a path would resolve on the server\'s disk rather than yours and is rejected. Upload the bytes as base64, or host the file at a URL. The template is uploaded and rendered in a single API request â\x80\x94 no Template ID is returned. Use this for ephemeral renders; use upload_template + templateId when you need to reuse the template. Supported formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, IDML, XML, Markdown (MD), PDF, and more. Mutually exclusive with templateId â\x80\x94 provide exactly one, never both.'}, 'timezone': {'type': 'string', 'description': 'IANA timezone used to convert dates in the rendered document. Default: "Europe/Paris". Applied when templates use the :formatD formatter, e.g. {d.date:formatD(YYYY-MM-DD HH:mm)}. Common values: "UTC", "America/New_York", "America/Los_Angeles", "Europe/London", "Europe/Paris", "Europe/Berlin", "Asia/Tokyo", "Asia/Shanghai", "Australia/Sydney". Full list (TZ identifier column): https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'}, 'convertTo': {'anyOf': [{'enum': ['pdf', 'docx', 'doc', 'xlsx', 'xls', 'pptx', 'ppt', 'odt', 'ods', 'odp', 'odg', 'html', 'xhtml', 'txt', 'csv', 'md', 'xml', 'rtf', 'png', 'jpg', 'jpeg', 'webp', 'svg', 'tiff', 'bmp', 'gif', 'zip', 'idml', 'epub', 'cdr'], 'type': 'string'}, {'type': 'object', 'required': ['formatName'], 'properties': {'formatName': {'enum': ['pdf', 'docx', 'doc', 'xlsx', 'xls', 'pptx', 'ppt', 'odt', 'ods', 'odp', 'odg', 'html', 'xhtml', 'txt', 'csv', 'md', 'xml', 'rtf', 'png', 'jpg', 'jpeg', 'webp', 'svg', 'tiff', 'bmp', 'gif', 'zip', 'idml', 'epub', 'cdr'], 'type': 'string', 'description': 'Target format name.'}, 'formatOptions': {'type': 'object', 'description': 'Advanced format options object. Examples by format: PDF â\x80\x94 { "EncryptFile": true, "DocumentOpenPassword": "secret", "DocumentPermissionPassword": "owner" } password-protect; PDF â\x80\x94 { "Watermarks": [{ "text": "DRAFT", "opacity": 0.2, "rotation": -45, "fontsize": 60 }] } up to 5 watermarks; PDF â\x80\x94 { "SelectPdfVersion": 1 } PDF/A-1b compliance (use 2 for PDF/A-2, 3 for PDF/A-3); PDF â\x80\x94 { "PageRange": "1-3,5" } export specific pages only; PDF â\x80\x94 { "ConvertSlideshow": true } convert each slide to a separate PDF page; Images (PNG/JPG/WEBP) â\x80\x94 { "Quality": 90 } compression quality 0-100; Images â\x80\x94 { "density": 150 } DPI for rasterisation (default 96); CSV â\x80\x94 { "fieldSeparator": ";" } custom column separator.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}}}], 'description': 'Output format. If omitted, the output matches the template format. Documents : "pdf", "docx", "xlsx", "pptx", "odt", "ods", "odp", "odg", "rtf", "epub". Web/text  : "html", "xhtml", "txt", "csv", "md", "xml", "idml". Images    : "png", "jpg", "jpeg", "webp", "svg", "tiff", "bmp", "gif". Archive   : "zip" (use with batchSplitBy for batch output). Simple usage: "pdf". Advanced usage: { "formatName": "pdf", "formatOptions": { ... } } for PDF-specific options.'}, 'converter': {'enum': ['L', 'C', 'O', 'I'], 'type': 'string', 'description': 'Converter engine. Only relevant when convertTo is "pdf" (or an image rasterised from a document). "L" â\x80\x94 LibreOffice (default): best all-round engine for DOCX, XLSX, PPTX, ODT, ODS, ODP. "O" â\x80\x94 OnlyOffice: highest fidelity for Microsoft Office formats (DOCX, XLSX, PPTX). "C" â\x80\x94 Chromium: best for HTML/CSS/JS templates â\x80\x94 full browser rendering. "I" â\x80\x94 Carbone ICE (Instant Converter Engine, Carbone 5.14.0+): DOCX â\x86\x92 PDF ONLY, no third-party converter â\x80\x94 up to 60x faster than LibreOffice on a 1000-page DOCX (3x on a one-page document). Any other input or output format is REJECTED â\x80\x94 use another converter for those. PDF options: only Watermarks are applied. EncryptFile, DocumentOpenPassword, RestrictPermissions and the other security options are SILENTLY IGNORED â\x80\x94 the PDF comes back readable by anyone, with no error â\x80\x94 so NEVER pick "I" when the request needs a password or restricted permissions; use "L" for those. Also unsupported: WEBP and EMF/WMF images, table of contents, SmartArt, complex charts, footnotes/endnotes, comments, tracked changes, form fields, equations, bookmarks and links; a missing font falls back to Noto Sans. If omitted, LibreOffice is used by default.'}, 'complement': {'anyOf': [{'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, {'type': 'string'}], 'description': 'Extra data object accessible in templates with {c.field} tags (as opposed to {d.field} for main data). Useful for static or shared values that should not be mixed into the main dataset: company info, logo URLs, footer text, configuration constants. Example: { "company": "Acme Corp", "address": "123 Main St", "vatNumber": "FR12345" }. Like data, may instead be passed by reference as a string â\x80\x94 an HTTPS URL or a base64-encoded JSON string (local file paths are not accepted over HTTP).'}, 'outputPath': {'type': 'string', 'description': "NOT AVAILABLE on this server, which is reached over HTTP: the generated document would be written to the server's disk instead of yours, so passing outputPath is rejected. Use asAttachment to receive the bytes, or returnLink for a one-time download URL. Ignored for async/webhook renders (no document is returned inline)."}, 'reportName': {'type': 'string', 'description': 'Filename (WITHOUT extension) for the generated document, returned in the Content-Disposition header. Carbone automatically appends the extension that matches convertTo, so do not include one â\x80\x94 passing "invoice.pdf" yields "invoice.pdf.pdf". Supports Carbone tags resolved against the data at render time. Examples: "invoice" (static), "{d.type}-{d.id}" (dynamic), "{d.client}-{d.date:formatD(YYYY-MM)}".'}, 'returnLink': {'type': 'boolean', 'description': 'If true, generate the document and return a public download URL instead of the file contents. The link is SHORT-LIVED and ONE-TIME â\x80\x94 Carbone deletes the file after the first download â\x80\x94 so it is meant for the end user to download once (do not fetch it programmatically). Works in stdio and HTTP. Mutually exclusive with outputPath, asAttachment, and webhookUrl (async).'}, 'templateId': {'type': 'string', 'minLength': 1, 'description': 'The ID of a previously uploaded template to render. Two ID formats are accepted: (1) Template ID (64-bit) â\x80\x94 stable identifier shared across versions; Carbone automatically uses the deployed version. (2) Version ID (SHA-256) â\x80\x94 pins rendering to a specific version regardless of deployment status. Both are returned by upload_template. Mutually exclusive with template â\x80\x94 provide exactly one, never both.'}, 'webhookUrl': {'type': 'string', 'format': 'uri', 'description': 'Webhook URL to enable asynchronous rendering. When provided, Carbone returns immediately and POSTs { "success": true, "data": { "renderId": "..." } } to this URL when the document is ready. The default render timeout is extended to 5 minutes on Carbone Cloud (vs 60 s for synchronous requests). Download the document with GET /render/:renderId once the webhook is received. Required when using batchSplitBy (batch generation is always asynchronous). Example: "https://your-server.com/carbone-webhook".'}, 'batchOutput': {'enum': ['zip', 'pdf'], 'type': 'string', 'description': 'How the batch result is packaged. Defaults to "zip". "zip" â\x80\x94 every generated document is bundled into a single ZIP archive (use batchReportName to name each entry). "pdf" â\x80\x94 all documents are CONCATENATED into one continuous PDF instead of being zipped; this requires convertTo to be "pdf" as well. Must be used together with batchSplitBy.'}, 'hardRefresh': {'type': 'boolean', 'description': 'If true, Carbone recomputes pagination and refreshes the table of contents after rendering. Requires convertTo to be defined. Use this for DOCX/ODT templates that contain a TOC field or cross-references that need updating after data injection.'}, 'variableStr': {'type': 'string', 'description': 'Carbone alias expressions evaluated once before rendering, available everywhere in the template. Used to pre-compute reusable values or shorten repetitive paths. Syntax: "{#aliasName = expression}". Example: "{#fullName = d.firstName + \\" \\" + d.lastName}{#total = d.price * d.qty}". Aliases are then used in the template as {#fullName}, {#total}. Documentation: https://carbone.io/documentation.html#alias'}, 'asAttachment': {'type': 'boolean', 'description': 'If true, return the document as a downloadable file attachment (a base64 EmbeddedResource), for any format. Default delivery: text and png/jpg/gif/webp are returned inline; other binary outputs (PDF, Office, â\x80¦) are saved to a temp file in stdio mode (path returned), or returned as an attachment in HTTP mode. Ignored when outputPath or returnLink is set.'}, 'batchSplitBy': {'type': 'string', 'description': 'JSON path to the array in your data that drives batch generation. One document is generated per element of the array. Two forms: "d" when data itself IS the array (one report per top-level element), or "d.arrayName" to split on a child array. Example: "d.invoices" â\x80\x94 produces one PDF per item in data.invoices. Example: "d.employees" â\x80\x94 produces one contract per employee. Carbone Cloud allows 1 to 100 objects per batch (on-premise follows the nbReportMaxPerBatch setting). Batch is ALWAYS asynchronous â\x80\x94 webhookUrl is required. Pair with batchOutput to choose ZIP or a single concatenated PDF, and batchReportName to name each document.'}, 'translations': {'anyOf': [{'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {'type': 'string'}}}, {'type': 'string'}], 'description': 'Translation map for multilingual documents. Requires "lang" to be set to select the active locale. Top-level keys are BCP-47 locale codes; values are key â\x86\x92 translated-string maps. Template usage: {t(greeting)} is replaced by the matching string for the active locale. Example: { "fr-fr": { "greeting": "Bonjour", "total": "Total" }, "en-us": { "greeting": "Hello", "total": "Total" } }. These dictionaries get large, so you may instead pass a string reference â\x80\x94 an HTTPS URL or a base64-encoded JSON string (local file paths are not accepted over HTTP). Documentation: https://carbone.io/documentation.html#translations'}, 'currencyRates': {'anyOf': [{'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {'type': 'number'}}, {'type': 'string'}], 'description': 'Exchange rate table used by :formatC for currency conversion. Keys are ISO 4217 currency codes; values are rates relative to a common base. The base currency should have rate 1. Example: { "EUR": 1, "USD": 1.08, "GBP": 0.86, "JPY": 160.5 }. May instead be passed by reference as a string â\x80\x94 an HTTPS URL or a base64-encoded JSON string (local file paths are not accepted over HTTP).'}, 'currencySource': {'type': 'string', 'description': 'ISO 4217 currency code of the monetary amounts in the JSON data. Used by the :formatC formatter as the conversion source. Must be set together with currencyTarget and currencyRates. Example: "EUR" if all prices in your data are in euros.'}, 'currencyTarget': {'type': 'string', 'description': 'ISO 4217 currency code of the output document. The :formatC formatter converts amounts from currencySource to this currency using currencyRates. Must be set together with currencySource and currencyRates. Example: "USD" to display prices in US dollars. Documentation: https://carbone.io/documentation.html#formatc-precisionorformat-'}, 'webhookHeaders': {'type': 'object', 'description': 'Custom headers Carbone will include when POSTing to your webhookUrl. Pass plain header names as keys â\x80\x94 the prefix "carbone-webhook-header-" is added automatically before sending to Carbone, and Carbone forwards the original header names to your webhook endpoint. Example: { "authorization": "my-secret", "custom-id": "12345", "custom-name": "Jane Doe" } â\x80\x94 Carbone will call your URL with headers: authorization: my-secret, custom-id: 12345, custom-name: Jane Doe. Requires webhookUrl to be set.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {'type': 'string'}}, 'batchReportName': {'type': 'string', 'description': 'Filename pattern for each individual document inside the batch ZIP. Supports Carbone tags. Tags are resolved against the item\'s data (relative path) or the full dataset (absolute path). Examples: "invoice-{d.id}.pdf", "{d.client.name}-{d.date}.docx". Carbone sanitises the result â\x80\x94 path separators, "..", Windows-forbidden and control characters each become an underscore â\x80\x94 and appends an index to duplicates ("report_1.pdf", "report_2.pdf"), so a pattern that resolves to the same name for several items will not silently drop documents. Only meaningful with batchOutput: "zip"; a concatenated "pdf" batch is a single file. Must be used together with batchSplitBy.'}, 'egressAuthorization': {'type': 'string', 'maxLength': 512, 'description': 'Value for the Authorization header Carbone adds to its OUTBOUND (egress) requests while rendering â\x80\x94 fetching external images ({d.imageUrl}), external PDFs (:appendFile / :attachFile), and calling webhooks. For example "Bearer abc123" or "my-secret" makes Carbone send `authorization: <value>` to those hosts. Only the authorization header can be customised; max 512 characters. For webhook calls specifically, webhookHeaders.authorization (if set) overrides this value.'}}}
update_template_metadata
Update Template Metadata
Update the metadata of a stored template: name, comment, category, tags, deployment timestamp, or expiration. Use deployedAt to activate a specific version for rendering. Use expireAt to schedule or trigger immediate deletion.
Accès externe Idempotent
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['templateId'], 'properties': {'id': {'type': 'string', 'description': 'Move this version under a DIFFERENT Template ID, re-parenting it so both share a version history. Pass the destination Template ID (64-bit). Leave unset to keep the version where it is â\x80\x94 this does not rename anything, use name for that.'}, 'name': {'type': 'string', 'description': 'New display name.'}, 'tags': {'type': 'array', 'items': {'type': 'string'}, 'description': 'New list of tags â\x80\x94 replaces existing tags entirely.'}, 'comment': {'type': 'string', 'description': 'New free-text comment.'}, 'category': {'type': 'string', 'description': 'New category.'}, 'expireAt': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'Unix timestamp (seconds) at which this template will be automatically deleted. Use 42000000000 to delete immediately.'}, 'deployedAt': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'Unix timestamp (seconds) to set as the deployment time for this version. Carbone picks the version with the most recent deployedAt when rendering. Use 42000000000 to deploy immediately (special "NOW" value).'}, 'templateId': {'type': 'string', 'minLength': 1, 'description': 'Template ID (64-bit) or Version ID (SHA-256) to update. Using a Template ID updates the metadata shared by all versions. Using a Version ID updates only that specific version.'}}}
upload_template
Upload Template
Upload and store a reusable Carbone template. Once uploaded, use render_document with the returned Template ID to generate documents from it. Supports versioning: multiple versions can live under a single stable Template ID, with deployedAt controlling which version is active. Accepted formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, IDML, XML, Markdown, PDF, and more.
Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['template', 'name'], 'properties': {'id': {'type': 'string', 'description': 'Existing Template ID (64-bit format) to add this upload to its version history. If omitted, a new Template ID is generated. Providing a Version ID (SHA-256) is not allowed and will cause an error.'}, 'name': {'type': 'string', 'minLength': 1, 'description': 'Display name for the template (e.g. "Invoice Template", "NDA Contract").'}, 'tags': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Tags for searchability and filtering (e.g. ["sales", "billing", "v2"]).'}, 'sample': {'type': 'array', 'items': {'type': 'object', 'required': ['data', 'complement', 'translations', 'enum'], 'properties': {'data': {'type': 'object', 'description': 'JSON dataset for {d.} tags.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'enum': {'type': 'object', 'description': 'Enumerations for :convEnum() formatter.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'complement': {'type': 'object', 'description': 'Extra data for {c.} tags.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'translations': {'type': 'object', 'description': 'Localization map for {t()} tags.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}}}, 'description': 'Sample input data attached to the template for testing in Carbone Studio. Each item must include data, complement, translations, and enum objects.'}, 'comment': {'type': 'string', 'description': 'Free-text comment to describe the template version or its purpose.'}, 'category': {'type': 'string', 'description': 'Group templates into folders/categories (e.g. "invoices", "legal", "hr").'}, 'expireAt': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'UTC Unix timestamp (seconds) at which this template will be automatically deleted. Use 42000000000 to delete immediately (special "NOW" sentinel value).'}, 'template': {'type': 'string', 'minLength': 1, 'description': 'The template file. Two input forms are accepted: (1) HTTPS URL â\x80\x94 the file is downloaded automatically, e.g. "https://example.com/file.pptx". (2) Base64-encoded string â\x80\x94 the raw file content encoded as base64. Local file paths are NOT accepted â\x80\x94 this server is reached over HTTP, so a path would resolve on the server\'s disk rather than yours and is rejected. Upload the bytes as base64, or host the file at a URL. Supported formats: DOCX, XLSX, PPTX, ODT, ODS, ODP, ODG, HTML, XHTML, IDML, XML, Markdown (MD), PDF, and more. Full list: https://carbone.io/documentation/developer/http-api/generate-reports.md'}, 'deployedAt': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'UTC Unix timestamp (seconds) to set as the deployment time for this version. Carbone uses the version with the most recent deployedAt when rendering via Template ID. Use 42000000000 to deploy immediately (special "NOW" sentinel value).'}, 'versioning': {'type': 'boolean', 'default': True, 'description': 'Enable template versioning (default: true). When true, a stable Template ID is generated and multiple versions can be managed under it. When false, behaves as legacy mode and returns only a templateId (SHA-256 hash).'}}}
Schéma de sortie
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['name'], 'properties': {'id': {'type': 'string', 'description': 'Stable Template ID (when versioning is enabled).'}, 'name': {'type': 'string', 'description': 'Template display name.'}, 'size': {'type': 'number', 'description': 'Template size in bytes.'}, 'type': {'type': 'string', 'description': 'Detected template file type.'}, 'versionId': {'type': 'string', 'description': 'Version ID (SHA-256) of this uploaded version.'}, 'templateId': {'type': 'string', 'description': 'Template ID returned in legacy/non-versioned mode.'}}, 'additionalProperties': False}
Ajouté
get_capabilities
17 September 2026 12:40
Ajouté
get_api_status
17 September 2026 12:40
Ajouté
download_template
17 September 2026 12:40
Ajouté
delete_template
17 September 2026 12:40
Ajouté
update_template_metadata
17 September 2026 12:40
Ajouté
upload_template
17 September 2026 12:40
Ajouté
list_tags
17 September 2026 12:40
Ajouté
list_categories
17 September 2026 12:40
Ajouté
render_document
17 September 2026 12:40
Ajouté
convert_document
17 September 2026 12:40
Ajouté
list_templates
17 September 2026 12:40