Automations API

Automations is the platform’s reaction layer: it listens for domain events and schedules, matches them to trigger nodes, and executes directed graphs of conditions, switches, actions, and waits. Projects are zero-trust federated zones, automations are child boundaries inside them, and action dispatch runs under the automation’s IAM principal. The registry lists event types, action types, and operators contributed by services; this service also contributes `automations.schedule.fired`, `automations.manual.invoked`, and the `automations.set_variable` ("Set value") action. Generic outbound HTTP is provided by the compute service's `compute.http.request` action.

Base URL/api/v1/automations

Automation triggers: view every Automations event, payload field, and predicate.

Projects

Top-level folders in the Studio hierarchy. Each project belongs to one organization and contains automations. Deleting a project requires that it have no live automations.

GET/api/v1/automations/projects

List Projects

List automation projects for the authenticated organization with cursor pagination. Optional case-insensitive name filter.

Bearer token required. IAM permission `automations:projects:view` on `org/{company_id}`.

Query Parameters

NameTypeDescription
limit
integerPage size (1–200, default 50)
cursor
string | nullOpaque pagination cursor from a prior response
name
string | nullCase-insensitive substring filter on project name

Response Fields

NameTypeDescription
items*
ProjectOut[]Project rows including automation_count
next_cursor*
string | nullCursor for the next page, or null
curl "https://platform.ergondata.ai/api/v1/automations/projects?limit=50" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "items": [
    {
      "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
      "name": "Revenue ops",
      "description": "Customer-facing automations",
      "created_by_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z",
      "deleted_at": null,
      "automation_count": 3
    }
  ],
  "next_cursor": null
}
POST/api/v1/automations/projects

Create Project

Create a new automation project. Duplicate names in the same organization return 409.

Bearer token required. IAM permission `automations:projects:create` on `org/{company_id}`.

Request Body

NameTypeDescription
name*
stringDisplay name (1–200 chars)
description
string | nullOptional description

Response Fields

NameTypeDescription
id*
UUIDProject ID
company_id*
UUIDOrganization ID
name*
stringName
description*
string | nullDescription
created_by_principal_id*
UUID | nullCreating principal
created_at*
datetimeCreation time
updated_at*
datetimeLast update
deleted_at*
datetime | nullSoft-delete time if deleted
automation_count*
integerLive automations in project
curl -X POST https://platform.ergondata.ai/api/v1/automations/projects \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Revenue ops",
    "description": "Customer-facing automations"
  }'

Response

201 Created
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
  "name": "Revenue ops",
  "description": "Customer-facing automations",
  "created_by_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T10:30:00Z",
  "deleted_at": null,
  "automation_count": 0
}
GET/api/v1/automations/projects/{project_id}

Get Project

Retrieve one project by ID.

Bearer token required. IAM permission `automations:projects:view` on `org/{company_id}/automation-project/{project_id}`.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID
curl https://platform.ergondata.ai/api/v1/automations/projects/{project_id} \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
  "name": "Revenue ops",
  "description": "Customer-facing automations",
  "created_by_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T10:30:00Z",
  "deleted_at": null,
  "automation_count": 3
}
PATCH/api/v1/automations/projects/{project_id}

Update Project

Update project name and/or description.

Bearer token required. IAM permission `automations:projects:edit` on `org/{company_id}/automation-project/{project_id}`.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID

Request Body

NameTypeDescription
name
stringNew name (1–200 chars)
description
string | nullNew description
curl -X PATCH https://platform.ergondata.ai/api/v1/automations/projects/{project_id} \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"name": "Revenue ops v2"}'

Response

200 OK
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
  "name": "Revenue ops v2",
  "description": "Customer-facing automations",
  "created_by_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-16T09:00:00Z",
  "deleted_at": null,
  "automation_count": 3
}
DELETE/api/v1/automations/projects/{project_id}

Delete Project

Soft-delete a project. Returns 409 if any live automations remain.

Bearer token required. IAM permission `automations:projects:delete` on `org/{company_id}/automation-project/{project_id}`.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID
curl -X DELETE https://platform.ergondata.ai/api/v1/automations/projects/{project_id} \
  -H "Authorization: Bearer {token}"

Response

204 No Content

Automations

Named automations inside a project. Creating an automation provisions an IAM automation principal used for every dispatch from its action nodes. Use the flat list for overview screens; use the project-scoped list when drilling into a folder.

GET/api/v1/automations/projects/{project_id}/automations

List Automations in Project

Cursor-paginated automations for a single project, with optional filters.

Bearer token required. IAM permission `automations:automations:view` on `org/{company_id}/automation-project/{project_id}`.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID

Query Parameters

NameTypeDescription
limit
integerPage size (1–200, default 50)
cursor
string | nullPagination cursor
is_active
boolean | nullFilter by active flag
name
string | nullCase-insensitive substring filter on name

Response Fields

NameTypeDescription
items*
AutomationOut[]Automation rows including node_count
next_cursor*
string | nullNext page cursor
curl "https://platform.ergondata.ai/api/v1/automations/projects/{project_id}/automations?limit=50" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "items": [
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
      "name": "Escalate urgent tickets",
      "description": null,
      "iam_automation_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
      "iam_principal_id": "d4e5f6a7-b8c9-0123-def0-456789012345",
      "is_active": true,
      "max_trigger_depth": 3,
      "graph_version": 4,
      "created_by_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z",
      "deleted_at": null,
      "node_count": 12
    }
  ],
  "next_cursor": null
}
GET/api/v1/automations/automations

List Automations (Organization)

Flat, cursor-paginated list of automations for the organization. Optionally filter by project, name, or active flag.

Bearer token required. IAM permission `automations:automations:view` on `org/{company_id}`.

Query Parameters

NameTypeDescription
project_id
UUID | nullRestrict to one project
is_active
boolean | nullFilter by active flag
name
string | nullCase-insensitive substring on name
limit
integerPage size (1–200)
cursor
string | nullPagination cursor
curl "https://platform.ergondata.ai/api/v1/automations/automations?limit=50" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "items": [],
  "next_cursor": null
}
POST/api/v1/automations/projects/{project_id}/automations

Create Automation

Create an automation and provision its IAM automation principal. Initial graph is empty (node_count 0).

Bearer token required. IAM permission `automations:projects:automations:create` on `org/{company_id}/automation-project/{project_id}`.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID

Request Body

NameTypeDescription
name*
stringName (1–200 chars)
description
string | nullDescription
is_active
booleanDefault true
max_trigger_depth
integer0–10, default 3
curl -X POST https://platform.ergondata.ai/api/v1/automations/projects/{project_id}/automations \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Escalate urgent tickets",
    "is_active": true,
    "max_trigger_depth": 3
  }'

Response

201 Created
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
  "name": "Escalate urgent tickets",
  "description": null,
  "iam_automation_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
  "iam_principal_id": "d4e5f6a7-b8c9-0123-def0-456789012345",
  "is_active": true,
  "max_trigger_depth": 3,
  "graph_version": 1,
  "created_by_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T10:30:00Z",
  "deleted_at": null,
  "node_count": 0
}
GET/api/v1/automations/automations/{automation_id}

Get Automation

Fetch a single automation including live node_count.

Bearer token required. IAM permission `automations:automations:view` on `org/{company_id}/automation-project/{project_id}/automation/{automation_id}`.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID
curl https://platform.ergondata.ai/api/v1/automations/automations/{automation_id} \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
  "name": "Escalate urgent tickets",
  "description": null,
  "iam_automation_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
  "iam_principal_id": "d4e5f6a7-b8c9-0123-def0-456789012345",
  "is_active": true,
  "max_trigger_depth": 3,
  "graph_version": 4,
  "created_by_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-16T09:00:00Z",
  "deleted_at": null,
  "node_count": 12
}
PATCH/api/v1/automations/automations/{automation_id}

Update Automation

Patch name, description, active flag, or max trigger depth. Toggling is_active emits activation/deactivation domain events.

Bearer token required. IAM permission `automations:automations:edit` on `org/{company_id}/automation-project/{project_id}/automation/{automation_id}`.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Request Body

NameTypeDescription
name
stringName (1–200 chars)
description
string | nullDescription
is_active
boolean | nullActive flag
max_trigger_depth
integer | null0–10
curl -X PATCH https://platform.ergondata.ai/api/v1/automations/automations/{automation_id} \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"is_active": false}'

Response

200 OK
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
  "name": "Escalate urgent tickets",
  "description": null,
  "iam_automation_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
  "iam_principal_id": "d4e5f6a7-b8c9-0123-def0-456789012345",
  "is_active": false,
  "max_trigger_depth": 3,
  "graph_version": 4,
  "created_by_principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-16T09:15:00Z",
  "deleted_at": null,
  "node_count": 12
}
DELETE/api/v1/automations/automations/{automation_id}

Delete Automation

Soft-delete the automation and its graph nodes; deactivates and best-effort deletes the IAM automation principal.

Bearer token required. IAM permission `automations:automations:delete` on `org/{company_id}/automation-project/{project_id}/automation/{automation_id}`.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID
curl -X DELETE https://platform.ergondata.ai/api/v1/automations/automations/{automation_id} \
  -H "Authorization: Bearer {token}"

Response

204 No Content
POST/api/v1/automations/automations/{automation_id}/invoke/{trigger_node_id}

Invoke Manual Trigger

Fire a manual-trigger node (`automations.manual.invoked`). Body `input` is validated against the trigger node’s `config.input_schema` when present. Optional `Idempotency-Key` header deduplicates in-flight invocations and replays completed runs. Response includes `Location` pointing at the new run.

Bearer token required. IAM permission `automations:automations:runs:create` on `org/{company_id}/automation-project/{project_id}/automation/{automation_id}`.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID
trigger_node_id*
string (UUID)Trigger node ID (must be a manual trigger)

Request Body

NameTypeDescription
input*
objectPayload for the manual trigger (default empty object)

Response Fields

NameTypeDescription
run_id*
UUIDCreated run
automation_id*
UUIDAutomation
trigger_node_id*
UUIDTrigger node
status*
stringRun status
correlation_id*
stringCorrelation id for tracing
location*
stringPath to the run (also `Location` header)
curl -X POST https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/invoke/{trigger_node_id} \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: manual-run-001" \
  -d '{"input": {"ticket_id": "T-1001"}}'

Response

202 Accepted
{
  "run_id": "e5f6a7b8-c9d0-1234-ef01-567890abcdef",
  "automation_id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "trigger_node_id": "f6a7b8c9-d0e1-2345-f012-678901bcdef0",
  "status": "pending",
  "correlation_id": "11111111-2222-3333-4444-555555555555",
  "location": "/runs/e5f6a7b8-c9d0-1234-ef01-567890abcdef"
}

Step Graphs

Nodes (triggers, conditions, switches, actions, waits) and edges define how an automation runs. GET returns the live graph and `graph_version` for optimistic concurrency; PUT replaces the entire graph atomically when validation passes.

GET/api/v1/automations/automations/{automation_id}/graph

Get Automation Graph

Return all non-deleted nodes and edges plus the current graph_version.

Bearer token required. IAM permission `automations:automations:graph:view` on `org/{company_id}/automation-project/{project_id}/automation/{automation_id}`.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Response Fields

NameTypeDescription
automation_id*
UUIDAutomation
graph_version*
integerMonotonic version for If-Match
nodes*
NodeOut[]Trigger, condition, switch, action, wait nodes
edges*
EdgeOut[]Directed edges with optional predicates
curl https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/graph \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "automation_id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "graph_version": 4,
  "nodes": [],
  "edges": []
}
PUT/api/v1/automations/automations/{automation_id}/graph

Replace Automation Graph

Atomically replace the graph. Send `If-Match: <graph_version>` for optimistic concurrency (mismatch → 412). Set `force_slug_rename` when renaming existing node slugs. Validation failures return 422 with per-node errors; unknown catalog slugs may return 409.

Bearer token required. IAM permission `automations:automations:graph:edit` on `org/{company_id}/automation-project/{project_id}/automation/{automation_id}`.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Request Body

NameTypeDescription
nodes*
NodeIn[]Node definitions (kind, slug, config, optional trigger_event_slug / action_type_slug, etc.)
edges*
EdgeIn[]Edges (source_node_id, target_node_id, predicate, ordinal, …)
force_slug_rename
booleanAcknowledge slug renames (default false)

Response Fields

NameTypeDescription
automation_id*
UUIDAutomation
graph_version*
integerNew graph version
diff*
objectCounts: nodes_created, nodes_updated, nodes_deleted, edges_created, edges_updated, edges_deleted, slug_renames, graph_version
curl -X PUT https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/graph \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "If-Match: 4" \
  -d '{"nodes": [], "edges": [], "force_slug_rename": false}'

Response

200 OK
{
  "automation_id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "graph_version": 5,
  "diff": {
    "nodes_created": 0,
    "nodes_updated": 0,
    "nodes_deleted": 0,
    "edges_created": 0,
    "edges_updated": 0,
    "edges_deleted": 0,
    "slug_renames": 0,
    "graph_version": 5
  }
}

Access Management

Project and automation security-page endpoints. Project routes require `automations:permissions:projects:manage`; automation routes require `automations:permissions:automations:manage`. Project pages grant only project-zone permissions (`automations:projects:*`, view/edit/activity, child automation creation, and project grant management). Automation pages grant automation CRUD, graph, run, activity, and automation grant-management permissions. Creator bundles stop at zone boundaries: project creators receive `automations:projects:*` plus project grant management; automation creators receive `automations:automations:*` plus automation grant management.

GET/api/v1/automations/projects/{project_id}/access/eligible

List Project Eligible Principals

Return IAM principals that can receive Automations grants on this project.

Bearer token required. IAM permission `automations:permissions:projects:manage` on `org/{company_id}/automation-project/{project_id}`.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID

Response Fields

NameTypeDescription
[]*
EligiblePrincipal[]Eligible principals with principal_type, principal_id, and label
curl https://platform.ergondata.ai/api/v1/automations/projects/{project_id}/access/eligible \
  -H "Authorization: Bearer {token}"

Response

200 OK
[
  {
    "principal_type": "member",
    "principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "label": "Jane Doe"
  },
  {
    "principal_type": "automation",
    "principal_id": "d4e5f6a7-b8c9-0123-def0-456789012345",
    "label": "Escalate urgent tickets"
  }
]
GET/api/v1/automations/projects/{project_id}/access/resource-types

List Project Grantable Permissions

Return Automations resource types and permissions grantable from the project boundary, including project, automation, graph, run, activity, and permissions-management grants.

Bearer token required. IAM permission `automations:permissions:projects:manage` on `org/{company_id}/automation-project/{project_id}`.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID

Response Fields

NameTypeDescription
resource_types*
ResourceTypeNode[]Automations resource type tree
permissions*
PermissionOption[]Permissions grantable from this project boundary
curl https://platform.ergondata.ai/api/v1/automations/projects/{project_id}/access/resource-types \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "resource_types": [
    { "id": "rt-project", "name": "automation-project", "slug": "automation-project", "parent_id": null, "children": [] }
  ],
  "permissions": [
    {
      "id": "perm-view",
      "name": "automations:automations:view",
      "friendly_name": "View automations",
      "description": "View automations in this project",
      "resource_type_id": "rt-automation",
      "parent_resource_type_slug": "automation-project",
      "scope_anchor": "instance",
      "display_order": 10
    }
  ]
}
GET/api/v1/automations/projects/{project_id}/access/grants

List Project Access Grants

List IAM grants scoped to this automation project boundary.

Bearer token required. IAM permission `automations:permissions:projects:manage` on `org/{company_id}/automation-project/{project_id}`.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID

Query Parameters

NameTypeDescription
page
integerPage numberDefault: 1
limit
integerPage size (1-500)Default: 100

Response Fields

NameTypeDescription
items*
GrantEntry[]Grants in this page
total*
integerTotal grants
page*
integerCurrent page
limit*
integerPage size
curl "https://platform.ergondata.ai/api/v1/automations/projects/{project_id}/access/grants?page=1&limit=100" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "items": [
    {
      "id": "grant-001",
      "principal_type": "member",
      "principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "principal_label": "Jane Doe",
      "permission_id": "perm-view",
      "permission_name": "automations:automations:view",
      "resource": "org/c0ffee00-cafe-babe-dead-beefcafebabe/automation-project/f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "effect": "allow",
      "granted_at": "2026-05-17T12:00:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 100
}
POST/api/v1/automations/projects/{project_id}/access/grants

Create Project Access Grant

Grant a project-scoped Automations permission to a principal. The optional resource override must stay within the project resource prefix.

Bearer token required. IAM permission `automations:permissions:projects:manage` on `org/{company_id}/automation-project/{project_id}`.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID

Request Body

NameTypeDescription
principal_type*
member | api_key | agent | automation | workflow | worksheetIAM principal type
principal_id*
stringIAM principal UUID
permission_id*
stringIAM permission UUID
resource
string | nullDefaults to the project boundary; must stay within it
effect
allow | denyGrant effectDefault: allow

Response Fields

NameTypeDescription
id*
stringGrant ID
permission_id*
stringPermission ID
name*
stringPermission slug
resource*
stringResource path
effect*
stringGrant effect
is_system*
booleanWhether IAM marked the grant as system-managed
granted_at*
datetimeCreation time
curl -X POST https://platform.ergondata.ai/api/v1/automations/projects/{project_id}/access/grants \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "principal_type": "member",
    "principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "permission_id": "perm-view",
    "effect": "allow"
  }'

Response

201 Created
{
  "id": "grant-001",
  "permission_id": "perm-view",
  "name": "automations:automations:view",
  "resource": "org/c0ffee00-cafe-babe-dead-beefcafebabe/automation-project/f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "effect": "allow",
  "is_system": false,
  "granted_at": "2026-05-17T12:00:00Z"
}
DELETE/api/v1/automations/projects/{project_id}/access/grants/{grant_id}

Delete Project Access Grant

Revoke an IAM grant through the project security page.

Bearer token required. IAM permission `automations:permissions:projects:manage` on `org/{company_id}/automation-project/{project_id}`.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID
grant_id*
stringGrant ID
curl -X DELETE https://platform.ergondata.ai/api/v1/automations/projects/{project_id}/access/grants/{grant_id} \
  -H "Authorization: Bearer {token}"

Response

204 No Content
GET/api/v1/automations/automations/{automation_id}/access/grants

List Automation Access Grants

List IAM grants scoped directly to one automation. Eligible principals and resource-types routes are also available at the same automation access prefix.

Bearer token required. IAM permission `automations:permissions:automations:manage` on `org/{company_id}/automation-project/{project_id}/automation/{automation_id}`.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Query Parameters

NameTypeDescription
page
integerPage numberDefault: 1
limit
integerPage size (1-500)Default: 100
curl "https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/access/grants?page=1&limit=100" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "items": [],
  "total": 0,
  "page": 1,
  "limit": 100
}
POST/api/v1/automations/automations/{automation_id}/access/grants

Create Automation Access Grant

Grant an automation-local permission. Automation access pages accept automation, graph, run, activity, and permissions-management grants; project-only permissions are rejected.

Bearer token required. IAM permission `automations:permissions:automations:manage` on `org/{company_id}/automation-project/{project_id}/automation/{automation_id}`.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Request Body

NameTypeDescription
principal_type*
member | api_key | agent | automation | workflow | worksheetIAM principal type
principal_id*
stringIAM principal UUID
permission_id*
stringIAM permission UUID
resource
string | nullDefaults to the automation boundary; must stay within it
effect
allow | denyGrant effectDefault: allow
curl -X POST https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/access/grants \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "principal_type": "agent",
    "principal_id": "agent-principal-id",
    "permission_id": "perm-runs-create"
  }'

Response

201 Created
{
  "id": "grant-002",
  "permission_id": "perm-runs-create",
  "name": "automations:automations:runs:create",
  "resource": "org/c0ffee00-cafe-babe-dead-beefcafebabe/automation-project/f47ac10b-58cc-4372-a567-0e02b2c3d479/automation/b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "effect": "allow",
  "is_system": false,
  "granted_at": "2026-05-17T12:05:00Z"
}
DELETE/api/v1/automations/automations/{automation_id}/access/grants/{grant_id}

Delete Automation Access Grant

Revoke an IAM grant through the automation security page.

Bearer token required. IAM permission `automations:permissions:automations:manage` on `org/{company_id}/automation-project/{project_id}/automation/{automation_id}`.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID
grant_id*
stringGrant ID
curl -X DELETE https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/access/grants/{grant_id} \
  -H "Authorization: Bearer {token}"

Response

204 No Content
POST/api/v1/automations/access/projects/grants/batch

Batch Create Project Access Grants

Create grants across project roots with ordered partial success. Operations expand as resources × permission_ids in request order, with at most 200 expanded grants. Invalid or unauthorized items fail independently. `already_exists` is an idempotent success, so retrying the whole request or only failed client_ref/index entries is safe. Side-effect errors do not roll back a successful IAM grant and must be reconciled separately. Agent ToolDef slug: `automations.project_access.create_grants_batch`.

Bearer token required. IAM permission `automations:permissions:projects:manage` on every concrete `org/{company_id}/automation-project/{project_id}` root.

Request Body

NameTypeDescription
operations*
BatchGrantOperation[]One or more grouped operations; expanded request limit is 200 grants

Response Fields

NameTypeDescription
results*
BatchGrantResult[]Ordered expanded results: index, client_ref, status, principal_type, principal_id, permission_id, resource, effect, grant, error_status/error_detail, and side_effect_error_status/side_effect_error_detail
summary*
objectcreated, already_exists, and failed counts
curl -X POST https://platform.ergondata.ai/api/v1/automations/access/projects/grants/batch \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"operations":[{"client_ref":"project-access","principal_type":"member","principal_id":"{principal_id}","resources":["org/{company_id}/automation-project/{project_id}"],"permission_ids":["{permission_id}"],"effect":"allow"}]}'

Response

200 OK
{
  "results": [
    {
      "index": 0,
      "client_ref": "project-access",
      "status": "created",
      "principal_type": "member",
      "principal_id": "{principal_id}",
      "permission_id": "{permission_id}",
      "resource": "org/{company_id}/automation-project/{project_id}",
      "effect": "allow",
      "grant": {},
      "error_status": null,
      "error_detail": null,
      "side_effect_error_status": null,
      "side_effect_error_detail": null
    }
  ],
  "summary": { "created": 1, "already_exists": 0, "failed": 0 }
}
POST/api/v1/automations/access/automations/grants/batch

Batch Create Automation Access Grants

Create grants across automation roots with ordered partial success. Operations expand as resources × permission_ids in request order, with at most 200 expanded grants. Invalid or unauthorized items fail independently. `already_exists` is an idempotent success, so whole-request or failed-item retries are safe. Side-effect errors do not roll back successful grants. Agent ToolDef slug: `automations.automation_access.create_grants_batch`.

Bearer token required. IAM permission `automations:permissions:automations:manage` on every concrete automation root.

Request Body

NameTypeDescription
operations*
BatchGrantOperation[]Same BatchCreateGrantsRequest operation fields as the project batch route; expanded request limit is 200 grants

Response Fields

NameTypeDescription
results*
BatchGrantResult[]Ordered results with primary and side-effect error fields for each expanded grant
summary*
objectcreated, already_exists, and failed counts
curl -X POST https://platform.ergondata.ai/api/v1/automations/access/automations/grants/batch \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"operations":[{"principal_type":"agent","principal_id":"{principal_id}","resources":["org/{company_id}/automation-project/{project_id}/automation/{automation_id}"],"permission_ids":["{permission_id}"]}]}'

Response

200 OK
{
  "results": [
    {
      "index": 0,
      "client_ref": null,
      "status": "already_exists",
      "principal_type": "agent",
      "principal_id": "{principal_id}",
      "permission_id": "{permission_id}",
      "resource": "org/{company_id}/automation-project/{project_id}/automation/{automation_id}",
      "effect": "allow",
      "grant": {},
      "error_status": null,
      "error_detail": null,
      "side_effect_error_status": null,
      "side_effect_error_detail": null
    }
  ],
  "summary": { "created": 0, "already_exists": 1, "failed": 0 }
}

Runs

Execution history for one automation. Aggregate operational history is exposed through Activity. `automations:automations:runs:view` returns a redacted run (no raw event graph/context snapshots, no resume_key, no step request/response payloads). `automations:automations:runs:debug` on the same resource scope reveals those fields and is required for `GET /automations/{automation_id}/runs/waiting`.

GET/api/v1/automations/automations/{automation_id}/runs

List Runs

Automation-scoped run history with optional filters and cursor pagination.

Bearer token required. IAM permission `automations:automations:runs:view` on `org/{company_id}`. Debug fields appear if `automations:automations:runs:debug` is also granted on `org/{company_id}`.

Query Parameters

NameTypeDescription
automation_id
UUID | nullFilter to one automation
status
string | nullFilter by run status
limit
integerPage size (1–200)
cursor
string | nullPagination cursor

Response Fields

NameTypeDescription
items*
RunOut[]Runs (fields redacted per permissions)
next_cursor*
string | nullNext page cursor
curl "https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/runs?limit=50" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "items": [],
  "next_cursor": null
}
GET/api/v1/automations/automations/{automation_id}/runs

List Runs (Automation)

Runs for a single automation; redaction rules match the organization-wide list.

Bearer token required. IAM permission `automations:automations:runs:view` on `org/{company_id}/automation-project/{project_id}/automation/{automation_id}`. Debug fields if `automations:automations:runs:debug` on that automation resource.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Query Parameters

NameTypeDescription
status
string | nullFilter by run status
limit
integerPage size (1–200)
cursor
string | nullPagination cursor
curl "https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/runs?limit=50" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "items": [],
  "next_cursor": null
}
GET/api/v1/automations/automations/{automation_id}/runs/waiting

List Waiting Runs (Debug)

Suspended runs (`status=waiting`). Requires `automations:automations:runs:debug`; otherwise 403. Exposes resume_key in the list shape.

Bearer token required. IAM permission `automations:automations:runs:debug` on `org/{company_id}` (hard requirement).

Query Parameters

NameTypeDescription
automation_id
UUID | nullFilter to one automation
limit
integerPage size (1–200)
cursor
string | nullPagination cursor

Response Fields

NameTypeDescription
items*
WaitingRunOut[]Slim waiting run rows
next_cursor*
string | nullNext page cursor
curl "https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/runs/waiting" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "items": [],
  "next_cursor": null
}
GET/api/v1/automations/automations/{automation_id}/runs/{run_id}

Get Run

Run detail including steps. Payload-bearing fields are null unless `automations:automations:runs:debug` is granted on `org/{company_id}/automation-run/{run_id}`.

Bearer token required. IAM permission `automations:automations:runs:view` on `org/{company_id}/automation-run/{run_id}`; optional `automations:automations:runs:debug` on the same resource for full payloads.

Path Parameters

NameTypeDescription
run_id*
string (UUID)Run ID

Response Fields

NameTypeDescription
id*
UUIDRun id
run_group_id*
UUIDRun group
automation_id*
UUID | nullAutomation
trigger_node_id*
UUID | nullEntry trigger
status*
stringRun status
steps*
RunStepOut[]Ordered steps
event_payload*
object | nullDebug-only when permitted
graph_snapshot*
object | nullDebug-only when permitted
context_snapshot*
object | nullDebug-only when permitted
resume_key*
string | nullDebug-only when permitted
curl https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/runs/{run_id} \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "id": "e5f6a7b8-c9d0-1234-ef01-567890abcdef",
  "run_group_id": "e5f6a7b8-c9d0-1234-ef01-567890abcdef",
  "automation_id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "trigger_node_id": "f6a7b8c9-d0e1-2345-f012-678901bcdef0",
  "current_node_id": null,
  "company_id": "c0ffee00-cafe-babe-dead-beefcafebabe",
  "event_type_slug": "workflows.item.updated",
  "event_id": null,
  "correlation_id": "11111111-2222-3333-4444-555555555555",
  "trigger_depth": 0,
  "status": "succeeded",
  "error": null,
  "resume_until": null,
  "started_at": "2025-01-15T10:30:00Z",
  "completed_at": "2025-01-15T10:30:05Z",
  "steps": [],
  "event_payload": null,
  "graph_snapshot": null,
  "context_snapshot": null,
  "resume_key": null
}
POST/api/v1/automations/automations/{automation_id}/runs/{run_id}/retry

Retry Run

Re-fire a finished or failed run from its trigger. v0 supports only `mode: "from_start"`. Optional `Idempotency-Key` deduplicates like invoke.

Bearer token required. IAM permission `automations:automations:runs:create` on `org/{company_id}/automation-project/{project_id}/automation/{automation_id}` for the run’s automation.

Path Parameters

NameTypeDescription
run_id*
string (UUID)Original run ID

Request Body

NameTypeDescription
mode
"from_start"Retry mode (v0: only from_start; default from_start)

Response Fields

NameTypeDescription
run_id*
UUIDNew run
retried_from_run_id*
UUIDSource run
status*
stringNew run status
correlation_id*
stringCorrelation id
location*
stringPath to new run (`Location` header)
curl -X POST https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/runs/{run_id}/retry \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: retry-001" \
  -d '{"mode": "from_start"}'

Response

202 Accepted
{
  "run_id": "a7b8c9d0-e1f2-3456-789a-bcdef0123456",
  "retried_from_run_id": "e5f6a7b8-c9d0-1234-ef01-567890abcdef",
  "status": "pending",
  "correlation_id": "11111111-2222-3333-4444-555555555555",
  "location": "/runs/a7b8c9d0-e1f2-3456-789a-bcdef0123456"
}

Registry & Schedule Preview

Read-only catalog of event types, action types, operators, and per-service sync metadata. `POST /registry/schedule/preview` projects next fire times from an in-memory schedule config for authoring (no persisted state). The catalog is membership-readable — any authenticated company member may read it (no grant required); it is platform-global, non-sensitive node metadata needed by both authors and view-only inspectors.

GET/api/v1/automations/registry/event-types

List Event Types

Browse registered trigger/event types (payload shapes, resource chains, condition sources).

Bearer token required. Membership-readable — any authenticated company member; no IAM grant required.

Query Parameters

NameTypeDescription
owning_service
string | nullFilter by `service_slug`
q
string | nullSubstring search on slug or name
curl "https://platform.ergondata.ai/api/v1/automations/registry/event-types?q=workflow" \
  -H "Authorization: Bearer {token}"

Response

200 OK
[
  {
    "slug": "automations.manual.invoked",
    "service_slug": "automations",
    "name": "Manual run invoked",
    "description": "Emitted by POST .../invoke/... after validation.",
    "entity_type": "trigger",
    "payload_schema": [],
    "skip_processing": false,
    "resource_service": null,
    "resource_type": null,
    "resource_chain": [],
    "scope_anchor": "instance",
    "condition_sources": [],
    "metadata": {}
  }
]
GET/api/v1/automations/registry/action-types

List Action Types

Browse action types (inputs, dispatch metadata, compatible events).

Bearer token required. Membership-readable — any authenticated company member; no IAM grant required.

Query Parameters

NameTypeDescription
owning_service
string | nullFilter by `service_slug`
for_event_slug
string | nullOnly actions compatible with this trigger event slug
q
string | nullSubstring search on slug or name
curl https://platform.ergondata.ai/api/v1/automations/registry/action-types \
  -H "Authorization: Bearer {token}"

Response

200 OK
[
  {
    "slug": "automations.set_variable",
    "service_slug": "automations",
    "name": "Set value",
    "description": "Capture a value from another node (or a static value / template) and re-emit it unchanged.",
    "entity_type": "set",
    "required_permission": "automations:automations:runs:create",
    "input_schema": [{"name": "value", "label": "Value", "value_family": "text", "required": true}],
    "output_schema": [{"name": "value", "label": "Value", "value_family": "text"}],
    "supports_wait_pairing": [],
    "side_effects": [],
    "compatible_event_slugs": null,
    "resource_chain": [],
    "scope_anchor": "instance",
    "condition_sources": []
  }
]
GET/api/v1/automations/registry/operators

List Operators

Condition/switch operators (value families, arity).

Bearer token required. Membership-readable — any authenticated company member; no IAM grant required.

curl https://platform.ergondata.ai/api/v1/automations/registry/operators \
  -H "Authorization: Bearer {token}"

Response

200 OK
[
  {
    "slug": "text:equals_ignore_case",
    "namespace": "text",
    "label": "Equals (ignore case)",
    "description": null,
    "value_families": ["text"],
    "arity": "binary"
  }
]
POST/api/v1/automations/registry/schedule/preview

Preview Schedule Fires

Compute up to `count` next UTC fire times from a schedule trigger config (timezone, rules, optional bounds). Stateless: identical input yields identical output.

Bearer token required. Membership-readable — any authenticated company member; no IAM grant required.

Request Body

NameTypeDescription
config*
objectSchedule config (timezone, rules, optional starts_at/ends_at)
count
integerNumber of fires to project (1–20, default 5)
after
datetime | nullLower bound UTC (exclusive); defaults to now

Response Fields

NameTypeDescription
fires*
datetime[]Upcoming fire times in UTC
error*
string | nullSet when no fires could be produced
curl -X POST https://platform.ergondata.ai/api/v1/automations/registry/schedule/preview \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "config": {"timezone": "America/New_York", "rules": [{"kind": "weekly", "byweekday": [1], "time": "09:00"}]},
    "count": 3
  }'

Response

200 OK
{
  "fires": [
    "2025-01-20T14:00:00Z",
    "2025-01-27T14:00:00Z",
    "2025-02-03T14:00:00Z"
  ],
  "error": null
}
GET/api/v1/automations/registry/services

List Service Catalog Versions

Mirrored `service_catalog_versions` rows with per-service event and action counts.

Bearer token required. Membership-readable — any authenticated company member; no IAM grant required.

curl https://platform.ergondata.ai/api/v1/automations/registry/services \
  -H "Authorization: Bearer {token}"

Response

200 OK
[
  {
    "service_slug": "automations",
    "version": 1,
    "last_synced_at": "2025-01-15T10:30:00Z",
    "event_type_count": 2,
    "action_type_count": 1
  }
]

Inbound Access Connections

Approver-side connection views for project and automation security boundaries. These complement the requester-side automation connections surface.

GET/api/v1/automations/projects/{project_id}/access/connections

List Project Inbound Connections

List active connections where another principal or role connects to this project boundary.

Bearer token required. IAM permission `automations:permissions:projects:manage` on the target project resource.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID

Response Fields

NameTypeDescription
id*
stringConnection ID
principal_id
string | nullConnected principal ID; null for role-subject connections
role_id
string | nullConnected role ID; null for principal-subject connections
principal_type
string | nullResolved principal or role type
principal_label
string | nullResolved display label
target_service*
stringTarget service slug (`automations`)
target_resource*
stringProject or automation resource path
created_at*
stringConnection creation timestamp
curl "https://platform.ergondata.ai/api/v1/automations/projects/{project_id}/access/connections" \
  -H "Authorization: Bearer {token}"

Response

200 OK
[
  {
    "id": "55556666-7777-8888-9999-aaaabbbbcccc",
    "principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "role_id": null,
    "principal_type": "agent",
    "principal_label": "Operations agent",
    "target_service": "automations",
    "target_resource": "org/{company_id}/automation-project/{project_id}",
    "created_at": "2026-08-06T12:00:00Z"
  }
]
DELETE/api/v1/automations/projects/{project_id}/access/connections/{connection_id}

Revoke Project Inbound Connection

Sever an inbound connection to this project boundary and remove the connected subject's access.

Bearer token required. IAM permission `automations:permissions:projects:manage` on the target project resource.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID
connection_id*
stringConnection ID
curl -X DELETE "https://platform.ergondata.ai/api/v1/automations/projects/{project_id}/access/connections/{connection_id}" \
  -H "Authorization: Bearer {token}"

Response

204 No Content
GET/api/v1/automations/automations/{automation_id}/access/connections

List Automation Inbound Connections

List active connections where another principal or role connects to this automation boundary.

Bearer token required. IAM permission `automations:permissions:automations:manage` on the target automation resource.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Response Fields

NameTypeDescription
id*
stringConnection ID
principal_id
string | nullConnected principal ID; null for role-subject connections
role_id
string | nullConnected role ID; null for principal-subject connections
principal_type
string | nullResolved principal or role type
principal_label
string | nullResolved display label
target_service*
stringTarget service slug (`automations`)
target_resource*
stringProject or automation resource path
created_at*
stringConnection creation timestamp
curl "https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/access/connections" \
  -H "Authorization: Bearer {token}"

Response

200 OK
[
  {
    "id": "55556666-7777-8888-9999-aaaabbbbcccc",
    "principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "role_id": null,
    "principal_type": "agent",
    "principal_label": "Operations agent",
    "target_service": "automations",
    "target_resource": "org/{company_id}/automation-project/{project_id}",
    "created_at": "2026-08-06T12:00:00Z"
  }
]
DELETE/api/v1/automations/automations/{automation_id}/access/connections/{connection_id}

Revoke Automation Inbound Connection

Sever an inbound connection to this automation boundary and remove the connected subject's access.

Bearer token required. IAM permission `automations:permissions:automations:manage` on the target automation resource.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID
connection_id*
stringConnection ID
curl -X DELETE "https://platform.ergondata.ai/api/v1/automations/automations/{automation_id}/access/connections/{connection_id}" \
  -H "Authorization: Bearer {token}"

Response

204 No Content

Connections & Requests

Automations reach resources in other services (workflows, worksheets, buckets, channels, …) through explicit connections. A connection is a grant the target resource's owner has approved. Where the owner has not pre-granted access, the automation raises a connection request that the owner approves or rejects; the requester can withdraw a pending request.

GET/api/v1/automations/automations/{automation_id}/connections

List Automation Connections

List the resources this automation is connected to (the approved grants its action nodes can reach).

Bearer token required.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Response Fields

NameTypeDescription
connections*
ConnectionEntry[]Established connections, including target, label, creator/requester provenance, system-management metadata, and creation time
pending_requests*
OutgoingRequestEntry[]Pending outgoing requests, including requested permissions, message, status, decision metadata, and creation time
curl "https://platform.ergondata.ai/api/v1/automations/automations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/connections" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "connections": [
    {
      "id": "55556666-7777-8888-9999-aaaabbbbcccc",
      "principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "target_service": "workflows",
      "target_resource": "org/c0ffee00-cafe-babe-dead-beefcafebabe/workflow/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "label": "Create tickets in Support",
      "created_by": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "created_by_label": "Ada",
      "requested_by": null,
      "requested_by_label": null,
      "system_managed_by": null,
      "system_managed_key": null,
      "created_at": "2025-01-15T10:30:00Z"
    }
  ],
  "pending_requests": []
}
POST/api/v1/automations/automations/{automation_id}/connections

Connect Automation

Connect this automation to a target resource. If the caller can already grant access on the target, the connection is established immediately; otherwise a connection request is raised for the target owner to approve.

Bearer token required.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Request Body

NameTypeDescription
target_service*
stringService slug to connect to (e.g. `workflows`, `channels`)
target_resource*
stringResource path to connect to (e.g. `org/{cid}/workflow/{wid}`)
permissions
string[] | nullPermission actions to request on the target resource
label
string | nullOptional human-friendly label
message
string | nullOptional message included with a connection request

Response Fields

NameTypeDescription
status*
string`connected` if established immediately, or `requested` if approval is pending
connection
ConnectionEntry | nullEstablished connection when status is `connected`
request
OutgoingRequestEntry | nullPending request when status is `requested`
curl -X POST "https://platform.ergondata.ai/api/v1/automations/automations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/connections" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "target_service": "workflows",
    "target_resource": "org/{company_id}/workflow/{workflow_id}",
    "permissions": ["workflows:workflows:items:create"],
    "label": "Create tickets in Support"
  }'

Response

201 Created
{
  "status": "requested",
  "connection": null,
  "request": {
    "id": "66667777-8888-9999-aaaa-bbbbccccdddd",
    "principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "target_service": "workflows",
    "target_resource": "org/c0ffee00-cafe-babe-dead-beefcafebabe/workflow/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "requested_by": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "requested_permissions": ["workflows:workflows:items:create"],
    "message": null,
    "status": "pending",
    "connection_id": null,
    "decided_by": null,
    "decided_at": null,
    "created_at": "2025-01-15T10:30:00Z"
  }
}
DELETE/api/v1/automations/automations/{automation_id}/connections/{connection_id}

Revoke Automation Connection

Revoke an established connection, removing the automation's access to the target resource.

Bearer token required.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID
connection_id*
string (UUID)Connection ID
curl -X DELETE "https://platform.ergondata.ai/api/v1/automations/automations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/connections/55556666-7777-8888-9999-aaaabbbbcccc" \
  -H "Authorization: Bearer {token}"

Response

204 No Content
GET/api/v1/automations/automations/{automation_id}/access/connection-requests

List Automation Connection Requests

List connection requests targeting this automation (i.e. requests from other principals or services asking to connect to it).

Bearer token required.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Query Parameters

NameTypeDescription
status
stringFilter by request status (e.g. `pending`, `approved`, `rejected`)

Response Fields

NameTypeDescription
id*
UUIDConnection request ID
status*
stringRequest status
requester_service*
stringService slug that raised the request
requester_resource*
stringResource path of the requester
permissions*
string[]Requested permission actions
message
string | nullMessage from the requester
created_at*
datetimeWhen the request was raised
curl "https://platform.ergondata.ai/api/v1/automations/automations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/access/connection-requests?status=pending" \
  -H "Authorization: Bearer {token}"

Response

200 OK
[
  {
    "id": "66667777-8888-9999-aaaa-bbbbccccdddd",
    "status": "pending",
    "requester_service": "automations",
    "requester_resource": "org/c0ffee00-cafe-babe-dead-beefcafebabe/automation-project/f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "permissions": ["automations:automations:invoke"],
    "message": "Allow the billing project to trigger this automation",
    "created_at": "2025-01-15T10:30:00Z"
  }
]
POST/api/v1/automations/automations/{automation_id}/access/connection-requests/{request_id}/approve

Approve Automation Connection Request

Approve a pending connection request targeting this automation, optionally narrowing the granted permissions.

Bearer token required.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID
request_id*
string (UUID)Connection request ID

Request Body

NameTypeDescription
grant
booleanWhether to issue the IAM grant on approval (default true)
permissions
string[] | nullOverride the permission actions to grant (defaults to the requested set)
label
string | nullOptional label for the resulting connection

Response Fields

NameTypeDescription
id*
UUIDConnection request ID
status*
string`approved`
connection_id
UUID | nullID of the connection created on approval
curl -X POST "https://platform.ergondata.ai/api/v1/automations/automations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/access/connection-requests/66667777-8888-9999-aaaa-bbbbccccdddd/approve" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{ "grant": true }'

Response

200 OK
{
  "id": "66667777-8888-9999-aaaa-bbbbccccdddd",
  "status": "approved",
  "connection_id": "55556666-7777-8888-9999-aaaabbbbcccc"
}
POST/api/v1/automations/automations/{automation_id}/access/connection-requests/{request_id}/reject

Reject Automation Connection Request

Reject a pending connection request targeting this automation.

Bearer token required.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID
request_id*
string (UUID)Connection request ID

Request Body

NameTypeDescription
reason
string | nullOptional reason recorded with the rejection

Response Fields

NameTypeDescription
id*
UUIDConnection request ID
status*
string`rejected`
curl -X POST "https://platform.ergondata.ai/api/v1/automations/automations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/access/connection-requests/66667777-8888-9999-aaaa-bbbbccccdddd/reject" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Not needed" }'

Response

200 OK
{
  "id": "66667777-8888-9999-aaaa-bbbbccccdddd",
  "status": "rejected"
}
POST/api/v1/automations/automations/{automation_id}/connection-requests/{request_id}/withdraw

Withdraw Automation Connection Request

Withdraw a pending connection request that this automation raised against another resource.

Bearer token required.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID
request_id*
string (UUID)Connection request ID

Response Fields

NameTypeDescription
id*
UUIDConnection request ID
status*
string`withdrawn`
curl -X POST "https://platform.ergondata.ai/api/v1/automations/automations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/connection-requests/66667777-8888-9999-aaaa-bbbbccccdddd/withdraw" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "id": "66667777-8888-9999-aaaa-bbbbccccdddd",
  "status": "withdrawn"
}
GET/api/v1/automations/projects/{project_id}/access/connection-requests

List Project Connection Requests

List connection requests targeting this project (the project-level access boundary).

Bearer token required.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID

Query Parameters

NameTypeDescription
status
stringFilter by request status (e.g. `pending`)

Response Fields

NameTypeDescription
id*
UUIDConnection request ID
status*
stringRequest status
requester_service*
stringService slug that raised the request
requester_resource*
stringResource path of the requester
permissions*
string[]Requested permission actions
created_at*
datetimeWhen the request was raised
curl "https://platform.ergondata.ai/api/v1/automations/projects/f47ac10b-58cc-4372-a567-0e02b2c3d479/access/connection-requests?status=pending" \
  -H "Authorization: Bearer {token}"

Response

200 OK
[
  {
    "id": "66667777-8888-9999-aaaa-bbbbccccdddd",
    "status": "pending",
    "requester_service": "workflows",
    "requester_resource": "org/c0ffee00-cafe-babe-dead-beefcafebabe/workflow/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "permissions": ["automations:automations:invoke"],
    "created_at": "2025-01-15T10:30:00Z"
  }
]
POST/api/v1/automations/projects/{project_id}/access/connection-requests/{request_id}/approve

Approve Project Connection Request

Approve a pending connection request targeting this project.

Bearer token required.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID
request_id*
string (UUID)Connection request ID

Request Body

NameTypeDescription
grant
booleanWhether to issue the IAM grant on approval (default true)
permissions
string[] | nullOverride the permission actions to grant

Response Fields

NameTypeDescription
id*
UUIDConnection request ID
status*
string`approved`
connection_id
UUID | nullID of the connection created on approval
curl -X POST "https://platform.ergondata.ai/api/v1/automations/projects/f47ac10b-58cc-4372-a567-0e02b2c3d479/access/connection-requests/66667777-8888-9999-aaaa-bbbbccccdddd/approve" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{ "grant": true }'

Response

200 OK
{
  "id": "66667777-8888-9999-aaaa-bbbbccccdddd",
  "status": "approved",
  "connection_id": "55556666-7777-8888-9999-aaaabbbbcccc"
}
POST/api/v1/automations/projects/{project_id}/access/connection-requests/{request_id}/reject

Reject Project Connection Request

Reject a pending connection request targeting this project.

Bearer token required.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID
request_id*
string (UUID)Connection request ID

Request Body

NameTypeDescription
reason
string | nullOptional reason recorded with the rejection

Response Fields

NameTypeDescription
id*
UUIDConnection request ID
status*
string`rejected`
curl -X POST "https://platform.ergondata.ai/api/v1/automations/projects/f47ac10b-58cc-4372-a567-0e02b2c3d479/access/connection-requests/66667777-8888-9999-aaaa-bbbbccccdddd/reject" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Not needed" }'

Response

200 OK
{
  "id": "66667777-8888-9999-aaaa-bbbbccccdddd",
  "status": "rejected"
}

Activity & Discovery

Automations records an activity event for every state change — runs starting and finishing, graphs being edited, connections approved. Query the service-wide feed, or scope it to a single automation or project. The access subtree also exposes the principals eligible to be granted on an automation and the resource types available for grants.

GET/api/v1/automations/activity

List Activity

List activity events across all automations the caller can see, newest first.

Bearer token required.

Query Parameters

NameTypeDescription
event_type
stringFilter by event type slug
correlation_id
stringFilter by correlation ID to follow one causal chain
page
integerPage number (1-based)Default: 1
limit
integerPage sizeDefault: 50

Response Fields

NameTypeDescription
items*
AutomationActivityItem[]Events with id, event_type, actor_id, actor_type, correlation_id, automation_id, project_id, data, and created_at
total*
integerMatching event count
page*
integerCurrent page
limit*
integerPage size
curl "https://platform.ergondata.ai/api/v1/automations/activity?limit=50" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "items": [
    {
      "id": "22223333-4444-5555-6666-777788889999",
      "event_type": "automations.run.completed",
      "actor_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "actor_type": "member",
      "correlation_id": "11111111-2222-3333-4444-555555555555",
      "automation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "data": { "status": "succeeded", "duration_ms": 412 },
      "created_at": "2025-01-15T10:30:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 50
}
GET/api/v1/automations/activity/{event_id}

Get Activity Event

Fetch a single activity event by ID.

Bearer token required.

Path Parameters

NameTypeDescription
event_id*
string (UUID)Activity event ID

Response Fields

NameTypeDescription
id*
UUIDActivity event ID
event_type*
stringEvent type slug
actor_id
UUID | nullActor principal ID
actor_type
string | nullActor principal type
automation_id
UUID | nullRelated automation
project_id
UUID | nullRelated project
correlation_id
UUID | nullCorrelation ID
data
object | nullEvent metadata payload
created_at*
datetimeWhen the event occurred
curl "https://platform.ergondata.ai/api/v1/automations/activity/22223333-4444-5555-6666-777788889999" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "id": "22223333-4444-5555-6666-777788889999",
  "event_type": "automations.run.completed",
  "actor_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "actor_type": "member",
  "correlation_id": "11111111-2222-3333-4444-555555555555",
  "automation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "data": { "status": "succeeded", "duration_ms": 412 },
  "created_at": "2025-01-15T10:30:00Z"
}
GET/api/v1/automations/automations/{automation_id}/activity

List Automation Activity

List activity events scoped to a single automation.

Bearer token required.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Query Parameters

NameTypeDescription
event_type
stringFilter by event type slug
correlation_id
stringFilter by correlation ID
page
integerPage number (1-based)Default: 1
limit
integerPage sizeDefault: 50

Response Fields

NameTypeDescription
items*
AutomationActivityItem[]Activity events for the automation
total*
integerMatching event count
page*
integerCurrent page
limit*
integerPage size
curl "https://platform.ergondata.ai/api/v1/automations/automations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/activity?limit=50" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "items": [
    {
      "id": "22223333-4444-5555-6666-777788889999",
      "event_type": "automations.run.started",
      "automation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "created_at": "2025-01-15T10:30:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 50
}
GET/api/v1/automations/projects/{project_id}/activity

List Project Activity

List activity events for every automation in a project.

Bearer token required.

Path Parameters

NameTypeDescription
project_id*
string (UUID)Project ID

Query Parameters

NameTypeDescription
event_type
stringFilter by event type slug
correlation_id
stringFilter by correlation ID
page
integerPage number (1-based)Default: 1
limit
integerPage sizeDefault: 50

Response Fields

NameTypeDescription
items*
AutomationActivityItem[]Activity events for the project
total*
integerMatching event count
page*
integerCurrent page
limit*
integerPage size
curl "https://platform.ergondata.ai/api/v1/automations/projects/f47ac10b-58cc-4372-a567-0e02b2c3d479/activity?limit=50" \
  -H "Authorization: Bearer {token}"

Response

200 OK
{
  "items": [
    {
      "id": "22223333-4444-5555-6666-777788889999",
      "event_type": "automations.automation.created",
      "automation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "created_at": "2025-01-15T10:30:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 50
}
GET/api/v1/automations/automations/{automation_id}/access/eligible

List Eligible Principals

List the principals (members, API keys, agents, machine principals) eligible to be granted access on this automation.

Bearer token required.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Response Fields

NameTypeDescription
principal_id*
UUIDPrincipal ID
principal_type*
stringuser | api_key | agent | machine
display_name*
stringPrincipal display name
curl "https://platform.ergondata.ai/api/v1/automations/automations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/access/eligible" \
  -H "Authorization: Bearer {token}"

Response

200 OK
[
  {
    "principal_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "principal_type": "user",
    "display_name": "Ada Lovelace"
  }
]
GET/api/v1/automations/automations/{automation_id}/access/resource-types

List Grantable Resource Types

List the resource types (and their permission actions) available when granting access on this automation.

Bearer token required.

Path Parameters

NameTypeDescription
automation_id*
string (UUID)Automation ID

Response Fields

NameTypeDescription
resource_type*
stringResource type slug
label*
stringHuman-friendly label
permissions*
string[]Permission actions available for this resource type
curl "https://platform.ergondata.ai/api/v1/automations/automations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/access/resource-types" \
  -H "Authorization: Bearer {token}"

Response

200 OK
[
  {
    "resource_type": "automation",
    "label": "Automation",
    "permissions": ["automations:automations:view", "automations:automations:invoke", "automations:automations:manage"]
  }
]

Personal Project Preferences

User-session-only Studio presentation state. These operations are intentionally not agent tools because agent and machine principals do not have personal project-tree preferences.

GET/api/v1/automations/companies/{company_id}/project-prefs

Get Project Preferences

Return the calling user's favorite project and custom project ordering for one company.

Bearer token with a user identity required. The token company must match `company_id`; principal-only tokens without `user_id` are rejected.

Path Parameters

NameTypeDescription
company_id*
string (UUID)Company ID

Response Fields

NameTypeDescription
favorite_project_id
UUID | nullFavorite project, or null
project_order*
UUID[]Custom project ordering
curl "https://platform.ergondata.ai/api/v1/automations/companies/{company_id}/project-prefs" \
  -H "Authorization: Bearer {user_token}"

Response

200 OK
{
  "favorite_project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "project_order": ["f47ac10b-58cc-4372-a567-0e02b2c3d479"]
}
PUT/api/v1/automations/companies/{company_id}/project-prefs

Update Project Preferences

Partially update the calling user's favorite project and custom project ordering.

Bearer token with a user identity required. The token company must match `company_id`; principal-only tokens without `user_id` are rejected.

Path Parameters

NameTypeDescription
company_id*
string (UUID)Company ID

Request Body

NameTypeDescription
favorite_project_id
UUID | nullFavorite project; null clears it
project_order
UUID[] | nullReplacement order; null clears it

Response Fields

NameTypeDescription
favorite_project_id
UUID | nullFavorite project, or null
project_order*
UUID[]Custom project ordering
curl -X PUT "https://platform.ergondata.ai/api/v1/automations/companies/{company_id}/project-prefs" \
  -H "Authorization: Bearer {user_token}" \
  -H "Content-Type: application/json" \
  -d '{"favorite_project_id":"f47ac10b-58cc-4372-a567-0e02b2c3d479"}'

Response

200 OK
{
  "favorite_project_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "project_order": []
}