Loops
Create a Loop
Changed onFiles a new Loop under the Reason, which must be one of the caller's own live Reasons (404 reason_not_found otherwise). Give what wakes it in wake_on. A Loop woken by events opens a Session per event; webhook events sharing an X-Webhook-Correlation-Key continue one Session.
A Loop with a webhook returns webhook.url and webhook.key in this response only; store the key now, it is never readable again. The workspace's plan and credits must be able to run the Loop's model (402 loop_model_not_fundable).
<sub>Scope: automations:write</sub>
post/v3/organizations/{orgId}/reasons/{reasonId}/loops
Request
- Base URLhttps://api.reasonmachines.com
- URLhttps://api.reasonmachines.com/v3/organizations/{orgId}/reasons/{reasonId}/loops
- AuthHTTP bearer
Request body
Example request
{
"wake_on": [
{
"schedule": "0 9 * * 1-5"
},
{
"webhook": {}
}
]
}Response
The new Loop, and its webhook's URL and key when it has one.
Changes
- info
endpoint added
- info