> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/connectors/catalog/docs-knowledge/carbone.md). Agents can also search and read this documentation through its [MCP server](https://docs.fastn.ai/~gitbook/mcp).

# Carbone

Carbone generates reports from document templates. Manage templates and render them with your data into PDF and Office files.

![Carbone logo](https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-dbeb10c52540025f8e4e371c5ac9064f5ec5707d%2Fcarbone.png?alt=media)

|                    |                                                                                  |
| ------------------ | -------------------------------------------------------------------------------- |
| **Category**       | [Docs and knowledge](https://docs.fastn.ai/connectors/catalog/docs-knowledge.md) |
| **Website**        | [carbone.io](https://carbone.io)                                                 |
| **Authentication** | API key                                                                          |
| **Slug**           | `carbone`                                                                        |
| **On fastn.ai**    | [Embed Carbone in your product](https://fastn.ai/integrations/carbone)           |

## Setup

Your customers enter their API key for Carbone when they connect. Nothing else needs setting up.

## Connect in Fastn

Your customers connect Carbone from your widget. To connect an account yourself:

1. Go to **Build → Integrations → Connectors** and search for **Carbone**.
2. Select **Connect** on the Carbone card.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-586dd03cdc0c6904263f58928d7a531eae2f85df%2Fconnect-search.png?alt=media" alt="The Connectors page in Fastn with ServiceNow typed in the search box and the ServiceNow card showing a Connect button"><figcaption><p>Search for the connector, then select Connect on its card. ServiceNow is shown here.</p></figcaption></figure>
3. Fill in the fields the form asks for, using the values from [Setup](#setup) above. Then select **Connect**.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-51fb88ef328c525b5b11f8d7094bab11efc333b8%2Fconnect-credentials.png?alt=media" alt="The Connect ServiceNow dialog with an optional account name and the Instance, Username and Password fields, and Cancel and Connect buttons"><figcaption><p>A connect form that asks for credentials. Each connector asks for its own fields.</p></figcaption></figure>
4. Check that the connection appears under **Operate → Connections** with the status `Active`. Your workflows can now use Carbone's actions.

For more detail, see [Connect an app](https://docs.fastn.ai/build/integrations/connectors/connect-an-app.md).

## Actions

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Delete Template</td><td><code>deleteTemplate</code></td><td>Deletes a template and all of its versions when given a Template ID, or a single version when given a Version ID. Internally sets expireAt to now: the template immediately stops being listed, downloadable and renderable, and the file is purged after the storage retention delay.</td></tr><tr><td>Download Generated Report</td><td><code>downloadGeneratedReport</code></td><td>Fetches the document produced by a render, using the renderId returned by a render action. The file stream is returned. SECURITY NOTE: Carbone serves this route WITHOUT authentication - anyone holding the renderId can download the document from https://api.carbone.io/render/{renderId}. The renderId is single-use and expires after one hour; the document is deleted as soon as it is downloaded, so a second call</td></tr><tr><td>Download Template</td><td><code>downloadTemplate</code></td><td>Downloads the stored template file as a stream. Accepts either a Template ID (returns the latest deployed version) or a Version ID (returns that exact version). Returns the raw file bytes, not JSON.</td></tr><tr><td>Download Template Data Sample</td><td><code>downloadTemplateDataSample</code></td><td>Downloads the JSON data sample attached to a template or template version, used by Carbone Studio for testing. Hits</td></tr><tr><td>Get Account Info</td><td><code>getAccountInfo</code></td><td>Returns the account identity behind the API token: email, role and token type (test or production). Undocumented but live endpoint. Useful to verify a stored credential and to tell a test token (30-day template retention, watermarked output) from a production token.</td></tr><tr><td>Get API Status</td><td><code>getApiStatus</code></td><td>Health check for the Carbone API. Returns the running Carbone engine version. This is the only endpoint besides Download Generated Report that does not require authentication.</td></tr><tr><td>List Template Categories</td><td><code>listTemplateCategories</code></td><td>Returns every category name used by deployed templates, sorted alphabetically. Categories act like folders for grouping templates.</td></tr><tr><td>List Template Tags</td><td><code>listTemplateTags</code></td><td>Returns every tag used by deployed templates, sorted alphabetically. Tags are free-form labels attached to a template at upload or patch time.</td></tr><tr><td>List Templates</td><td><code>listTemplates</code></td><td>Lists templates stored in Carbone template storage with their metadata (id, versionId, name, category, tags, size, type, timestamps, origin). Supports fuzzy search on name, exact match on id/versionId, category and origin filters, cursor pagination.</td></tr><tr><td>Render Report Asynchronously To Webhook</td><td><code>renderReportAsyncToWebhook</code></td><td>Asynchronous render: same route, but with the carbone-webhook-url header set, so Carbone answers immediately and POSTs {"success":true,"data":{"renderId":"..."}} to your URL once the document is ready. Raises the render timeout from 60 seconds to 5 minutes and is the only way to use batch processing (batchSplitBy). This is Carbone's ONLY event mechanism - there is no webhook subscription API, the callback URL is supplied per render.</td></tr></tbody></table>

<details>

<summary>View 4 more actions</summary>

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Render Report From Inline Template</td><td><code>renderReportFromInlineTemplate</code></td><td>One-shot render or file conversion without uploading a template first: the source file is passed as a base64 string in the 'template' body field and is never stored. Hits This is the endpoint behind Carbone's document conversion use cases (HTML to PDF, DOCX to PDF, XLSX to CSV, MD to DOCX, PDF to image). Set download=true to get the generated file back directly.</td></tr><tr><td>Render Report From Stored Template</td><td><code>renderReportFromStoredTemplate</code></td><td>Merges a stored template (by Template ID or Version ID) with a JSON dataset and generates a document, optionally converting it to PDF, DOCX, XLSX, CSV, HTML, JPG or PNG. With download=false (default) it returns a renderId to fetch with Download Generated Report; with download=true it streams the generated file directly and stores nothing.</td></tr><tr><td>Update Template Metadata</td><td><code>updateTemplateMetadata</code></td><td>Patches the metadata of a stored template or template version: name, comment, tags, category, deployedAt, expireAt, and the owning Template ID. Does not replace the file itself - upload a new version with Upload Template for that. Returns versionId plus the fields that were sent.</td></tr><tr><td>Upload Template</td><td><code>uploadTemplate</code></td><td>Uploads a DOCX/XLSX/PPTX/ODT/ODS/HTML/MD/TXT template to Carbone template storage and returns its templateId (and versionId when versioning is enabled). The file is sent as a base64 string in the 'template' field (pure base64 or a base64 data-URI) - the JSON route, not multipart. Optional metadata: name, comment, tags, category, sample, deployedAt, expireAt, origin, versioning, id.</td></tr></tbody></table>

</details>

## Events

Start a workflow when one of these happens, with an [app event trigger](https://docs.fastn.ai/build/integrations/triggers.md).

<table><thead><tr><th width="240">Event</th><th width="260">Id</th><th>When it fires</th></tr></thead><tbody><tr><td>Report Rendered</td><td><code>report.rendered</code></td><td>Fires when Carbone finishes an asynchronous render. Carbone has NO webhook subscription API - the callback URL is supplied per render, so there is nothing for Fastn to register and nothing to unsubscribe. SETUP (per render, not once): copy this trigger's Fastn webhook URL, then call the 'Render Report Asynchronously To Webhook' action with carboneWebhookUrl set to that URL (Carbone sends it as the carbone-webhook-url request header). Optionally set carboneWebhookHeaderAuthorization to a shared secret, which Carbone sends back as the authorization header on the callback. Carbone then POSTs {"success":true,"data":{"renderId":"..."}} with User-Agent: Carbone, and retries once on 408/429/502/503/504/521/522/524 or a socket error (16s request timeout). Pass the renderId to 'Download Generated Report'; it is single-use and expires after one hour. The payload carries NO account identifier and NO event-type discriminator - report.rendered is the only event Carbone emits - so there is no eventKey and no mappedTo account filter; routing is inherent because the callback URL is per trigger.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/connectors/catalog/docs-knowledge/carbone.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
