DocuForge logoDocuForge

Documentazione API

Crea workflow PDF con un’API prevedibile.

La fonte ufficiale per endpoint DocuForge, autenticazione ed errori. Tutto resta coerente con la console per un modello mentale semplice.

Panoramica

DocuForge espone una REST API per autenticazione, gestione template, rendering, asset, billing e modifiche assistite da IA. Gli endpoint protetti richiedono un JWT nell’header Authorization.

Risposte tipizzate

Ogni endpoint restituisce uno schema stabile e un oggetto errore coerente.

Autenticazione

I render in produzione usano le API key: invia la chiave nell’header X-API-Key verso /v1/render.

X-API-Key: docu_live_your_api_key

Avvio rapido

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

Renderizza un template pubblicato con X-API-Key. Restituisce un blob PDF.

Errori

L’API restituisce errori JSON con formato stabile. Usa il codice errore per lo stato UI.

401 unauthorized

Missing or invalid API key.

402 payment_required

Limite del piano raggiunto. Suggerisci un upgrade.

429 rate_limited

Attendi e riprova dopo il delay indicato.

500 internal_error

Errore imprevisto. Riprova o contatta il supporto.

Sicurezza e governance

DocuForge offre impostazioni pratiche per autenticazione, sicurezza delle richieste e integrita webhook.

  • 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.

Integrazione MCP

Collega DocuForge ai client MCP per generare PDF tramite tool call e workflow strutturati.

Avvio rapido MCP

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

Auth: Bearer token

Header: Authorization: Bearer <MCP_SERVER_TOKEN>

Strumenti MCP principali

  • docuforge_get_usage
  • docuforge_list_templates
  • docuforge_get_template
  • docuforge_render_pdf
  • docuforge_render_preview_pdf

Pronto a costruire?

Apri la console per pubblicare PDF, oppure torna alla landing per rivedere la piattaforma.