Automations API
Create and manage automations programmatically, with the list of triggers and actions.
Automations API
An automation runs an action when something happens in VerifyWise: a vendor is added, a risk is updated, a policy is deleted and so on. You can create and manage automations through the REST API as well as in the app, which is useful for provisioning the same rules across environments from a script.
How a rule is shaped
An automation links one trigger to one or more actions. Each piece is identified by an id you look up from the discovery endpoints below.
- Trigger: The event that starts the automation, identified by a triggerId.
- Actions: What to do when the trigger fires. Each action has an action_type_id and a params object holding its configuration, such as the email recipients and body.
Discover triggers and actions
Before creating a rule, fetch the available triggers and the actions each trigger supports. Both return the standard envelope with the list in data.
| Method & path | Returns |
|---|---|
| GET /api/automations/triggers | The trigger types you can use, each with its id, key and label. |
| GET /api/automations/actions/by-triggerId/:triggerId | The actions available for a given trigger. |
curl "http://localhost:3000/api/automations/triggers" \
-H "Authorization: Bearer <your-token>"Create, update and delete
| Method & path | Description |
|---|---|
| GET /api/automations | List the automations in your organization. |
| GET /api/automations/:id | Fetch one automation. |
| POST /api/automations | Create an automation. |
| PUT /api/automations/:id | Update an automation (trigger, name, actions, active state). |
| DELETE /api/automations/:id | Delete an automation. |
| GET /api/automations/:id/history | The execution history for an automation. |
| GET /api/automations/:id/stats | Execution stats for an automation. |
Creating an automation
Send the triggerId, a name and a non-empty actions array. Each action carries its action_type_id and a params object. The top-level params is a JSON string for automation-level settings.
curl -X POST "http://localhost:3000/api/automations" \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{
"triggerId": 6,
"name": "Email the team when a risk is added",
"actions": [
{
"action_type_id": 1,
"params": { "to": "team@example.com", "subject": "New risk added" }
}
],
"params": "{}"
}'How automations run
When a matching event happens, VerifyWise queues the automation's actions and runs them in the background. Each run is recorded, so the history and stats endpoints show what fired, whether it succeeded and how long it took. Because runs are queued rather than immediate, an action may complete a moment after the triggering event.
Access
Every automations endpoint requires a valid token and is scoped to your organization. You only see and manage your own organization's automations.