Send an event to a Loop (key in the URL)
Changed onDelivers an event to the Loop whose webhook this is. A Loop with a webhook wakes on each accepted event: the event opens a Session of its Reason, or continues the Session of earlier events with the same correlation key. The webhook URL and its key come back once, from the createReasonLoop (or updateReasonLoop) call that adds the webhook.
This form carries the key as the URL's last path segment, for a sender that only takes a URL. Prefer the bearer header or a signature where the sender allows one: a URL is easier to leak.
A retry with the same event id is answered 202 with duplicate: true and is not queued again. A paused or deleted Loop refuses events (409 automation_disabled).
<sub>Auth: the Loop's webhook key (bearer, body signature, or URL segment) only; API keys are not accepted</sub>
Request
- Base URLhttps://api.reasonmachines.com
- URLhttps://api.reasonmachines.com/webhooks/automations/{publicToken}/{key}
- Authnone required
Headers
Events with the same key continue one Session; without it (or a key in the body) each event opens its own.
The sender's id for the event; a retry with the same id is answered as a duplicate and queued once. Without one (or an id in the body), every POST is a new event.
Which system sent the event, shown with it.
For a sender you write: hex HMAC-SHA256 of the exact body bytes, keyed with the Loop's webhook key (or its signing secret), optionally prefixed sha256=. X-Signature is read the same way.
Request body
Response
Accepted, or a duplicate of an event already accepted.
Changes
- info
endpoint added
- info