API & WebhooksAutomations

Automations

List automations, get automation details with nodes and edges, and list automation runs via the API.

Automations API

Read automation data and execution history. All endpoints require an API token with the automations.view ability.


List Automations

GET /api/v1/automations — Permission: automations.view

Query Parameters

ParameterTypeRequiredDescription
searchstringNoSearch by automation name
is_activebooleanNoFilter by active status
per_pageintegerNoResults per page, 1–100 (default: 25)

Example Request

curl -X GET "https://your-domain.com/api/v1/automations?is_active=true" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Example Response

{
  "data": [
    {
      "id": 1,
      "name": "Welcome Email on Form Submit",
      "description": "Sends a welcome email when the contact form is submitted",
      "is_active": true,
      "trigger_type": "form_submitted",
      "last_triggered_at": "2025-06-01T12:00:00.000000Z",
      "trigger_count": 87,
      "run_count": 87,
      "created_at": "2025-02-10T09:00:00.000000Z",
      "updated_at": "2025-05-20T15:30:00.000000Z"
    }
  ],
  "meta": { "current_page": 1, "last_page": 1, "per_page": 25, "total": 1 },
  "links": { "first": "...", "last": "...", "prev": null, "next": null }
}

Get Automation

GET /api/v1/automations/{id} — Permission: automations.view

Returns the automation with its nodes (actions/conditions) and edges (connections).

Example Request

curl -X GET "https://your-domain.com/api/v1/automations/1" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Example Response

{
  "data": {
    "id": 1,
    "name": "Welcome Email on Form Submit",
    "description": "Sends a welcome email when the contact form is submitted",
    "is_active": true,
    "trigger_type": "form_submitted",
    "last_triggered_at": "2025-06-01T12:00:00.000000Z",
    "trigger_count": 87,
    "run_count": 87,
    "nodes": [
      { "id": 1, "type": "trigger", "config": { "form_id": 1 }, "position_x": 100, "position_y": 50 },
      { "id": 2, "type": "send_email", "config": { "template": "welcome" }, "position_x": 100, "position_y": 200 }
    ],
    "edges": [
      { "id": 1, "source_node_id": 1, "target_node_id": 2, "condition": null }
    ],
    "created_at": "2025-02-10T09:00:00.000000Z",
    "updated_at": "2025-05-20T15:30:00.000000Z"
  }
}

List Runs

GET /api/v1/automations/{id}/runs — Permission: automations.view

Query Parameters

ParameterTypeRequiredDescription
statusstringNoFilter by status: running, waiting, completed, failed, cancelled
per_pageintegerNoResults per page, 1–100 (default: 25)

Example Request

curl -X GET "https://your-domain.com/api/v1/automations/1/runs?status=completed" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Example Response

{
  "data": [
    {
      "id": 100,
      "automation_id": 1,
      "status": "completed",
      "trigger_type": "form_submitted",
      "started_at": "2025-06-01T12:00:00.000000Z",
      "completed_at": "2025-06-01T12:00:02.000000Z",
      "logs_count": 3
    }
  ],
  "meta": { "current_page": 1, "last_page": 4, "per_page": 25, "total": 87 },
  "links": { "first": "...", "last": "...", "prev": null, "next": "..." }
}

Was this article helpful?