Quick Start Guide
This guide shows you how to integrate Parselyze into your application and automatically extract structured JSON from your documents.
This quick start covers the basic integration flow:
- Generate an API key
- Send a document to Parselyze
- Receive structured JSON
- Automate delivery with webhooks
Step 1: Generate an API Key
To authenticate your API requests:
- Log in
- Go to Dashboard → API Keys
- Generate a new API key
- Store it securely
See Authentication for more details.
Your API key authenticates every request to Parselyze. Keep it secret and store it securely.
Step 2: Send a Document to Parselyze
Parselyze supports two ways to process documents:
- Synchronous: receive the parsed JSON immediately
- Asynchronous: process in the background and retrieve the result later or via webhook
Recommended path:
- Use Synchronous API for simple integrations
- Use Asynchronous API + Webhooks for production workflows
Option A: Synchronous Processing
Use the synchronous endpoint when you need the parsed result immediately.
cURL
curl -X POST https://api.parselyze.com/documents/parse \
-H "x-api-key: YOUR_API_KEY" \
-F "files=@invoice.pdf" \
-F "templateId=YOUR_TEMPLATE_ID"
NodeJS
npm install parselyze
import { Parselyze } from "parselyze";
const parselyze = new Parselyze("plz_xxxxxxxx...xxxxxx");
const result = await parselyze.documents.parse({
files: ["./invoice.pdf"],
templateId: "<YOUR_TEMPLATE_ID>",
});
console.log("Parsing complete:", result);
See Synchronous Processing for more details.
Option B: Asynchronous Processing
Use asynchronous processing when you want background jobs, polling, or webhook delivery.
cURL
curl -X POST https://api.parselyze.com/v1/documents/parse/async \
-H "x-api-key: YOUR_API_KEY" \
-F "file=@invoice.pdf" \
-F "templateId=YOUR_TEMPLATE_ID"
NodeJS
import { Parselyze } from "parselyze";
const parselyze = new Parselyze(process.env.PARSELYZE_API_KEY);
const job = await parselyze.documents.parseAsync({
file: "./large_document.pdf",
templateId: "YOUR_TEMPLATE_ID"
});
console.log(`Job submitted: ${job.jobId}`);
Example response:
{
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"message": "Document submitted for processing.",
"createdAt": "2026-03-31T10:30:00Z"
}
See Asynchronous Processing for more details.
Step 3: Choose How to Receive Results
Synchronous Response
The synchronous endpoint returns the extracted JSON directly in the response.
Example:
{
"result": {
"invoice": {
"number": "INV-2025-001",
"date": "2025-05-26",
"total": 1250.75,
"vendor": "Acme Corporation"
}
},
"pageCount": 1,
"pageUsed": 1,
"pageRemaining": 999
}
You can use this structured output directly in your backend, workflows, or downstream integrations.
Asynchronous Job
After submitting an async job, you can poll the job endpoint:
cURL
curl -X GET https://api.parselyze.com/v1/jobs/550e8400-e29b-41d4-a716-446655440000 \
-H "x-api-key: YOUR_API_KEY"
NodeJS
import { Parselyze } from "parselyze";
const parselyze = new Parselyze(process.env.PARSELYZE_API_KEY);
const { result, status } = await parselyze.jobs.get(job.jobId);
console.log(`Job ${status}, result:`, result);
Once the job is complete, the response includes the parsed JSON result.
For production workflows, webhooks are recommended to avoid polling.
See Asynchronous Processing for more details.
Step 4: Receive Results via Webhook
Webhooks are the recommended way to handle asynchronous jobs in production.
Instead of polling for async job completion, you can configure a webhook endpoint in your dashboard.
When parsing finishes, Parselyze sends the extracted JSON directly to your backend.
This lets your backend receive parsed results automatically as soon as processing completes.
See Webhooks.
Common Variations
Multiple Files
The synchronous endpoint accepts multiple files in one request.
This feature requires a paid plan.
curl -X POST https://api.parselyze.com/documents/parse \
-H "x-api-key: YOUR_API_KEY" \
-F "files=@page-1.jpg" \
-F "files=@page-2.jpg" \
-F "templateId=YOUR_TEMPLATE_ID"
ZIP Archive
You can upload a ZIP archive to the synchronous endpoint.
Multi-document ZIP processing requires a paid plan.
curl -X POST https://api.parselyze.com/documents/parse \
-H "x-api-key: YOUR_API_KEY" \
-F "files=@documents.zip" \
-F "templateId=YOUR_TEMPLATE_ID"
Important Notes
- The async API accepts one file per job
- The sync API accepts up to 10 files per request
- Free plans do not support multi-file sync requests
- Scanned PDFs over 30 pages are not supported yet
See Document Processing Overview for details.
Next Steps
Now that your first integration is working:
- Configure Webhooks for async automation
- Review Error Handling
- Learn how to build better templates in the Template Tutorial
You are now ready to automate document parsing in your application.