Developer API

Automate document extraction from your own systems.

Use DataEntryLM API keys to upload files, run extraction, fetch clean structured results, and send webhook events back to your workflow.

Quick start

Production access starts with scoped service accounts.

1. Create a service account

Open Developers in your workspace, create one service account per workload, and choose the exact scopes it needs.

2. Create an API key

Create a key under that service account. Copy the key once and store it in your secret manager.

3. Upload and extract

Upload a PDF or image, start an extraction job, then poll the run until the result is ready.

4. Use webhooks for automation

Add a webhook endpoint when your system should receive extraction completion and failure events.

Authentication

Send the API key as a bearer token.

API keys belong to a workspace service account. Rotate a key from Developers when a secret is exposed or when your rotation policy requires it.

curl https://api.dataentrylm.com/v1/extractions \
  -H "Authorization: Bearer <DATAENTRYLM_API_KEY>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: extract-invoice-001" \
  -d '{"documentId":"doc_123"}'

Endpoints

Stable `/v1` routes for extraction and webhook automation.

Files

POST/v1/filesCreate a direct upload target for a file.

Extractions

POST/v1/extractionsStart extraction for an uploaded or existing document.
GET/v1/extractions/{runId}Read job status.
GET/v1/extractions/{runId}/resultRead extracted data after completion.
POST/v1/extractions/{runId}/cancelCancel a queued or running job.

Webhooks

GET/v1/webhook-endpointsList webhook endpoints.
POST/v1/webhook-endpointsCreate an endpoint and receive a signing secret.
PATCH/v1/webhook-endpoints/{id}Update URL, status, or subscribed events.
POST/v1/webhook-endpoints/{id}/rotate-secretRotate the signing secret.
DELETE/v1/webhook-endpoints/{id}Delete an endpoint.
GET/v1/webhook-eventsList recent outbound webhook events.
POST/v1/webhook-events/{id}/replayReplay an eligible event.

Examples

Upload a file, start extraction, then read the result.

const apiKey = process.env.DATAENTRYLM_API_KEY;

const file = await fetch("https://api.dataentrylm.com/v1/files", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    filename: "invoice.pdf",
    contentType: "application/pdf",
    sizeBytes: 184203,
  }),
}).then((res) => res.json());

await fetch(file.uploadUrl, {
  method: "PUT",
  headers: { "Content-Type": "application/pdf" },
  body: pdfBuffer,
});
const run = await fetch("https://api.dataentrylm.com/v1/extractions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
    "Idempotency-Key": "invoice-001",
  },
  body: JSON.stringify({ fileId: file.fileId }),
}).then((res) => res.json());

const result = await fetch(
  `https://api.dataentrylm.com/v1/extractions/${run.id}/result`,
  { headers: { Authorization: `Bearer ${apiKey}` } },
).then((res) => res.json());

Limits

Extraction API request and page limits follow the workspace plan. The Developers page shows current usage.

Idempotency

Send an Idempotency-Key on create and replay actions so retries do not create duplicate work.

Webhooks

Verify signatures with the endpoint signing secret and use event replay when a receiver is temporarily down.