Programmable Messaging API · View 12 of 22 · Data
Decisions
- receipt.attempt_id is nullable on purpose: a receipt that correlates to nothing is kept as evidence rather than discarded as noise.
- message_state is a projection keyed by message, not a column on message, so no receipt can update truth in place.
- client_reference is unique per tenant, which makes idempotency a schema property rather than application discipline.
Assumptions
- Destinations are stored as hashes outside the body store so that consent can be evaluated without reading content.
- One rated usage event per attempt, carrying the route and segment count that produced the charge.
Deliberate omissions
- Template, media and campaign entities, and the tenant-credential tables; they do not change the shape of the lifecycle.