Shablonix

Getting Started

Sign in, mint an API key, design a template, then POST a template ID and JSON.

Introduction

Shablonix generates PDFs from visual templates, and compiles email letters to inbox HTML. The public API is REST with API-key auth.

  • PDF generate

    POST /v1/generate with a template ID and JSON. Stream the file or take a job to poll.

  • Visual templates

    Design in the editor with Atoms, Format, and Inspect. Preview against sample JSON before anything ships.

  • HTTP first

    JSON in, PDF or HTML out. A TypeScript client lives in packages/sdk (examples/sdk-demo). You do not need an SDK.

  • Email plugin

    Mint an embed session from your backend. Compile with POST /v1/emails/compile. A React host example lives in examples/react-embed-demo. Compiled mail is not stored.

Quick Start

Get up and running with Shablonix API in just a few steps:

  1. 1

    Create an account

    Sign up at shablonix.online/sign-up to get your API credentials.

  2. 2

    Generate an API key

    Navigate to Settings → API Keys and create a new key.

  3. 3

    Make your first API call

    Use the code examples below to generate your first document.

Installation

Install our official SDK for your preferred language:

npm install @shablonix/sdk

No SDK Required

You can also use the API directly via HTTP requests. Our API follows REST conventions and accepts JSON payloads.

First API Call

Generate a PDF from a template ID and JSON. Use a real template ID from your dashboard. If account webhooks are configured, document.completed is still delivered when the file is ready.

import { Shablonix } from '@shablonix/sdk';

const client = new Shablonix(process.env.SHABLONIX_API_KEY!);

const pdf = await client.generatePdf({
  templateId: 'meridian-invoice',
  data: { invoice: { number: 'INV-2026-001' } },
});

const bytes = await client.downloadGenerationBytes(pdf);

Compile an email letter the same way. The response is HTML and text; compiled mail is not stored.

const letter = await client.compileEmail({
  templateId: 'cmEmailTemplateId',
  data: {
    customer: { name: 'Ada Lovelace' },
    invoice: { number: 'INV-2048', total: '€149.00' },
  },
});

await resend.emails.send({
  from: 'billing@your-app.example',
  to: 'ada@example.com',
  ...letter.providers.resend,
});

Next Steps

Now that you have made your first API call, explore these resources to learn more: