Misar IO Docs

Automations

Create trigger-based email automation workflows.

Automations

Automations send emails (or sequences of emails) automatically when a trigger condition fires.

Base: https://api.misar.io/mail/v1/automations

Required scope: write / read

List automations

GET /v1/automations
{
  "success": true,
  "data": [
    {
      "id": "auto_01ABCDEF",
      "name": "Welcome sequence",
      "status": "active",
      "trigger": "contact.created",
      "steps": 3,
      "enrolled": 1240,
      "createdAt": "2025-04-01T00:00:00Z"
    }
  ]
}

Get automation

GET /v1/automations/:id

Create automation

POST /v1/automations
{
  "name": "Welcome sequence",
  "trigger": {
    "type": "contact.created",
    "filters": { "tags": ["trial"] }
  },
  "steps": [
    {
      "type": "send_email",
      "delay": 0,
      "templateId": "tmpl_welcome",
      "subject": "Welcome to {{company}}!"
    },
    {
      "type": "wait",
      "delay": 86400
    },
    {
      "type": "send_email",
      "delay": 0,
      "templateId": "tmpl_day2_tips",
      "subject": "3 things to try today"
    },
    {
      "type": "condition",
      "delay": 259200,
      "condition": { "metric": "opened", "operator": "eq", "value": false },
      "onTrue": "tmpl_nudge",
      "onFalse": null
    }
  ]
}

Trigger types

| Trigger | Fires when | |---------|-----------| | contact.created | New contact is added | | contact.tag_added | Tag added to a contact | | event.tracked | Custom event fires (/v1/track/event) | | campaign.opened | Contact opens a specific campaign | | campaign.clicked | Contact clicks a link in a campaign | | date.anniversary | Contact field date is reached (e.g. birthday) | | segment.joined | Contact enters a segment |

Step types

| Type | Description | |------|-------------| | send_email | Send a template or inline email | | wait | Delay in seconds before next step | | condition | Branch based on open/click/event | | add_tag | Add tag to contact | | remove_tag | Remove tag from contact | | update_field | Update a contact metadata field | | webhook | POST to an external URL |

Update automation

PATCH /v1/automations/:id

Delete automation

DELETE /v1/automations/:id

Deletes the automation and cancels all pending enrollments.

Pause / resume

PATCH /v1/automations/:id
{ "status": "paused" }
{ "status": "active" }

Enrollment

Contacts are enrolled automatically when a trigger fires. To manually enroll a contact:

POST /v1/automations/:id/enroll
{ "email": "[email protected]" }