Document Proofing Quickstart

This quickstart covers uploading a document, triggering a proof job, polling for completion, reading chunks, and retrieving a signed receipt/proofpack.

Required environment variables

  • VAULTCRUX_API_URL
  • VAULTCRUX_API_KEY
  • VAULTCRUX_TENANT_ID

1) Upload a document

curl -sS "$VAULTCRUX_API_URL/v1/ingest" \
  -H "content-type: application/json" \
  -H "x-tenant-id: $VAULTCRUX_TENANT_ID" \
  -H "x-api-key: $VAULTCRUX_API_KEY" \
  -d '{
    "doc_id": "report-2026-q1",
    "content": "Quarterly revenue reached $4.2M, up 18% year-over-year...",
    "mime_type": "text/plain",
    "metadata": {"source": "finance", "quarter": "2026-Q1"}
  }'

The response includes a job_id. Wait for ingestion to complete before proofing.

2) Trigger a proof job

Via MCP:

curl -sS "$VAULTCRUX_API_URL/rpc" \
  -H "content-type: application/json" \
  -H "x-tenant-id: $VAULTCRUX_TENANT_ID" \
  -H "x-api-key: $VAULTCRUX_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "id": "proof-1",
    "method": "proof_document",
    "params": {"doc_id": "report-2026-q1"}
  }'

Or directly via REST:

curl -sS -X POST "$VAULTCRUX_API_URL/v1/proof/jobs" \
  -H "content-type: application/json" \
  -H "x-tenant-id: $VAULTCRUX_TENANT_ID" \
  -H "x-api-key: $VAULTCRUX_API_KEY" \
  -d '{"doc_id": "report-2026-q1"}'

Both return a proof_job_id.

3) Poll job status

curl -sS "$VAULTCRUX_API_URL/v1/proof/jobs/$PROOF_JOB_ID" \
  -H "x-tenant-id: $VAULTCRUX_TENANT_ID" \
  -H "x-api-key: $VAULTCRUX_API_KEY"

Poll until status is completed. Expected states: queuedprocessingcompleted (or failed).

4) Read proof chunks

curl -sS "$VAULTCRUX_API_URL/v1/proof/jobs/$PROOF_JOB_ID/chunks" \
  -H "x-tenant-id: $VAULTCRUX_TENANT_ID" \
  -H "x-api-key: $VAULTCRUX_API_KEY"

Returns the chunk lineage used to construct the proof: chunk IDs, content hashes, and evidence provenance.

5) Retrieve the receipt and proofpack

curl -sS "$VAULTCRUX_API_URL/v1/proof/receipts/$RECEIPT_ID/proofpack" \
  -H "x-tenant-id: $VAULTCRUX_TENANT_ID" \
  -H "x-api-key: $VAULTCRUX_API_KEY"

The receipt_id is included in the completed job response. The proofpack is a signed payload suitable for audit archival and independent replay.