API Reference
Automations
Trigger-based email workflows that run automatically on contact events
Automations
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 |
GET /api/v1/automations
List all automations for the authenticated account.
curl "https://mail.misar.io/api/v1/automations?page=1&limit=20" \
-H "Authorization: Bearer msk_YOUR_API_KEY"Response
{
"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
}POST /api/v1/automations
Create a new automation workflow.
curl -X POST https://mail.misar.io/api/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}}"
}
]
}'Request Fields
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | ✓ | Internal name for the automation |
trigger_type | string | ✓ | See trigger types below |
trigger_config | object | — | Configuration specific to the trigger type |
steps | array | ✓ | Ordered list of email steps |
steps[].delay_minutes | number | ✓ | Delay after previous step (0 = immediately) |
steps[].template_id | string | ✓ | Template to send at this step |
steps[].subject | string | — | Override the template subject for this step |
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 |
Response
{
"success": true,
"automation": {
"id": "auto_xyz789",
"name": "Welcome Series",
"status": "inactive",
"steps": 2
}
}Errors
| Code | Reason |
|---|---|
403 | Automation quota reached for your plan (Free: 2, Pro: 10) |
400 | Invalid trigger_type or missing steps |
PATCH /api/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.
curl -X PATCH https://mail.misar.io/api/v1/automations/auto_xyz789 \
-H "Authorization: Bearer msk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Welcome Series v2" }'POST /api/v1/automations/:id/activate
Activate or deactivate an automation. Deactivated automations stop enrolling new contacts but do not interrupt contacts currently in-flight.
curl -X POST https://mail.misar.io/api/v1/automations/auto_xyz789/activate \
-H "Authorization: Bearer msk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "active": true }'Request Fields
| Field | Type | Required | Notes |
|---|---|---|---|
active | boolean | ✓ | true to activate, false to deactivate |
Response
{
"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 |