Documentation
Automate AI document extraction with APIs and webhooks
Scoped API keys and signed completion events
Dynamite Docs- 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.
Dynamite Docs- 01API token
- 02Document request
- 03Signed webhook
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.
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_...).
Register an outbound webhook endpoint
In the Webhooks section, click [Add Webhook Endpoint], paste your public HTTPS destination, and copy the secret HMAC key.
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.
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 apaginationobject with total, totalPages, and hasMore. - Formats:
csv(default, with BOM for Excel),json, andxlsx. - 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:
200ok,401missing/invalid key,404not found,429rate limit or monthly quota exceeded. Errors are JSON with a stablecode. - 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.completedfires after every successful extraction, queue or standalone. - Signature: each POST carries an HMAC-SHA256 signature in the
X-Dynamite-Signatureheader, 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
}
}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.
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 keyThe 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 webhooksWebhook 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.
Related workflows & guides
- Read endpoint specifications, authentication patterns, and cURL snippets in theREST API integration overview.
- Configure custom LLM endpoints and BYOK credentials inAI keys and provider setup.
- Review API token hashing and payload encryption practices insecurity and encryption standards.
Dynamite Docs- 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.