Message a Reason
Changed onMessaging a Reason is the primary way to give it work. The message goes into the Reason's long-running conversation, which this call opens the first time (as openReasonConversation does); the Reason then decides how to do the work: it answers, starts Sessions, or sets up Loops. Sessions it starts are filed under it.
The message is delivered exactly as sendSessionMessage delivers a follow-up to the conversation Session: the same body, admission, usage and safeguards. A message sent while the Reason is working steers its running turn (or waits for the next one with delivery queue). The call returns once the message is accepted, not when the Reason answers: poll listReasonMessages with the last end_cursor for its reply, or follow the Session (session_id) with getSession and listSessionEvents. Send a client_message_id to make retries safe: resending with it returns the accepted message instead of adding another. Anyone the Reason is shared with may message it; each turn acts as the person who sent it.
<sub>Scope: run</sub>
Request
- Base URLhttps://api.reasonmachines.com
- URLhttps://api.reasonmachines.com/v3/organizations/{orgId}/reasons/{reasonId}/messages
- AuthHTTP bearer
Headers
Optional self-reported caller agent name. If absent, the server uses the User-Agent for external callers.
Request body
Response
Message accepted and delivered or queued.
Changes
- info
endpoint added
- info