Documentation menu

Automations API

The Automations API allows you to programmatically manage your automation workflows, including creating, updating, and triggering automations.

List Automations

Retrieves a list of all automations in your account.

GET /api/automations

Response

[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Welcome Series",
    "trigger_type": "subscription",
    "is_active": true,
    "definition": { "...": "..." },
    "created_at": "2023-01-01T00:00:00.000Z",
    "total_runs": 150,
    "completed_runs": 145
  }
]

Get Automation

Retrieves detailed information about a specific automation.

GET /api/automations/:id

Parameters

NameTypeDescription
idstringThe ID of the automation

Create Automation

Creates a new automation.

POST /api/automations

Body

FieldTypeDescription
namestringRequired. Name of the automation
triggerTypestringRequired. Type of trigger (e.g., subscription, webhook)
definitionobjectRequired. JSON object defining the automation steps
isActivebooleanWhether the automation is active (default: true)
webhookSecretstringOptional secret for webhook triggers

Update Automation

Updates an existing automation.

PUT /api/automations/:id

Delete Automation

Deletes an automation.

DELETE /api/automations/:id

Trigger Automation (List)

Manually triggers an automation for all contacts in a specific email list.

POST /api/automations/:id/trigger

Body

FieldTypeDescription
listIdstringRequired. ID of the email list to process

Trigger Automation (Contact)

Manually triggers an automation for a single contact. Useful for testing.

POST /api/automations/:id/test

Body

FieldTypeDescription
contactIdstringRequired. ID of the contact to trigger for

Toggle Automation

Toggles the active state of an automation.

POST /api/automations/:id/toggle

Get Automation Runs

Retrieves the execution history of an automation.

GET /api/automations/:id/runs

Query Parameters

NameTypeDescription
limitnumberNumber of records to return (default: 50)
offsetnumberPagination offset (default: 0)