Skip to main content
All Automations endpoints sit under /api/brands/{brand}/automations/ with moduleAccess:automations middleware. Authenticate with EF-Access-Key.

List Automations

GET /api/brands/{brand}/automations
per_page
number
Results per page (1–100, default: 25)
q
string
Search by title
sort
string
newest (default), oldest, created_at, updated_at
sort_direction
string
asc or desc (used with created_at / updated_at)
cURL
curl "https://app.elasticfunnels.io/api/brands/{brand_id}/automations?q=welcome&per_page=50" \
  -H "EF-Access-Key: your_api_key_here"
{
  "current_page": 1,
  "data": [
    {
      "id": 12,
      "title": "Welcome Email Sequence",
      "status": "active",
      "trigger_node_type": "form_submission",
      "entry_node": "start",
      "postback_code": "abc-123",
      "collection_code": "lead-capture",
      "created_at": "2024-12-01T10:00:00.000000Z",
      "updated_at": "2024-12-10T15:00:00.000000Z"
    }
  ],
  "per_page": 25,
  "total": 8,
  "last_page": 1
}

List Automations (Unpaginated)

GET /api/brands/{brand}/automations/all
Returns { id, title } for all automations — useful for dropdowns.
[
  { "id": 12, "title": "Welcome Email Sequence" },
  { "id": 15, "title": "Abandoned Cart Recovery" }
]

Get Automation

GET /api/brands/{brand}/automations/{automation}
{
  "id": 12,
  "title": "Welcome Email Sequence",
  "postback_code": "abc-123",
  "trigger_node_type": "form_submission"
}

Create Automation

POST /api/brands/{brand}/automations
title
string
required
Automation name (max 255 chars)
cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/automations \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"title": "Post-Purchase Upsell"}'
{
  "automation": {
    "id": 16,
    "title": "Post-Purchase Upsell",
    "status": "draft",
    "brand_id": 42,
    "created_at": "2024-12-11T10:00:00.000000Z"
  }
}

Update Automation

PUT /api/brands/{brand}/automations/{automation}
title
string
New title (max 255)
status
string
active, inactive, or draft
trigger_node_type
string
Trigger type (e.g. form_submission, purchase, tag_added)
entry_node
string
Entry node code
postback_code
string
Custom postback code (max 255)
collection_code
string
Collection code to attach

Delete Automation

DELETE /api/brands/{brand}/automations/{automation}
{ "success": true }

Clone Automation

Creates a full copy of an automation within the same brand.
POST /api/brands/{brand}/automations/{automation}/clone
title
string
New name for the clone. Defaults to "<original title> (Copy)".
cURL
curl -X POST https://app.elasticfunnels.io/api/brands/{brand_id}/automations/12/clone \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"title": "Welcome Sequence v2"}'
{
  "automation": {
    "id": 17,
    "title": "Welcome Sequence v2",
    "status": "draft"
  }
}

Copy Automation to Another Brand

POST /api/brands/{brand}/automations/copy
id
number
required
Source automation ID
brand_id
number
required
Target brand ID to copy into
name
string
required
Title for the copied automation in the target brand
{
  "automation_id": 23
}

Export Automations

Queue a CSV export of automation records.
POST /api/brands/{brand}/automations/export
filters
array
Filter conditions
selected_ids
array
Limit export to specific automation IDs
columns
array
Columns to include
{
  "success": true,
  "message": "Export started. You will receive an email when it is ready."
}

Get Builder Config

Returns the full visual-builder JSON for an automation. If a draft revision exists, the draft is returned instead of the published version.
GET /api/brands/{brand}/automations/{automation}/builder
cURL
curl https://app.elasticfunnels.io/api/brands/{brand_id}/automations/12/builder \
  -H "EF-Access-Key: your_api_key_here"
{
  "id": 12,
  "title": "Welcome Email Sequence",
  "config": {
    "nodes": { /* builder nodes */ },
    "connections": { /* node connections */ }
  },
  "version": 3,
  "trigger_node_type": "form_submission"
}

Save Builder Config

Saves the visual-builder JSON. Pass draft=true to save as a draft revision without publishing.
POST /api/brands/{brand}/automations/{automation}/builder
(full builder document)
object
The complete builder config object (same shape as returned by GET)
draft
boolean
If true, saves as a draft revision. Published configs are deployed to S3 and activate the automation.
cURL — save as draft
curl -X POST "https://app.elasticfunnels.io/api/brands/{brand_id}/automations/12/builder?draft=true" \
  -H "EF-Access-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{ /* builder JSON */ }'

Discard Draft Revision

Discards the current draft revision and reverts to the last published version.
POST /api/brands/{brand}/automations/{automation}/discard-revision
{
  "id": 12,
  "title": "Welcome Email Sequence",
  "config": { /* last published config */ }
}

Get Automation Stats

Returns execution counts per node, aggregated from the event log.
GET /api/brands/{brand}/automations/{automation}/stats
cURL
curl https://app.elasticfunnels.io/api/brands/{brand_id}/automations/12/stats \
  -H "EF-Access-Key: your_api_key_here"
{
  "start-node-abc": {
    "success": 315,
    "failed": 2,
    "skipped": 5
  },
  "send-email-def": {
    "success": 308,
    "failed": 9
  }
}

Execution Summary

Global summary of automation runs for the brand.
GET /api/brands/{brand}/automations/summary
{
  "total_runs": 1420,
  "successful_tasks": 1387,
  "failed_tasks": 33,
  "task_status_counts": {
    "success": 1387,
    "failed": 33
  },
  "period_start_date": "2024-12-01T00:00:00Z",
  "period_end_date": "2024-12-31T23:59:59Z"
}

Execution Summary by Automation

GET /api/brands/{brand}/automations/summary-by-automation
Returns execution stats grouped per automation ID.

Automation Event Log

GET /api/brands/{brand}/automations/{automation}/logs
Returns paginated execution log for a specific automation.

Automation Events

GET /api/brands/{brand}/automations/{automation}/events
Returns available event types that have fired for this automation.

Notes

  • postback_code is the unique trigger code used in postback URLs (/webhooks/{code})
  • Builder configs are deployed to S3 on publish — draft saves do not activate the automation
  • Stats are read from Elasticsearch and may have a short indexing delay
  • The copy endpoint copies across brands; clone copies within the same brand