Batch restoration is live

Learn more
API

Restore documents from your own systems

The same pipeline the consoles use, driven from your side. Jobs carry the same guarantees: held regions never pass through an engine, every treatment is revertible, and withheld values come back separated from empty ones.

Authentication
curl https://api.docovly.com/v1/jobs \
  -H "Authorization: Bearer $DOCOVLY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"console":"certificates"}'

Keys are issued per account and scoped to it. Every request is billed against the same point ledger as the consoles.

Endpoints

Six calls cover a complete job

Create the job with its condition survey, add pages, hold what must not be touched, run treatments, read the captured fields, export.

POST/v1/jobsCreate a job

Opens a restoration job against a console and document type, and assigns it to a collection.

{
  "console": "certificates",
  "documentType": "degree-certificate",
  "collection": "col_8fa1",
  "survey": {
    "storage": ["water-tide-lines", "foxing"],
    "handling": ["roll-creases"],
    "paperTone": "cream"
  }
}
POST/v1/jobs/{id}/pagesAdd pages

Uploads pages to a job. PDFs are rasterised at 200 DPI keeping page geometry; photographs are stored byte-for-byte.

{
  "source": "upload",
  "files": ["file_2a91", "file_2a92"]
}
POST/v1/jobs/{id}/holdsHold a region

Excludes a region - a seal, a signature, a stamp - from every treatment. It is composited back from the original afterwards.

{
  "page": 1,
  "region": { "x": 0.71, "y": 0.68, "w": 0.18, "h": 0.16 },
  "label": "registrar-seal"
}
POST/v1/jobs/{id}/treatmentsRun a treatment

Applies a treatment to one page or to the whole document. Each run lands as its own revertible version.

{
  "treatment": "full-restoration",
  "scope": "document"
}
GET/v1/jobs/{id}/captureRead captured fields

Returns captured fields with confidence, source crop and verification state. Withheld values are separated from empty ones.

{
  "fields": [
    { "key": "holder", "value": "M. E. Ashcombe", "confidence": 0.97, "verified": true },
    { "key": "certificateNo", "value": "K-4471-882", "confidence": 0.99, "verified": true },
    { "key": "registrar", "value": null, "withheld": "low-confidence" }
  ]
}
GET/v1/jobs/{id}/exportExport the job

Returns the restored files, the untouched original, every version, and captured fields as CSV with a withheld column.

{
  "restored": "https://.../restored.zip",
  "original": "https://.../original.zip",
  "csv": "https://.../captured.csv"
}

Errors are plain language

Engine failures are translated before they leave the server. You get a reason a person can act on, not a stack trace from a provider.

Providers stay server-side

Models, instructions and per-run costs are never exposed through the API, for the same reason they are never exposed in the console.

Per-page isolation applies

A page that fails does so alone, with its own status. Retry the page rather than the job.

API access is issued per account

Tell us what you are integrating with and roughly what volume you expect, and we will get you a key and a sandbox job to test against.

Request access

Put your worst document in first

Not the easy one. The faded, torn, water-marked one you assumed was gone. Free to start, no card, and the original is never overwritten.