Automations

Recipes: WHEN a trigger fires, ONLY IF its conditions hold, THEN run its actions. Scoped to one module, or to every module in a workspace.

GET/automations/{moduleId}

List a module's automations

Recipes scoped to one module, with run counts and the last error.

Path parameters

moduleId*stringModule id.
bash
curl -X GET 'https://api.conexus-x.example/api/automations/{moduleId}' \
  -H 'x-api-key: YOUR_PIT_KEY'

Example response

json
{
  "automations": [
    {
      "_id": "66f1a2b3c4d5e6f7a8b9c8b1",
      "workspace": "66f1a2b3c4d5e6f7a8b9c0d1",
      "module": "66f1a2b3c4d5e6f7a8b9c1a1",
      "scope": "module",
      "name": "Notify on Hot",
      "trigger": {
        "type": "column_changed_to",
        "column": "66f1a2b3c4d5e6f7a8b9c3c1",
        "value": "Hot"
      },
      "conditions": [],
      "match": "all",
      "actions": [
        {
          "type": "post_amendment",
          "value": "This deal just turned Hot 🔥"
        }
      ],
      "isActive": true,
      "runCount": 12,
      "lastRunAt": "2026-08-02T15:40:11.000Z",
      "createdAt": "2026-03-01T09:00:00.000Z"
    }
  ]
}
GET/automations/workspace/{workspaceId}

List a workspace's automations

Recipes that watch every module in the workspace, addressed by column NAME rather than id.

Path parameters

workspaceId*stringWorkspace id.
bash
curl -X GET 'https://api.conexus-x.example/api/automations/workspace/{workspaceId}' \
  -H 'x-api-key: YOUR_PIT_KEY'

Example response

json
{
  "automations": [
    {
      "_id": "66f1a2b3c4d5e6f7a8b9c8b1",
      "workspace": "66f1a2b3c4d5e6f7a8b9c0d1",
      "module": null,
      "scope": "workspace",
      "name": "Notify on Hot",
      "trigger": {
        "type": "column_changed_to",
        "column": "66f1a2b3c4d5e6f7a8b9c3c1",
        "value": "Hot"
      },
      "conditions": [],
      "match": "all",
      "actions": [
        {
          "type": "post_amendment",
          "value": "This deal just turned Hot 🔥"
        }
      ],
      "isActive": true,
      "runCount": 12,
      "lastRunAt": "2026-08-02T15:40:11.000Z",
      "createdAt": "2026-03-01T09:00:00.000Z"
    }
  ]
}
POST/automations/{moduleId}

Create a module automation

Creates a recipe scoped to one module — its trigger/conditions/actions address columns by id.

Path parameters

moduleId*stringModule id.

Body

name*stringRecipe name.
trigger*object{ type, column?, value? } — see the trigger types on this page.
conditions*object[][] for none.
match*string"all" or "any".
actions*object[]{ type, ... } — see the action types on this page.
isActivebooleanDefaults to true.

Trigger types: record_created, record_moved, record_renamed, record_completed, record_uncompleted, record_archived, column_changed, column_changed_to, subrecord_created, subrecord_column_changed, subrecord_column_changed_to, subrecord_completed, all_subrecords_completed, amendment_posted.

Action types: set_column_value, clear_column_value, move_to_collection, archive_record, set_completed, rename_record, create_subrecord, complete_all_subrecords, archive_all_subrecords, set_parent_column_value, set_parent_completed, move_parent_to_collection, create_record, post_amendment.

bash
curl -X POST 'https://api.conexus-x.example/api/automations/{moduleId}' \
  -H 'x-api-key: YOUR_PIT_KEY'
  -H 'Content-Type: application/json' \
  -d '{"name":"Notify on Hot","trigger":{"type":"column_changed_to","column":"66f1a2b3c4d5e6f7a8b9c3c1","value":"Hot"},"conditions":[],"match":"all","actions":[{"type":"post_amendment","value":"This deal just turned Hot 🔥"}]}'

Example response

json
{
  "message": "Automation created.",
  "automation": {
    "_id": "66f1a2b3c4d5e6f7a8b9c8b1",
    "workspace": "66f1a2b3c4d5e6f7a8b9c0d1",
    "module": "66f1a2b3c4d5e6f7a8b9c1a1",
    "scope": "module",
    "name": "Notify on Hot",
    "trigger": {
      "type": "column_changed_to",
      "column": "66f1a2b3c4d5e6f7a8b9c3c1",
      "value": "Hot"
    },
    "conditions": [],
    "match": "all",
    "actions": [
      {
        "type": "post_amendment",
        "value": "This deal just turned Hot 🔥"
      }
    ],
    "isActive": true,
    "runCount": 12,
    "lastRunAt": "2026-08-02T15:40:11.000Z",
    "createdAt": "2026-03-01T09:00:00.000Z"
  }
}
POST/automations/workspace/{workspaceId}

Create a workspace automation

Creates a recipe that watches every module in the workspace — addresses columns by NAME (columnName), not id.

Path parameters

workspaceId*stringWorkspace id.

Body

name*stringRecipe name.
trigger*objectSame trigger types, columnName instead of column.
conditions*object[][] for none.
match*string"all" or "any".
actions*object[]Same action types, columnName instead of column.
bash
curl -X POST 'https://api.conexus-x.example/api/automations/workspace/{workspaceId}' \
  -H 'x-api-key: YOUR_PIT_KEY'
  -H 'Content-Type: application/json' \
  -d '{"name":"Flag every Hot deal","trigger":{"type":"column_changed_to","columnName":"Stage","value":"Hot"},"conditions":[],"match":"all","actions":[{"type":"post_amendment","value":"This deal just turned Hot 🔥"}]}'

Example response

json
{
  "message": "Automation created.",
  "automation": {
    "_id": "66f1a2b3c4d5e6f7a8b9c8b1",
    "workspace": "66f1a2b3c4d5e6f7a8b9c0d1",
    "module": null,
    "scope": "workspace",
    "name": "Notify on Hot",
    "trigger": {
      "type": "column_changed_to",
      "column": "66f1a2b3c4d5e6f7a8b9c3c1",
      "value": "Hot"
    },
    "conditions": [],
    "match": "all",
    "actions": [
      {
        "type": "post_amendment",
        "value": "This deal just turned Hot 🔥"
      }
    ],
    "isActive": true,
    "runCount": 12,
    "lastRunAt": "2026-08-02T15:40:11.000Z",
    "createdAt": "2026-03-01T09:00:00.000Z"
  }
}
PUT/automations/{automationId}

Update an automation

Edits a recipe — module-scoped or workspace-scoped, addressed by its own id either way.

Path parameters

automationId*stringAutomation id.

Body

...objectAny subset of the fields accepted on create.
bash
curl -X PUT 'https://api.conexus-x.example/api/automations/{automationId}' \
  -H 'x-api-key: YOUR_PIT_KEY'
  -H 'Content-Type: application/json' \
  -d '{"isActive":false}'

Example response

json
{
  "message": "Automation updated.",
  "automation": {
    "_id": "66f1a2b3c4d5e6f7a8b9c8b1",
    "workspace": "66f1a2b3c4d5e6f7a8b9c0d1",
    "module": "66f1a2b3c4d5e6f7a8b9c1a1",
    "scope": "module",
    "name": "Notify on Hot",
    "trigger": {
      "type": "column_changed_to",
      "column": "66f1a2b3c4d5e6f7a8b9c3c1",
      "value": "Hot"
    },
    "conditions": [],
    "match": "all",
    "actions": [
      {
        "type": "post_amendment",
        "value": "This deal just turned Hot 🔥"
      }
    ],
    "isActive": false,
    "runCount": 12,
    "lastRunAt": "2026-08-02T15:40:11.000Z",
    "createdAt": "2026-03-01T09:00:00.000Z"
  }
}
DELETE/automations/{automationId}

Delete an automation

Deletes a recipe.

Path parameters

automationId*stringAutomation id.

There is no "runs" endpoint. What a recipe did is an activity row — read it from GET /activity/:workspaceId?source=automation.

bash
curl -X DELETE 'https://api.conexus-x.example/api/automations/{automationId}' \
  -H 'x-api-key: YOUR_PIT_KEY'

Example response

json
{
  "message": "Automation deleted."
}