Dev.to
7/25/2026

Put Health-Data Access Behind a Consent-Receipt API
Short summary
A proposed consent-receipt API pattern where bounded authority versions travel from UI through policy checks to every worker job, preventing stale-authorization writes after disconnection. It defines a minimal REST contract with asynchronous revocation (202 response), a state machine separating source blocking from derivations handling, and a failure-mode test table. The design is an unexecuted application pattern, not documentation of ChatGPT's actual APIs.
- •Consent receipts carry grant version and purpose to every worker, checked immediately before reads or writes
- •Revocation returns 202 with operation ID and state machine: ACTIVE through REVOKE_REQUESTED to COMPLETE or PARTIAL_FAILURE
- •Failure table covers double revokes, old tab reconnects, in-flight imports, connector timeouts, and receipt scope changes
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



