Context
Automation that sends with hey compose --json currently gets a success envelope (ok / a short summary) and nothing that identifies the message that was just created. Scripts already know --to and --subject because they passed them in; they do not get thread_id / topic_id, an app_url, the resolved from, or created_at.
To attach a send to a later hey thread or hey reply, the only workaround is a second search (usually --to the same address) and hoping the newest hit is the one just sent. That is racy and extra API traffic.
Related: #446 asks for a pre-send dry-run of resolved recipients. This request is the post-send receipt.
No account-specific details below.
Ask
On a successful hey compose (and ideally hey reply) with --json / --quiet, return a stable receipt, for example:
thread_id / topic_id
message_id if that is a distinct object
app_url (and/or API url) for the thread
- resolved
from, to, cc, bcc
subject
created_at
On failure, keep a non-zero exit and include enough structured error to log without scraping stderr.
--ids-only after a send could print the new thread id.
Why it matters
Agent and campaign scripts need to write a complete send log in the same process as the send. A receipt makes that one step instead of compose + search + guess.
Context
Automation that sends with
hey compose --jsoncurrently gets a success envelope (ok/ a short summary) and nothing that identifies the message that was just created. Scripts already know--toand--subjectbecause they passed them in; they do not getthread_id/topic_id, anapp_url, the resolvedfrom, orcreated_at.To attach a send to a later
hey threadorhey reply, the only workaround is a second search (usually--tothe same address) and hoping the newest hit is the one just sent. That is racy and extra API traffic.Related: #446 asks for a pre-send dry-run of resolved recipients. This request is the post-send receipt.
No account-specific details below.
Ask
On a successful
hey compose(and ideallyhey reply) with--json/--quiet, return a stable receipt, for example:thread_id/topic_idmessage_idif that is a distinct objectapp_url(and/or API url) for the threadfrom,to,cc,bccsubjectcreated_atOn failure, keep a non-zero exit and include enough structured error to log without scraping stderr.
--ids-onlyafter a send could print the new thread id.Why it matters
Agent and campaign scripts need to write a complete send log in the same process as the send. A receipt makes that one step instead of compose + search + guess.