Craftkitdocs

Welcome

What Craftkit is, who it's for, and how the pieces fit.

Documents, crafted. Build a template once, expose it as a typed REST API, a signed inbound webhook, or an embeddable form, and render PDFs in milliseconds.

Craftkit is a developer toolkit for generating documents. You design a template visually with merge fields, then ship it through whichever surface fits the integration: a typed REST endpoint at /v1/templates/<slug>/render, an HMAC-signed inbound webhook URL, an embeddable builder for your customers, or a drop-in form for end-users to fill. Send the data, get a PDF back, with delivery webhooks, storage, version pinning, and dashboards out of the box.

Quick Start

The fastest path to a rendered PDF is the REST API. Three steps: create a template in the dashboard, mint an API key, render against it.

curl

curl -X POST https://api.craftkit.dev/v1/templates/invoice/render \
  -H "Authorization: Bearer $CRAFTKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": {"customer": {"name": "Acme Corp"}}}'

Node.js

const res = await fetch('https://api.craftkit.dev/v1/templates/invoice/render', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.CRAFTKIT_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ data: { customer: { name: 'Acme Corp' } } }),
});
const { id, pollUrl } = await res.json();

Python

import os, requests

res = requests.post(
    "https://api.craftkit.dev/v1/templates/invoice/render",
    headers={"Authorization": f"Bearer {os.environ['CRAFTKIT_API_KEY']}"},
    json={"data": {"customer": {"name": "Acme Corp"}}},
)
job = res.json()

The full walkthrough lives in Quickstart.

What's in the docs

Section Covers
Get started Quickstart and the mental model behind templates, versions, variables, and renders.
REST API Authentication, the render endpoint, polling, the inbound webhook, and the error envelope.
Embed Drop the Craftkit builder or form into your own SaaS — theming, JWT, postMessage, the host SDK, the variable catalog.
Architecture How the pieces fit together: data model, render pipeline, tenancy.

Pick a path

Explore the docs