Skip to main content

Seal a vault

Sealing a vault marks work as complete. After sealing:
  • No further documents, files, or events can be written
  • The SSE event stream closes, signalling to subscribers that the job is done
  • The vault enters a read-only state while its TTL continues to count down

Sealing via vaultMiddleware

When using vaultMiddleware, call vault.seal() before responding:

Sealing via API

Parameters

What sealing triggers

When a vault is sealed, Prudra fires a vault.sealed webhook to all registered webhook URLs:
Use this webhook to notify your users that results are ready, or to trigger downstream processing.

Sealing before the job finishes

If your handler responds before work is complete (e.g., streaming results asynchronously), do not seal immediately. Seal only when all writes are done: