Automation API

Planned API for creating and managing workflow automations

Planned — not yet available. This page describes a planned capability. The endpoints below do not exist yet and may change before release. Automations can be built and managed inside the Coherence app today, and you can ask an agent to act on records via POST /v1/agents/messages — but there is no public REST API for automations yet.

The planned Automation API will let you define workflows programmatically that execute actions when triggers fire — streamlining repetitive tasks, enforcing business rules, and integrating with external systems.

Planned Model

An automation will consist of three parts:

  1. Trigger — what starts the automation (e.g., a record is created)
  2. Conditions — optional rules that determine whether it should run
  3. Actions — what happens when it executes

Endpoint Sketch (design preview)

MethodEndpointPurpose
GET/automationsList automations
GET/automations/{id}Get a single automation
POST/automationsCreate an automation
PATCH/automations/{id}Update an automation
DELETE/automations/{id}Delete an automation
POST/automations/{id}/enableEnable an automation
POST/automations/{id}/disableDisable an automation
GET/automations/{id}/logsExecution history

Example (design preview)

Creating an automation will look like:

curl -X POST "https://api.getcoherence.io/v1/automations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Welcome email for new contacts",
    "trigger": {
      "type": "record.created",
      "module": "contacts"
    },
    "conditions": [
      { "field": "email", "operator": "is_not_empty" }
    ],
    "actions": [
      {
        "type": "send_email",
        "config": {
          "to": "{{record.email}}",
          "subject": "Welcome!",
          "body": "Hi {{record.first_name}}, thanks for signing up."
        }
      }
    ]
  }'

and will return the created automation:

{
  "automation": {
    "id": "auto_def456",
    "name": "Welcome email for new contacts",
    "enabled": false,
    "createdDateTime": "2026-01-17T09:00:00Z"
  }
}

Planned Trigger Types

TriggerFires when
record.createdA record is created in a module
record.updatedAny field on a record changes
record.deletedA record is deleted
field.changedA specific field value changes
scheduleA cron schedule elapses (e.g., 0 9 * * 1-5)
manualTriggered explicitly via API or a button in the UI

Planned Action Types

ActionWhat it will do
update_recordUpdate fields on the triggering or a related record
create_recordCreate a record in any module
send_emailSend an email with templated content
send_notificationSend an in-app notification to a user
call_webhookMake an HTTP request to an external URL
delayPause before the next action

Actions will support template variables such as {{record.field_name}}, {{record.id}}, {{now}}, and {{user.email}} for dynamic content, plus filters like {{now | add_days: 7}}.

Conditions (design preview)

Conditions will filter execution; all conditions must pass. Planned operators include equals, not_equals, contains, greater_than, less_than, is_empty, is_not_empty, changed, changed_to, and changed_from.

Errors

Planned endpoints will use the standard Coherence error envelope (see Error Handling):

{
  "error": {
    "message": "Automation not found",
    "statusCode": 404
  }
}

Related: API Overview | Webhooks (also planned) | Agents API