Skip to content
Dynamite Docs logoDynamite Docs
The handoff
Source document: Requests and signed eventsAPI token. Document request. Signed webhook. Illustrative example, not extracted customer data.FROM SOURCE FILE TO A RESULT YOU CAN USESourcedocumentReview workspaceRequestsand signedevents1API token2Document request3Signed webhook
  1. 01API token
  2. 02Document request
  3. 03Signed webhook
Connect document data to your service. Illustrative example.
06Updated

Every extraction can be pulled into your own stack. Dynamite Docs exposes a REST API for exporting structured data, outbound webhooks that fire when an extraction completes, and a Google Sheets push so non-technical teammates can stay in the spreadsheet. Together they make Dynamite Docs an infrastructure layer with no lock-in. Bring your own AI keys, or use ours.

Prerequisites

  • Starter, Pro, or Scale plan (REST API keys and outbound webhooks enabled).
  • Public HTTPS endpoint with SSL/TLS certificate for receiving webhook payloads (10-second response timeout).
  • Valid session token or workspace account to mint API tokens.
1

Generate an API token

Open the [Webhooks & API] dialog from the workspace header. Click [Generate Key], assign a label (e.g. backend-pipeline), and copy the key (dd_live_...).

2

Register an outbound webhook endpoint

In the Webhooks section, click [Add Webhook Endpoint], paste your public HTTPS destination, and copy the secret HMAC key.

3

Trigger inference or export via API

Use POST /api/v1/infer to upload documents for extraction, or query GET /api/v1/extractions/:id/export using the Authorization: Bearer <key> header.

4

Verify webhook signatures

Validate incoming deliveries by computing HMAC-SHA256(secret, rawBody) and comparing against the X-Dynamite-Signature header.

Public API & API keys

The public API lives under /api/v1 and is authenticated with a scoped API key sent in either the Authorization: Bearer header or the X-API-Key header. Mint and manage keys anytime directly from the Webhooks & API panel in the workspace header. Scoped keys can list and export extractions, check usage, and submit documents for inference. File, settings, account, and billing changes still require your workspace session.

Create an API key via session or the workspace UI (/app?modal=webhooks)

curl -X POST -H "Authorization: Bearer <session-token>" \
  -H "Content-Type: application/json" \
  -d '{"name":"ci-pipeline"}' \
  https://app.dynamitedocs.com/api/tokens
  • Keys look like dd_live_<64 hex>; only their SHA-256 hash is stored, so a leaked database never exposes a working key.
  • Manage them with GET /api/tokens (list) and DELETE /api/tokens/:id (revoke) using your session token, or visually in the Webhooks & API modal.

1. Export an extraction (GET /api/v1/extractions/:id/export)

Request (Authorization: Bearer or X-API-Key)

# Standard Bearer authorization:
curl -H "Authorization: Bearer dd_live_<your-key>" \
  "https://app.dynamitedocs.com/api/v1/extractions/<id>/export?format=json"

# Or using the custom X-API-Key header:
curl -H "X-API-Key: dd_live_<your-key>" \
  "https://app.dynamitedocs.com/api/v1/extractions/<id>/export?format=csv"

Response (200 OK — application/json)

{
  "id": "ext_01j5x9b3",
  "fileId": "file_8829f0",
  "fileName": "vendor_invoice_1092.pdf",
  "docType": "Invoice",
  "label": "August Operations",
  "folderId": "fld_01h8q2",
  "isVirtual": false,
  "columns": ["Invoice Number", "Date", "Vendor", "Line Total", "Tax", "Amount Due"],
  "rows": [
    ["INV-1092", "2026-08-01", "Acme Industrial Ltd", "$1,250.00", "$100.00", "$1,350.00"]
  ],
  "metadata": {
    "vendor": "Acme Industrial Ltd",
    "invoice_number": "INV-1092",
    "total": "1350.00",
    "currency": "USD"
  },
  "confidence": 0.98,
  "fieldConfidence": { "Invoice Number": 0.99, "Amount Due": 0.98 },
  "summary": "Vendor invoice from Acme Industrial Ltd for precision CNC milling totaling $1,350.00.",
  "createdAt": "2026-08-15T09:12:00.000Z",
  "updatedAt": "2026-08-15T09:12:00.000Z"
}

2. Infer directly from a document (POST /api/v1/infer)

Request (multipart/form-data upload)

curl -X POST \
  -H "Authorization: Bearer dd_live_<your-key>" \
  -F "file=@invoice.pdf" \
  https://app.dynamitedocs.com/api/v1/infer

Response (200 OK — application/json)

{
  "id": "ext_99a8b7",
  "fileId": "file_77c2d1",
  "fileName": "invoice.pdf",
  "docType": "Invoice",
  "columns": ["Invoice #", "Vendor", "Due Date", "Total"],
  "rows": [
    ["INV-4410", "Apex Logistics", "2026-08-30", "$3,420.00"]
  ],
  "metadata": {
    "vendor": "Apex Logistics",
    "total": "3420.00",
    "currency": "USD"
  },
  "confidence": 0.97,
  "createdAt": "2026-08-22T14:10:00.000Z"
}

3. List extractions & check monthly usage

List extractions (paginated, filtered, sorted)

curl -H "Authorization: Bearer dd_live_<your-key>" \
  "https://app.dynamitedocs.com/api/v1/extractions?page=1&limit=20&sort=created_at&order=desc"

Check monthly API usage (GET /api/v1/usage — does not count against quota)

curl -H "Authorization: Bearer dd_live_<your-key>" \
  https://app.dynamitedocs.com/api/v1/usage

# Response:
{
  "usage": {
    "month": "2026-08",
    "calls": 42,
    "limit": 3500,
    "remaining": 3458,
    "unlimited": false
  }
}
  • Query params: page (default 1), limit (1–100, default 20), sort (created_at | updated_at | label | doc_type), order (asc | desc), doc_type (exact filter). Responses carry a pagination object with total, totalPages, and hasMore.
  • Formats: csv (default, with BOM for Excel), json, and xlsx.
  • Inference: POST /api/v1/infer uploads a document (multipart/file) and runs the same extraction engine as the app, returning the structured table in the response. It counts as one API call plus the document’s pages against your monthly processing budget; extractions persist and trigger webhooks for the key’s owner.
  • Status codes: 200 ok, 401 missing/invalid key, 404 not found, 429 rate limit or monthly quota exceeded. Errors are JSON with a stable code.
  • Limits: rate-limited per key (default 60/min) and metered against your monthly API-call allowance. Check it with GET /api/v1/usage (usage checks don’t count toward your allowance). Revoking a key takes effect on the very next request.

Webhooks

Outbound webhooks notify your endpoint when an extraction completes. No polling needed. Set them up from the Webhooks button in the app header. Up to 5 endpoints per account; only public HTTPS URLs are accepted.

  • Event: extraction.completed fires after every successful extraction, queue or standalone.
  • Signature: each POST carries an HMAC-SHA256 signature in the X-Dynamite-Signature header, computed over the raw body with your webhook secret. Verify it before trusting the payload.
  • Reliability: deliveries retry with exponential backoff and jitter on network errors, 429s, and 5xx (up to 3 attempts), with a 10-second timeout. Delivery status is visible in the app.

extraction.completed payload

{
  "event": "extraction.completed",
  "timestamp": "2026-08-13T12:00:00.000Z",
  "data": {
    "extractionId": "…",
    "fileId": "…",
    "docType": "Invoice",
    "columns": ["Invoice #", "Date", "Total"],
    "rows": [[…]],
    "metadata": {…},
    "confidence": 0.97
  }
}
Verify the signature: HMAC-SHA256(secret, rawBody).toString('hex') must equal X-Dynamite-Signature. Use the raw request body, not a re-stringified object.

Google Sheets push

Connect Google Sheets once from the app header, then push any extraction with one click from the Data Studio export menu. Each push lands on a fresh tab named after the document type, and a separate “Document Fields” tab carries the metadata. Pushes reuse your last-used spreadsheet and never overwrite earlier tabs.

Google Drive import & export

The Google Picker integration lets you select importable files from your Google Drive with multi-file selection, then streams only the files you choose into the normal upload pipeline. Completed extractions can be saved back to Drive as XLSX, CSV, or JSON files from the Data Studio export menu.

Google OAuth scopes: Google Drive import, Drive export, and Sheets push all use the non-sensitive, per-file drive.file permission. The Google Picker API securely lets you select specific files from your Drive without granting broad Drive read access.

Exact error messages & resolutions

401 Unauthorized: Invalid or missing API key

The provided token is malformed or revoked. Check the Authorization: Bearer header and generate a new key if needed.

429 Too Many Requests (Rate limit or monthly quota exceeded)

Rate limit is 60 requests per minute per key. Check usage statistics via GET /api/v1/usage or upgrade your plan allowance.

400 Bad Request: Only public HTTPS URLs are accepted for webhooks

Webhook endpoints must use HTTPS with a valid certificate. Localhost and raw IP addresses are rejected by SSRF filters.

Troubleshooting this task

Webhook signature mismatch: Compute the HMAC-SHA256 signature on the raw request body bytes before your web framework parses the body as JSON.

Retries triggering unexpectedly: Your endpoint must respond with a 2xx HTTP status code within 10 seconds. Return 200 immediately and process payloads in an asynchronous worker queue.

Developers: for the complete reference, including tokens, curl examples, payloads, and integration patterns, see the REST API integration guide.

Related workflows & guides

Dynamite Docs logoDynamite Docs
The review
Source document: Requests and signed eventsThe key-authenticated public API lives under /api/v1. A scoped key can list and export extractions, check usage, and submit a document for inference; file, settings, account, and billing changes still require a signed-in workspace session.. Export a completed extraction with GET /api/v1/extractions/:id/export?format=csv|json|xlsx, or submit a document with POST /api/v1/infer. Only the key's SHA-256 hash is stored.. Register up to 5 webhook endpoints per account; each extraction.completed POST carries an HMAC-SHA256 signature in the X-Dynamite-Signature header computed over the raw body.. Illustrative example, not extracted customer data.SOURCE DOCUMENTSource documentAPI tokenThe key-authenticated…Document requestExport a completed…Signed webhookRegister up to 5 webhook…Review before exportAPI tokenThe key-authenticatedpublic API lives unde…Compare with the source on the leftAccept after reviewConnect document data to yourservice.Original stays…
API token
The key-authenticated public API lives under /api/v1. A scoped key can list and export extractions, check usage, and submit a document for inference; file, settings, account, and billing changes still require a signed-in workspace session.
Document request
Export a completed extraction with GET /api/v1/extractions/:id/export?format=csv|json|xlsx, or submit a document with POST /api/v1/infer. Only the key's SHA-256 hash is stored.
Signed webhook
Register up to 5 webhook endpoints per account; each extraction.completed POST carries an HMAC-SHA256 signature in the X-Dynamite-Signature header computed over the raw body.
Connect document data to your service. Illustrative example.
API & webhooks document extraction guide: batch document processingTrack large document runs file by file.
API & webhooks document extraction guide: document extraction audit trailInspect the source, run status, and model used for a result.
API & webhooks document extraction guide: human-in-the-loop validationResolve flagged values before approving the extraction.
API & webhooks document extraction guide: Excel, CSV and JSON exportDownload reviewed data as CSV, Excel, or JSON.
Previous chapterExporting & sharingAll chaptersFull documentationNext chapterFolders & labels

Can we save optional cookies?

Essential cookies keep you signed in. With your permission, optional analytics cookies and masked session replays help us understand usage and diagnose errors. Privacy policy. Change your choice anytime in Cookie settings.