DocuForge logoDocuForge

API-Dokumentation

Baue PDF-Workflows mit einer vorhersehbaren API.

Die Referenz für DocuForge-Endpunkte, Authentifizierung und Fehlerbehandlung. Alles bleibt nahe an der Konsole, damit dein mentales Modell konsistent bleibt.

Überblick

DocuForge stellt eine REST-API für Authentifizierung, Vorlagenverwaltung, Rendering, Assets, Abrechnung und KI-gestützte Änderungen bereit. Alle geschützten Endpunkte benötigen ein JWT im Authorization-Header.

Typisierte Antworten

Jeder Endpunkt liefert ein stabiles Schema und ein konsistentes Fehlerobjekt.

Authentifizierung

Produktive Renderings nutzen API-Keys: sende den Key im X-API-Key-Header an /v1/render.

X-API-Key: docu_live_your_api_key

Schnellstart

Render a production PDF from a published template ID and JSON data.

curl -X POST "$DOCUFORGE_API_URL/v1/render" \
  -H "X-API-Key: $DOCUFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "template_id": "tpl_live_123", "data": { "invoice_id": "1234" } }' \
  --output document.pdf

Rendering

Production rendering endpoints are available under the consumer API surface.

POST /v1/render

Rendert ein veröffentlichtes Template mit X-API-Key. Gibt ein PDF-Blob zurück.

Fehler

Die API liefert JSON-Fehler mit stabilem Format. Nutze den Fehlercode zur UI-Zuordnung.

401 unauthorized

Missing or invalid API key.

402 payment_required

Planlimit erreicht. Upgrade vorschlagen.

429 rate_limited

Zurückoffen und nach der angegebenen Verzögerung erneut versuchen.

500 internal_error

Unerwarteter Fehler. Erneut versuchen oder Support kontaktieren.

Sicherheit und Governance

DocuForge liefert praxistaugliche Standards fur Authentifizierung, Request-Sicherheit und Webhook-Integritat.

  • TLS transport, authenticated APIs, and hardened defaults help teams clear security reviews without custom hardening projects.
  • Password-protected PDF delivery is built in for regulated workflows handling sensitive documents.
  • Credential and token handling defaults are designed to reduce leakage risk across render, billing, and webhook paths.
  • JWT and API-key auth paths are isolated by endpoint intent.
  • Stripe webhook signatures are verified before billing events are processed.
  • Outbound webhooks are signed with HMAC SHA-256 and retried with backoff.
  • Webhook URL creation enforces HTTPS in production.
  • Plan-aware rate limiting protects render, preview, and AI endpoints.
  • Validation middleware enforces request schemas with predictable error payloads.
  • Auth, billing, usage, and render mutation routes are explicitly non-cacheable.
  • MCP server access requires bearer token auth and optional allowed-origin checks.

MCP-Integration

Verbinde DocuForge mit MCP-Clients, um PDFs uber Tool-Calls und strukturierte Workflows zu erzeugen.

MCP Schnellstart

Endpoint: https://mcp.docuforge.app/mcp

Auth: Bearer token

Header: Authorization: Bearer <MCP_SERVER_TOKEN>

Zentrale MCP-Tools

  • docuforge_get_usage
  • docuforge_list_templates
  • docuforge_get_template
  • docuforge_render_pdf
  • docuforge_render_preview_pdf

Bereit zu starten?

Öffne die Konsole, um PDFs zu shippen, oder gehe zurück zur Landing Page.