Back to Developers

PDF generation

Turn your templates and records into polished PDFs, on demand.

Overview

Generate documents — contracts, invoices, reports — from the PDF templates you design in the app and any record in your workspace.

One call renders the document under the service user's permissions and returns a ready-to-fetch download link.

Signing a document

What you can do

Template + record

Pick a template and a record id; the API merges them into a finished PDF.

Download link

The response includes a download URL on api.megorix.com you can fetch or store.

Permission-aware

Rendering reads the record under the key permissions — no data the user could not see.

Reference

Generate a PDF from a template and a record.

# Generate a PDF from a template and a record
curl -X POST https://api.megorix.com/pdf/generate \
  -H "Authorization: Bearer $MEGORIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "tpl_123",
    "moduleSlug": "hr",
    "entitySlug": "employees",
    "recordId": "<id>"
  }'

# → { "fileName": "...", "fileSize": 12345,
#     "downloadUrl": "https://api.megorix.com/files/download?path=..." }
Endpoints
POST
/pdf/generateRender a PDF from a template + record; returns a downloadUrl

Try it now

Open the interactive API reference and make your first call in minutes.

    PDF Generation — Megorix Developers | Megorix