Queues
Document families: automation, workload and assignment.
SLA clocks#
Per queue: the SLA target and the calendar its clock counts in (null = 24/7), plus those calendars — enough to show "due in 3 business hours".
/api/v2/business-calendars/slaRequires documents:read.
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/business-calendars/sla" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"policies": {"key": {"slaMinutes": 1,"calendarId": "clx9k2m4p0001qh8z3v7d5f2a"}},"calendars": {"key": {"name": "Invoices","timeZone": "timeZone","week": [[{"start": 1,"end": 1}]],"presets": ["us_federal"],"exceptions": [{"date": "date","name": "Invoices","hours": []}],"id": "clx9k2m4p0001qh8z3v7d5f2a","isDefault": false,"updatedAt": "2026-10-01T12:00:00.000Z"}}}
List queues#
With document counts and the active schema summary. Narrowed to queues the caller can read.
/api/v2/queuesRequires queues:read on the queue it touches.queue-scoped
Query parameters
includeArchivedboolean
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/queues" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"queues": [{"id": "clx9k2m4p0001qh8z3v7d5f2a","name": "Invoices","slug": "invoices","description": "Supplier invoices from the accounts payable mailbox.","color": "indigo","automation": "never","threshold": 0.9,"splitting": false,"classification": false,"activeSchemaId": "clx9k2m4p0001qh8z3v7d5f2a","settings": {},"archivedAt": null,"createdAt": "2026-10-01T12:00:00.000Z","updatedAt": "2026-10-01T12:00:00.000Z","stats": {"total": 1,"needsReview": 1,"processing": 1,"failed": 1,"approved7d": 1,"avgConfidence": 0.91,"sources": 1,"destinations": 1,"rules": 1},"schema": {"id": "clx9k2m4p0001qh8z3v7d5f2a","version": 1,"fieldCount": 1,"documentType": "invoice"}}]}
Create a queue#
From a template (templateId) or your own fields.
/api/v2/queuesRequires queues:create.
Body
application/jsonnamestringrequireddescriptionstring | nullcolorstringtemplateIdstringfieldsFieldDef[]instructionsstringdocumentTypestringautomation"never" | "confident" | "always"thresholdnumber
Responses
OK
curl -X POST "https://docuflow.pendral.io/api/v2/queues" \-H "Authorization: Bearer $DOCUFLOW_API_KEY" \-H "Content-Type: application/json" \-d '{"name": "Invoices","description": "Supplier invoices from the accounts payable mailbox.","color": "indigo","instructions": "Dates are day-first. The total is the amount due, not the subtotal.","documentType": "invoice","threshold": 0.9}'
{"queue": {"id": "clx9k2m4p0001qh8z3v7d5f2a","name": "Invoices","slug": "invoices","description": "Supplier invoices from the accounts payable mailbox.","color": "indigo","automation": "never","threshold": 0.9,"splitting": false,"classification": false,"activeSchemaId": "clx9k2m4p0001qh8z3v7d5f2a","settings": {},"archivedAt": null,"createdAt": "2026-10-01T12:00:00.000Z","updatedAt": "2026-10-01T12:00:00.000Z","activeSchema": {"id": "clx9k2m4p0001qh8z3v7d5f2a","version": 1,"name": "Invoices","fields": [{"key": "invoiceNumber","label": "Invoice number","type": "string","description": "Supplier invoices from the accounts payable mailbox.","required": false,"options": [],"children": [],"itemType": "string","pattern": "pattern","min": 1,"max": 1,"format": "format","examples": [],"enrich": {"dataset": "dataset","keyPath": "keyPath","column": "column","mode": "exact"}}],"instructions": "Dates are day-first. The total is the amount due, not the subtotal.","documentType": "invoice"}}}
Get a queue#
Get a queue
/api/v2/queues/{id}Requires queues:read on the queue it touches.queue-scoped
Path parameters
idstringrequired- Queue id.
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/queues/{id}" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"queue": {"id": "clx9k2m4p0001qh8z3v7d5f2a","name": "Invoices","slug": "invoices","description": "Supplier invoices from the accounts payable mailbox.","color": "indigo","automation": "never","threshold": 0.9,"splitting": false,"classification": false,"activeSchemaId": "clx9k2m4p0001qh8z3v7d5f2a","settings": {},"archivedAt": null,"createdAt": "2026-10-01T12:00:00.000Z","updatedAt": "2026-10-01T12:00:00.000Z","activeSchema": {"id": "clx9k2m4p0001qh8z3v7d5f2a","version": 1,"name": "Invoices","fields": [{"key": "invoiceNumber","label": "Invoice number","type": "string","description": "Supplier invoices from the accounts payable mailbox.","required": false,"options": [],"children": [],"itemType": "string","pattern": "pattern","min": 1,"max": 1,"format": "format","examples": [],"enrich": {"dataset": "dataset","keyPath": "keyPath","column": "column","mode": "exact"}}],"instructions": "Dates are day-first. The total is the amount due, not the subtotal.","documentType": "invoice"}}}
Update a queue#
Name, automation, threshold, splitting, classification, OCR mode, model tier, assignment and SLA settings.
/api/v2/queues/{id}Requires queues:configure on the queue it touches.queue-scoped
Path parameters
idstringrequired- Queue id.
Body
application/jsonnamestringdescriptionstring | nullcolorstring | nulliconstring | nullautomation"never" | "confident" | "always"thresholdnumbersplittingbooleanclassificationbooleanocrMode"auto" | "always" | "never"modelTier"fast" | "accurate"verifyWithSecondModelbooleansettingsRecord<string, any>slaMinutesinteger | nullslaBusinessHoursbooleanslaTimezonestringslaCalendarIdstring | nullassignmentMode"manual" | "round_robin" | "least_loaded"assignmentOnlyNeedsReviewboolean
Responses
OK
curl -X PATCH "https://docuflow.pendral.io/api/v2/queues/{id}" \-H "Authorization: Bearer $DOCUFLOW_API_KEY" \-H "Content-Type: application/json" \-d '{"name": "Invoices","description": "Supplier invoices from the accounts payable mailbox.","color": "indigo","threshold": 0.9}'
{"queue": {"id": "clx9k2m4p0001qh8z3v7d5f2a","name": "Invoices","slug": "invoices","description": "Supplier invoices from the accounts payable mailbox.","color": "indigo","automation": "never","threshold": 0.9,"splitting": false,"classification": false,"activeSchemaId": "clx9k2m4p0001qh8z3v7d5f2a","settings": {},"archivedAt": null,"createdAt": "2026-10-01T12:00:00.000Z","updatedAt": "2026-10-01T12:00:00.000Z","activeSchema": {"id": "clx9k2m4p0001qh8z3v7d5f2a","version": 1,"name": "Invoices","fields": [{"key": "invoiceNumber","label": "Invoice number","type": "string","description": "Supplier invoices from the accounts payable mailbox.","required": false,"options": [],"children": [],"itemType": "string","pattern": "pattern","min": 1,"max": 1,"format": "format","examples": [],"enrich": {"dataset": "dataset","keyPath": "keyPath","column": "column","mode": "exact"}}],"instructions": "Dates are day-first. The total is the amount due, not the subtotal.","documentType": "invoice"}}}
Delete a queue#
Delete a queue
/api/v2/queues/{id}Requires queues:delete on the queue it touches.queue-scoped
Path parameters
idstringrequired- Queue id.
Responses
OK
curl -X DELETE "https://docuflow.pendral.io/api/v2/queues/{id}" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"ok": true}
Archive or unarchive#
Archive or unarchive
/api/v2/queues/{id}/archiveRequires queues:configure on the queue it touches.queue-scoped
Path parameters
idstringrequired- Queue id.
Body
application/jsonarchivedboolean- Default
true
Responses
OK
curl -X POST "https://docuflow.pendral.io/api/v2/queues/{id}/archive" \-H "Authorization: Bearer $DOCUFLOW_API_KEY" \-H "Content-Type: application/json" \-d '{}'
{"queue": {"id": "clx9k2m4p0001qh8z3v7d5f2a","name": "Invoices","slug": "invoices","description": "Supplier invoices from the accounts payable mailbox.","color": "indigo","automation": "never","threshold": 0.9,"splitting": false,"classification": false,"activeSchemaId": "clx9k2m4p0001qh8z3v7d5f2a","settings": {},"archivedAt": null,"createdAt": "2026-10-01T12:00:00.000Z","updatedAt": "2026-10-01T12:00:00.000Z"}}
Queue overview#
Stats, recent documents and per-field accuracy with trend.
/api/v2/queues/{id}/overviewRequires queues:read on the queue it touches.queue-scoped
Path parameters
idstringrequired- Queue id.
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/queues/{id}/overview" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"queue": {"id": "clx9k2m4p0001qh8z3v7d5f2a","name": "Invoices","slug": "invoices","description": "Supplier invoices from the accounts payable mailbox.","color": "indigo","automation": "never","threshold": 0.9,"splitting": false,"classification": false,"activeSchemaId": "clx9k2m4p0001qh8z3v7d5f2a","settings": {},"archivedAt": null,"createdAt": "2026-10-01T12:00:00.000Z","updatedAt": "2026-10-01T12:00:00.000Z","activeSchema": {"id": "clx9k2m4p0001qh8z3v7d5f2a","version": 1,"name": "Invoices","fields": [{"key": "invoiceNumber","label": "Invoice number","type": "string","description": "Supplier invoices from the accounts payable mailbox.","required": false,"options": [],"children": [],"itemType": "string","pattern": "pattern","min": 1,"max": 1,"format": "format","examples": [],"enrich": {"dataset": "dataset","keyPath": "keyPath","column": "column","mode": "exact"}}],"instructions": "Dates are day-first. The total is the amount due, not the subtotal.","documentType": "invoice"}},"stats": {"total": 1,"needsReview": 1,"processing": 1,"failed": 1,"autoApproveRate": 1,"avgConfidence": 0.91,"medianProcessingMs": 1},"recent": [{"id": "clx9k2m4p0001qh8z3v7d5f2a","name": "Invoices","status": "received","createdAt": "2026-10-01T12:00:00.000Z"}],"accuracy": [{"path": "invoiceTotal","total": 1,"edited": 1,"accuracy": 1}],"accuracyTrend": {}}
Reviewer workload#
Eligible reviewers with open, overdue and oldest assigned work, plus the queue's assignment and SLA settings.
/api/v2/queues/{id}/workloadRequires queues:read on the queue it touches.queue-scoped
Path parameters
idstringrequired- Queue id.
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/queues/{id}/workload" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"rows": [{"userId": "clx9k2m4p0001qh8z3v7d5f2a","name": "Invoices","email": "ada@example.com","image": null,"eligible": false,"open": 1,"overdue": 1,"oldestAt": "2026-10-01T12:00:00.000Z","workspaceOpen": 1}],"unassigned": 1,"eligibleCount": 1,"mode": "mode","onlyNeedsReview": false,"slaMinutes": 1,"slaBusinessHours": false}
Processed documents in a queue#
The latest 50 with pages (for generating a schema from a sample).
/api/v2/queues/{id}/documentsRequires documents:read on the queue it touches.queue-scoped
Path parameters
idstringrequired- Queue id.
Responses
OK
curl -X GET "https://docuflow.pendral.io/api/v2/queues/{id}/documents" \-H "Authorization: Bearer $DOCUFLOW_API_KEY"
{"documents": [{"id": "clx9k2m4p0001qh8z3v7d5f2a","name": "invoice-1042.pdf","status": "received","pageCount": 2,"createdAt": "2026-10-01T12:00:00.000Z"}]}