Developer guide

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.

What automations can do today
Triggers cover the create, update and delete events for the main resource types, plus scheduled reports. The only action available right now is sending an email. There is no action that calls an external URL, so automations notify people; they do not push events to other systems.

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 & pathReturns
GET /api/automations/triggersThe trigger types you can use, each with its id, key and label.
GET /api/automations/actions/by-triggerId/:triggerIdThe actions available for a given trigger.
bash
curl "http://localhost:3000/api/automations/triggers" \
  -H "Authorization: Bearer <your-token>"

Create, update and delete

Method & pathDescription
GET /api/automationsList the automations in your organization.
GET /api/automations/:idFetch one automation.
POST /api/automationsCreate an automation.
PUT /api/automations/:idUpdate an automation (trigger, name, actions, active state).
DELETE /api/automations/:idDelete an automation.
GET /api/automations/:id/historyThe execution history for an automation.
GET /api/automations/:id/statsExecution 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.

bash
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": "{}"
  }'
Required fields
triggerId, name and a non-empty actions array are required. Leaving any of them out returns a 400 with the message "Missing required fields: triggerId, name, actions".

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.

PreviousBulk importing datasets
NextCompliance, reports and exports
Automations API - Developer guide - VerifyWise User Guide