Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.doczilla.app/llms.txt

Use this file to discover all available pages before exploring further.

Install

Download the Node.js SDK using your favorite package manager.
npm install @doczilla/node
The package needs to be configured with your organizations API key, which is available on your organizations settings page.

Usage

import Doczilla from '@doczilla/node'

const doczilla = new Doczilla('doczilla-...')

const pdfBuffer = await doczilla.pdf.direct({
  page: {
    html: '<div>Your first Doczilla PDF</div>'
  }
})

Webhook signing

Doczilla can optionally sign the webhook events it sends to your endpoint, allowing you to validate that they were not sent by a third party. You can read more about it here. Please note that you must pass the raw request body, exactly as received from Doczilla, to the verifyPayload() function; this will not work with a parsed (i.e., JSON) request body.
const event = doczilla.webhooks.verifyPayload(
  webhookRawBody,
  webhookDoczillaSignatureHeader,
  webhookSecret
)

Learn more

Examples Different API endpoint types