Wisedocs can notify your system when work finishes, so you do not need to poll the API. Each event is an HTTPS POST with a JSON body to an endpoint you provide.
| Event | Sent when |
|---|---|
file.processed | A file finishes processing, with status COMPLETED or ERROR. |
case.completed | Every file in an upload batch processed successfully and the case is completed. |
export.completed | An export produced by an automated processing rule finishes (COMPLETED) or fails (FAILED). |
The API reference documents each event's payload and headers.
Webhooks are configured by Wisedocs for your workspace. Provide:
- An
https://endpoint URL on a public host. Plainhttp, IP addresses in private ranges, and hosts that resolve to private addresses are rejected. - The event types you want to receive. Events you do not subscribe to are not sent.
- At least one way to authenticate deliveries: an HTTP Basic credential, a signing secret, or both. Wisedocs sends no events until one is configured.
- Optionally, extra headers to include on every request.
Every event shares the same envelope:
{
"id": "5b8e3f40-ac6d-5e9f-b021-3c4d5e6f7081",
"type": "case.completed",
"createdAt": "2026-11-23T10:16:02Z",
"tenant": "acme",
"data": {
"caseUuid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"lastUploadDate": "2026-11-23T10:02:11Z",
"batchId": "9ee18c53-2d4a-5b6c-8e7f-0a1b2c3d4e5f"
}
}Timestamps are UTC with second precision and a Z suffix. Payloads carry identifiers and statuses only: call the API to read case or file details.
Each request includes these headers:
| Header | Value |
|---|---|
Content-Type | application/json |
User-Agent | Wisedocs-Webhooks/1.0 |
X-Wisedocs-Event-Id | The event's id |
X-Wisedocs-Event-Type | The event's type |
X-Wisedocs-Delivery-Attempt | Attempt number, starting at 1 |
Authorization | Basic …, when an HTTP Basic credential is configured. It replaces any Authorization in your extra headers. |
X-Wisedocs-Signature | t=<unix seconds>,v1=<hex>, when a signing secret is configured |
v1 is the hex HMAC-SHA256 of <t>.<raw request body>, keyed with your signing secret. Compute it over the raw bytes you received, before parsing the JSON, and reject requests whose t is more than a few minutes from your clock to block replays. t changes on every attempt.
import hashlib
import hmac
import time
def verify(secret: str, body: bytes, header: str, tolerance_seconds: int = 300) -> bool:
try:
fields = dict(part.split("=", 1) for part in header.split(","))
timestamp, provided = int(fields["t"]), fields["v1"]
except (KeyError, ValueError):
return False
if abs(time.time() - timestamp) > tolerance_seconds:
return False
expected = hmac.new(secret.encode(), f"{timestamp}.".encode() + body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, provided)Wisedocs shows the signing secret once, when it is created. When the secret is rotated, the old one stops working immediately.
Respond with any 2xx status within 10 seconds to acknowledge an event. Do slow work after responding.
| Your response | What Wisedocs does |
|---|---|
2xx | Delivered. |
5xx, 408, 429, timeout, or connection error | Retries with exponential backoff, starting at 10 seconds and doubling up to 1 hour between attempts, for up to 24 hours. A Retry-After header in seconds sets the next delay. |
Any other 4xx, or a redirect (3xx) | Fails permanently. Redirects are not followed. |
Delivery is at least once: the same event can arrive more than once, for example when your 2xx response is lost. id is the same on every attempt and on any resend of the same occurrence, so store it and ignore events you have already processed.
Events can arrive out of order when some are retried. Use batchId and lastUploadDate to tell upload batches apart: every case.completed and export.completed from the same batch shares one batchId, and a later upload to the case starts a new batch.
A case.completed or export.completed still waiting to be retried is dropped if the case receives a newer upload in the meantime, so an older batch never arrives after a newer one has started.
export.completed with status: "COMPLETED" includes download.url, a presigned link to the file, with download.expiresAt and download.contentType. Each attempt gets a new link, valid for two hours by default. Download the file promptly and treat the URL as a secret: anyone holding it can download the export.
Only exports that a processing rule produces automatically send this event. Exports a user starts in Wisedocs do not. reportUuid is present when the export includes a report.