---
title: "Document Completion Digest"
method: POST
path: "/api/webhooks/document-digest"
tags: ["Webhooks"]
---

# Document Completion Digest

`POST /api/webhooks/document-digest`

## Request

- Base URL: `https://api.flagpost.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.flagpost.ai/api/webhooks/document-digest`
- Auth: none declared

Send combined digest emails for document processing (success + failures).

Called every 5 minutes by Cloud Scheduler.
Finds documents where:
- SUCCESS: all processing fields set, email not sent
- FAILURE: >30 min old, any processing field NULL, email not sent

Groups by (advisory, business, uploader) and sends one combined email.
Only includes non-system sources (excludes generated reports, logos, etc.).

## Headers

- `x-webhook-secret` string, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/flagpost/apis/flagpost-api.md) - [All operations](https://skmtc.dev/flagpost/apis/flagpost-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flagpost/apis/flagpost-api/revisions/0308cef485ca?raw)
