Misar Docs
MisarMailMisar.BlogMisarReachMisarPostMisar.DevMisar PlatformMisar IdentityMisar Posts API
Api Reference

Automations

Trigger-based email workflows that run automatically on contact events

Automations are trigger-based workflows that send emails automatically when a contact meets a defined condition. Each automation has one trigger and one or more timed steps.

Auth scope: automations


Endpoints

MethodPathDescription
GET/api/v1/automationsList automation workflows
POST/api/v1/automationsCreate an automation
GET/api/v1/automations/:idGet a single automation
PATCH/api/v1/automations/:idUpdate an automation
DELETE/api/v1/automations/:idDelete an automation
POST/api/v1/automations/:id/activateActivate or deactivate

List automations

GET/mail/v1/automations

List all automations for the authenticated account.

Query parameters

pagenumberquerydefault: 1

Page number.

limitnumberquerydefault: 20

Results per page.

Response fields

successboolean

true when the request succeeded.

automationsArray<Automation>

The page of automations. Each includes id, name, trigger_type, status, step_count, enrolled, and created_at.

totalnumber

Total number of automations.

pagenumber

Current page number.

limitnumber

Results per page.

curl "https://api.misar.io/mail/v1/automations?page=1&limit=20" \
  -H "Authorization: Bearer msk_YOUR_API_KEY"
{
  "success": true,
  "automations": [
    {
      "id":           "auto_xyz789",
      "name":         "Welcome Series",
      "trigger_type": "welcome_email",
      "status":       "active",
      "step_count":   3,
      "enrolled":     142,
      "created_at":   "2026-02-01T09:00:00Z"
    }
  ],
  "total": 8,
  "page":  1,
  "limit": 20
}

Create an automation

POST/mail/v1/automations

Create a new automation workflow.

Request body

namestringbodyrequired

Internal name for the automation.

trigger_typestringbodyrequired

See trigger types below.

trigger_configobjectbody

Configuration specific to the trigger type.

stepsarraybodyrequired

Ordered list of email steps.

steps[].delay_minutesnumberbodyrequired

Delay after previous step (0 = immediately).

steps[].template_idstringbodyrequired

Template to send at this step.

steps[].subjectstringbody

Override the template subject for this step.

Response fields

successboolean

true when the automation was created.

automationobject

The created automation, including id, name, status, and steps.

curl -X POST https://api.misar.io/mail/v1/automations \
  -H "Authorization: Bearer msk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name":           "Welcome Series",
    "trigger_type":   "welcome_email",
    "trigger_config": {
      "list_id": "list_abc123"
    },
    "steps": [
      {
        "delay_minutes": 0,
        "template_id":   "tpl_welcome_1",
        "subject":       "Welcome, {{first_name}}!"
      },
      {
        "delay_minutes": 1440,
        "template_id":   "tpl_welcome_2",
        "subject":       "Getting started with {{company_name}}"
      }
    ]
  }'
{
  "success": true,
  "automation": {
    "id":     "auto_xyz789",
    "name":   "Welcome Series",
    "status": "inactive",
    "steps":  2
  }
}

Trigger Types

TriggerDescriptiontrigger_config keys
welcome_emailContact added to a listlist_id
abandoned_cartCustom event cart_abandoned firedevent_name, product_url
re_engagementContact inactive for N daysinactive_days
custom_eventAny custom event sent to /api/v1/track/eventevent_name

Errors

CodeReason
403Automation quota reached for your plan (Free: 2, Pro: 10)
400Invalid trigger_type or missing steps

Update an automation

PATCH/mail/v1/automations/:id

Update an existing automation. Changes take effect for contacts entering the workflow after the update. Contacts already in-flight are not affected.

Path parameters

idstringpathrequired

ID of the automation to update.

Request body

namestringbody

Internal name for the automation.

curl -X PATCH https://api.misar.io/mail/v1/automations/auto_xyz789 \
  -H "Authorization: Bearer msk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Welcome Series v2" }'

Activate or deactivate

POST/mail/v1/automations/:id/activate

Activate or deactivate an automation. Deactivated automations stop enrolling new contacts but do not interrupt contacts currently in-flight.

Path parameters

idstringpathrequired

ID of the automation.

Request body

activebooleanbodyrequired

true to activate, false to deactivate.

Response fields

successboolean

true when the status was updated.

automationobject

The updated automation, including id and status.

curl -X POST https://api.misar.io/mail/v1/automations/auto_xyz789/activate \
  -H "Authorization: Bearer msk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "active": true }'
{
  "success": true,
  "automation": {
    "id":     "auto_xyz789",
    "status": "active"
  }
}

Automation Status Values

StatusMeaning
inactiveCreated but not yet activated — no new enrollments
activeRunning — new contacts are enrolled on trigger
pausedTemporarily stopped via dashboard
archivedSoft-deleted — not visible by default