The webhook endpoint allows external systems to push document approval events into QualityDocD’s Node.js API. When an approval occurs in an upstream service — a DMS, an e-signature platform, or a CI pipeline — that service canDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/juescoryisus/QualityDocD/llms.txt
Use this file to discover all available pages before exploring further.
POST a structured payload to this endpoint so QualityDocD can react accordingly. The endpoint validates every incoming payload with a Zod schema and logs the event using the application’s pino logger.
POST /webhooks/document-approved
Receives a document approval event from an external service. The request body is validated synchronously; if validation passes the event is logged and{ received: true } is returned immediately.
Authentication: None required. This is an open endpoint intended for trusted internal services.
Request headers
Must be
application/json.Request body
The body is validated against theReceiveDocumentApprovedEventBody Zod schema. All four fields are required.
Numeric ID of the document that was approved. Must match an existing document record in QualityDocD.
Numeric ID of the specific document version that was approved.
Numeric ID of the company tenant the document belongs to.
ISO 8601 datetime string indicating when the approval occurred in the external system (e.g.
"2025-01-15T14:30:00Z").Response — 200 OK
Always
true when the payload passes validation and the event is logged successfully.Error responses
| Status | Meaning |
|---|---|
400 Bad Request | The request body failed Zod validation — one or more required fields are missing or have the wrong type. The response body includes a "error" string with the Zod message. |
Example
What happens after the event is received
Currently, a successfully validated event is logged only — no database write or downstream action is triggered automatically. The pino logger records the full payload at theinfo level:
Securing webhooks in production
Because the endpoint requires no authentication, it should never be exposed on a public interface without additional protection. Recommended approaches:- IP allowlist — Configure your reverse proxy or firewall to allow
POST /webhooks/*only from known source IP ranges of trusted services. - Private network — Place QualityDocD’s Node.js API in a private VPC or internal network segment that external traffic cannot reach directly.
- HMAC signature verification — Have the sending service attach an
X-Signatureheader (HMAC-SHA256 of the raw body using a shared secret) and verify it in middleware before the route handler runs. - mTLS — For high-security environments, require mutual TLS between the sending service and the API server.
GET /healthz
Returns the service health status. Used by Docker Compose health checks and uptime monitors. No authentication required. Authentication: None.Response — 200 OK
Always
"ok" when the service is running and able to handle requests.