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
| Method | Path | Description |
|---|---|---|
GET | /api/v1/automations | List automation workflows |
POST | /api/v1/automations | Create an automation |
GET | /api/v1/automations/:id | Get a single automation |
PATCH | /api/v1/automations/:id | Update an automation |
DELETE | /api/v1/automations/:id | Delete an automation |
POST | /api/v1/automations/:id/activate | Activate or deactivate |
List automations
/mail/v1/automationsList all automations for the authenticated account.
Query parameters
pagenumberquerydefault: 1Page number.
limitnumberquerydefault: 20Results per page.
Response fields
successbooleantrue when the request succeeded.
automationsArray<Automation>The page of automations. Each includes id, name, trigger_type, status, step_count, enrolled, and created_at.
totalnumberTotal number of automations.
pagenumberCurrent page number.
limitnumberResults 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
/mail/v1/automationsCreate a new automation workflow.
Request body
namestringbodyrequiredInternal name for the automation.
trigger_typestringbodyrequiredSee trigger types below.
trigger_configobjectbodyConfiguration specific to the trigger type.
stepsarraybodyrequiredOrdered list of email steps.
steps[].delay_minutesnumberbodyrequiredDelay after previous step (0 = immediately).
steps[].template_idstringbodyrequiredTemplate to send at this step.
steps[].subjectstringbodyOverride the template subject for this step.
Response fields
successbooleantrue when the automation was created.
automationobjectThe 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
| Trigger | Description | trigger_config keys |
|---|---|---|
welcome_email | Contact added to a list | list_id |
abandoned_cart | Custom event cart_abandoned fired | event_name, product_url |
re_engagement | Contact inactive for N days | inactive_days |
custom_event | Any custom event sent to /api/v1/track/event | event_name |
Errors
| Code | Reason |
|---|---|
403 | Automation quota reached for your plan (Free: 2, Pro: 10) |
400 | Invalid trigger_type or missing steps |
Update an automation
/mail/v1/automations/:idUpdate an existing automation. Changes take effect for contacts entering the workflow after the update. Contacts already in-flight are not affected.
Path parameters
idstringpathrequiredID of the automation to update.
Request body
namestringbodyInternal 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
/mail/v1/automations/:id/activateActivate or deactivate an automation. Deactivated automations stop enrolling new contacts but do not interrupt contacts currently in-flight.
Path parameters
idstringpathrequiredID of the automation.
Request body
activebooleanbodyrequiredtrue to activate, false to deactivate.
Response fields
successbooleantrue when the status was updated.
automationobjectThe 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
| Status | Meaning |
|---|---|
inactive | Created but not yet activated — no new enrollments |
active | Running — new contacts are enrolled on trigger |
paused | Temporarily stopped via dashboard |
archived | Soft-deleted — not visible by default |