docubend
Documentation

Documentation

docubend turns Markdown, HTML, mermaid, an image or somebody else's PDF into a document you can render, annotate, put fields on and fetch back in six formats.

Start here#

Two calls put a PDF on your disk. The first makes a document from your Markdown; the second renders it.

curl
ID=$(curl -s https://docubend.com/api/v1/pdfs \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"Report","markdown":"# All green\n\n412 tests, 0 failures."}' \
  | jq -r .document.id)

curl -s https://docubend.com/api/v1/documents/$ID.pdf \
  -H "Authorization: Bearer $TOKEN" -o report.pdf
JavaScript
const made = await fetch(`${BASE}/api/v1/pdfs`, {
  method: "POST",
  headers: { Authorization: `Bearer ${TOKEN}`,
             "Content-Type": "application/json" },
  body: JSON.stringify({ title: "Report", markdown: "# All green" }),
});
const { document: doc } = await made.json();

const pdf = await fetch(doc.links.pdf,
  { headers: { Authorization: `Bearer ${TOKEN}` } });
Python
made = requests.post(f"{BASE}/api/v1/pdfs",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={"title": "Report", "markdown": "# All green"}, timeout=60)
doc = made.json()["document"]

pdf = requests.get(doc["links"]["pdf"],
    headers={"Authorization": f"Bearer {TOKEN}"}, timeout=60).content

The full quickstart takes it from having no credential to having a file, in about five minutes.

What it makes#

Everything you send becomes an ordinary docubend document, not an opaque blob in a bucket. It opens in the editor, takes annotations and diagrams, can be shared and searched, and keeps a version history — and .pdf is a rendering of it made when you ask, so it always matches the document as it stands.

SendToAnd get
MarkdownPOST /api/v1/pdfsReal selectable text — headings, lists, tables, links, images, quotes, code
HTMLPOST /api/v1/pdfsThe same closed vocabulary, if you already have HTML
A PNG or JPEGPOST /api/v1/pdfsOne page the size of the picture
Somebody else's PDFPOST /api/v1/pdfsImported page by page, still editable
mermaid flowchartPOST /api/v1/diagramsParsed and laid out — mermaid carries no coordinates
SVG, .drawio, VisioPOST /api/v1/diagramsRead into real shapes and connectors
A document modeleitherWhatever you built, as a document

Back out, on request: .pdf, .png, .svg, .json, .mmd and .drawio — plus an open link, which is not an API link at all and is the most useful one in the list.

What it does not do#

  • It will not make your wildest dreams come true. docubend helps you build, modify, and transform documents and as cool as that is, it won't grant wishes or create world peace.
  • It does not merge, compress, or convert to or from Word. Those are browser tools on this site and there is no endpoint behind them.
  • It does not guess a PDF password. A file that will not open without one needs the password, and there is no code path that tries.
  • It does not render a stylesheet. Markdown and HTML are set as a closed vocabulary in the standard PDF fonts — one column, no floats, no page-break control. If you need pixel control, a headless-browser service is the honest answer and this is not one.
  • There is no diagram type but flowchart. mermaid's sequence, class, state, gantt, pie, journey and mindmap diagrams are detected and refused by name, because turning a sequence diagram into loose rectangles produces something that looks like a diagram and means nothing.