Developers

Documents

A small, stable HTTP API over your workspace's documents and extracted fields, plus signed webhooks for events.

Authentication

Create a key in the app under Integrations. Send it as a bearer token on every request.

curl https://pascalini.com/api/public/v1/documents \
  -H "Authorization: Bearer pf_live_your_key"

Keys are scoped to one workspace. Revoking a key takes effect immediately.

List documents

GET /api/public/v1/documents

  • limit — 1 to 100, default 25
  • status — filter by document status, e.g. approved
{
  "documents": [
    {
      "id": "b0f1…",
      "name": "Job sheet 4821.jpg",
      "status": "approved",
      "average_confidence": 0.94,
      "source": "upload",
      "created_at": "2026-09-11T09:12:04.000Z",
      "fields": [
        { "name": "engineer", "value": "M. Byrne", "type": "text",
          "confidence": 0.97, "page": 1, "valid": true }
      ]
    }
  ]
}

Each field's value is the human-corrected value when a reviewer changed it, otherwise the extracted value.

Webhooks

Add an endpoint under Integrations and choose which events to receive. Every delivery is signed so you can confirm it came from Formalini.

POST https://your-app.example.com/hooks/formalini
X-Formalini-Signature: sha256=<hex hmac of the raw body>

{ "event": "document.processed", "document_id": "b0f1…" }

Compute an HMAC-SHA256 of the raw request body using your endpoint secret and compare it to the header. Reject the request if they do not match. Failed deliveries are retried and every attempt appears in the delivery log.

Errors

  • 401 — missing, invalid or revoked API key
  • 500 — unexpected error; retry with backoff