message.delivered fires when a message your agent sent reaches Delivered.
Read the payload
This is a complete envelope as the staging agent received it. Thedata object is the MessageEvent schema from the API contract; the fields around it are the same on every event and are described in the event catalog. Route on event_type, deduplicate on event_id, and keep trace_id for support:
captured-output
Handle the event
Delivered means Relay accepted and stored the message; it says nothing about whether the person has seen it. Usedelivered_at to update a status you show, and ignore the event if you show none. Read the receipt rules before you build anything on it.

