← MediVerify AI

API reference

REST + JSON. Create a key in Settings → API & webhooks and send it as Authorization: Bearer mv_live_…. Limited to 120 requests/minute per key; documents count toward your plan's monthly quota.

Typical flow

  1. Import your client dataset (POST /clients).
  2. Create a batch, then for each file: reserve → PUT the bytes → confirm.
  3. Poll GET /batches/{id} or wait for the batch.completed webhook.
  4. Read GET /documents/{id} or generate an export.

Batches

POST /api/v1/batches

Create a batch.

{ "name": "June claims" }

GET /api/v1/batches

List batches.

GET /api/v1/batches/{id}

Status, counts, per-document status and errors.

Client dataset

POST /api/v1/clients?mode=append|replace

Import the prefilled dataset as JSON or a raw text/csv body. Recognised columns: name, DoB, DoA, MRN, account number, member ID, aliases.

{ "clients": [{ "name": "Jane Doe", "dob": "1990-07-04", "doa": "2023-11-20", "mrn": "MRN1001", "aliases": "Jane Smith; J. Doe" }] }

Documents

POST /api/v1/documents/upload-url

Reserve a document and get a one-time signed upload URL.

{ "batchId": "…", "fileName": "bill.pdf", "mimeType": "application/pdf", "size": 120394 }

PUT {upload.url}

Send the raw file bytes to the signed URL (PDF, JPG, PNG, TIFF; max 25 MB).

POST /api/v1/documents

Confirm the upload; OCR + matching run in the background (202).

{ "batchId": "…", "documentId": "…" }

GET /api/v1/documents/{id}

Extracted fields (with confidence and page), client match and mismatch flags.

Exports

POST /api/v1/exports

Generate an export and receive a time-boxed (1 hour) signed URL.

{ "batchId": "…", "format": "xlsx|csv|json", "mismatchTypes": ["dob_mismatch"] }

GET /api/v1/exports/{id}

Fresh signed URL for an export (kept for 7 days).

Webhooks

POST /api/v1/webhooks

Register an HTTPS callback for batch.completed. The signing secret is returned once.

{ "url": "https://example.com/hook", "events": ["batch.completed"] }

GET /api/v1/webhooks

List webhooks.

DELETE /api/v1/webhooks/{id}

Remove a webhook.

Webhook signatures

Each delivery carries X-MediVerify-Timestamp and X-MediVerify-Signature: sha256=<hex>, where the hex value is HMAC_SHA256(secret, timestamp + "." + rawBody). Reject requests whose timestamp is more than five minutes old.

Errors

Errors are { "error": { "code", "message" } } with the usual statuses: 400 invalid input, 401 bad key, 402 quota reached, 404 not found, 409 conflict, 413 too large, 429 rate limited.