{"lexicon":1,"id":"money.atmosphere.segments.requestMessage","defs":{"main":{"type":"procedure","description":"Request a marketing message to a computed customer cohort. Requires a service-auth JWT signed by the app DID with lxm matching this NSID; scoped to originatorDid = iss. ATM never sends marketing email — it emits a customer.segment.message_requested webhook back to the app with the cohort member count.","input":{"encoding":"application/json","schema":{"type":"object","required":["segmentKey","messageType"],"properties":{"segmentKey":{"type":"string","knownValues":["at_risk_churn","high_value","lapsed"],"maxLength":32,"description":"Which computed cohort to message."},"environment":{"type":"string","knownValues":["test","live"],"maxLength":8,"description":"Which app environment to target. Defaults to live."},"messageType":{"type":"string","maxLength":64,"description":"App-defined opaque message identifier (e.g. a campaign id). Echoed back in the webhook."}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["memberCount","requestedAt"],"properties":{"memberCount":{"type":"integer","minimum":0,"description":"Number of cohort members at request time."},"requestedAt":{"type":"string","format":"datetime"}}}}}}}