Create automation workflow

Create a new automation workflow.

Scopes: automations.write

Trigger condition examples

The trigger.condition field defines the event that enrolls contacts into the automation. Most trigger events use standard Events API event names and may require origin. Built-in trigger events, such as "birthday", do not use origin.

For the "birthday" trigger, omit trigger.condition.filterGroups to enroll contacts on the day of their birthday. To shift the trigger time, add one filter group with exactly one filter:

FieldOperatorValue shape
birthdateeqHour offset string from the birthday, e.g. "-24h", "48h"
Birthday trigger on the contact birthday
{
  "condition": {
    "event": "birthday"
  }
}
Birthday trigger before the contact birthday
{
  "condition": {
    "event": "birthday",
    "filterGroups": [
      {
        "logicalOperator": "and",
        "filters": [
          {"field": "birthdate", "operator": "eq", "value": "-24h"}
        ]
      }
    ]
  }
}
Birthday trigger after the contact birthday
{
  "condition": {
    "event": "birthday",
    "filterGroups": [
      {
        "logicalOperator": "and",
        "filters": [
          {"field": "birthdate", "operator": "eq", "value": "48h"}
        ]
      }
    ]
  }
}

To trigger an automation when a contact enters a specific segment, use the entered segment event with origin: "omnisend" and filter the trigger condition by segment_id. This is different from audienceFilterGroup, which only restricts who can enter after the trigger fires.

Trigger when a contact enters a specific segment
{
  "condition": {
    "event": "entered segment",
    "origin": "omnisend",
    "filterGroups": [
      {
        "logicalOperator": "and",
        "filters": [
          {"field": "segment_id", "operator": "eq", "value": "000000000000000000000001"}
        ]
      }
    ]
  }
}

Audience filter group examples

The trigger.audienceFilterGroup field is optional. When set, only contacts matching the filters are enrolled when the trigger fires — omit it to enroll everyone who triggers the event.

Supported fields

FieldOperatorsValue shape
segmentIDeq, neqSegment ID string, e.g. "000000000000000000000001"
tageq, neqTag name, e.g. "vip"
dateAddedeq, neq, gt, ltISO-8601 date, e.g. "2025-03-15"
firstNameeq, neq, contains, notContainsFree string, e.g. "John"
lastNameeq, neq, contains, notContainsFree string, e.g. "Smith"
gendereq"m" or "f"
countryeq, neq, contains, notContainsISO-2 country code, e.g. "US"
stateeq, neq, contains, notContainsState / region name, e.g. "California"
cityeq, neq, contains, notContainsCity name, e.g. "New York"
postalCodeeq, neq, contains, notContainsPostal code string, e.g. "10001"

Where it fits

audienceFilterGroup is a sibling of condition inside trigger:

{
  "name": "...",
  "trigger": {
    "condition": {
      "event": "...",
      "origin": "..."
    },
    "audienceFilterGroup": { ... }
  },
  "blocks": [ ... ]
}

Each example below shows only the audienceFilterGroup value — slot it into the skeleton above.

Restrict to a single segment
{
  "logicalOperator": "and",
  "filters": [
    {"field": "segmentID", "operator": "eq", "value": "000000000000000000000001"}
  ]
}
Include one tag, exclude another
{
  "logicalOperator": "and",
  "filters": [
    {"field": "tag", "operator": "eq",  "value": "early-adopter"},
    {"field": "tag", "operator": "neq", "value": "beta-churned"}
  ]
}
Gender (only `eq`, only `"m"` or `"f"`)
{
  "logicalOperator": "and",
  "filters": [
    {"field": "gender", "operator": "eq", "value": "f"}
  ]
}
Country + city substring match
{
  "logicalOperator": "and",
  "filters": [
    {"field": "country", "operator": "eq",       "value": "US"},
    {"field": "city",    "operator": "contains", "value": "York"}
  ]
}
Recent contacts only (date cohort)
{
  "logicalOperator": "and",
  "filters": [
    {"field": "dateAdded", "operator": "gt", "value": "2025-01-01"}
  ]
}
OR across multiple tags
{
  "logicalOperator": "or",
  "filters": [
    {"field": "tag", "operator": "eq", "value": "vip"},
    {"field": "tag", "operator": "eq", "value": "beta"}
  ]
}
AND across name, country, and tag
{
  "logicalOperator": "and",
  "filters": [
    {"field": "firstName", "operator": "contains", "value": "John"},
    {"field": "country",   "operator": "eq",       "value": "US"},
    {"field": "tag",       "operator": "eq",       "value": "vip"}
  ]
}
Body Params

Automation to create

Create automation workflow request.

blocks
array of objects
required

Automation workflow blocks (actions, delays, splits, A/B tests). At least one block is required.

blocks*
exitConditions
array of objects

Exit conditions. When a contact triggers any of these events, they are immediately removed from the workflow. Multiple exit conditions are evaluated with OR logic.

exitConditions
string
required

Automation workflow name

settings
object

Automation settings configuration for create. All sub-fields are optional — omit to use engine defaults. sendingThresholds does not accept null — sending null returns 400. frequencyLimiter accepts null (treated the same as omitted: no limiter is set). overlapLimiter accepts null and is treated the same as omitting the field (engine performs no overlap check).

trigger
object
required

Trigger configuration for automation creation. The condition.event field identifies what triggers the automation workflow. Most events are standard events received via the Events API (e.g. "placed order", "started checkout"). In addition, the following built-in trigger events are available without the Events API: "birthday" (contact birthday anniversary), "product back in stock".

Headers
string
required
Defaults to 2026-03-15

API version that specifies the response format and behaviour

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json