Create automation workflow
Create a new automation workflow.
Scopes: automations.write
Rate Limiting: This endpoint is rate limited to 400 requests per minute.
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:
| Field | Operator | Value shape |
|---|---|---|
| birthdate | eq | Hour offset string from the birthday, e.g. "-24h", "48h" |
{
"condition": {
"event": "birthday"
}
}
</details>
<details id="example-trigger-birthday-before-birthday">
<summary>Birthday trigger before the contact birthday</summary>
{
"condition": {
"event": "birthday",
"filterGroups": [
{
"logicalOperator": "and",
"filters": [
{"field": "birthdate", "operator": "eq", "value": "-24h"}
]
}
]
}
}
</details>
<details id="example-trigger-birthday-after-birthday">
<summary>Birthday trigger after the contact birthday</summary>
{
"condition": {
"event": "birthday",
"filterGroups": [
{
"logicalOperator": "and",
"filters": [
{"field": "birthdate", "operator": "eq", "value": "48h"}
]
}
]
}
}
</details>
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.
<details id="example-trigger-entered-segment"> <summary>Trigger when a contact enters a specific segment</summary>{
"condition": {
"event": "entered segment",
"origin": "omnisend",
"filterGroups": [
{
"logicalOperator": "and",
"filters": [
{"field": "segment_id", "operator": "eq", "value": "000000000000000000000001"}
]
}
]
}
}
</details>
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
| Field | Operators | Value shape |
|---|---|---|
| segmentID | eq, neq | Segment ID string, e.g. "000000000000000000000001" |
| tag | eq, neq | Tag name, e.g. "vip" |
| dateAdded | eq, neq, gt, lt | ISO-8601 date, e.g. "2025-03-15" |
| firstName | eq, neq, contains, notContains | Free string, e.g. "John" |
| lastName | eq, neq, contains, notContains | Free string, e.g. "Smith" |
| gender | eq | "m" or "f" |
| country | eq, neq, contains, notContains | ISO-2 country code, e.g. "US" |
| state | eq, neq, contains, notContains | State / region name, e.g. "California" |
| city | eq, neq, contains, notContains | City name, e.g. "New York" |
| postalCode | eq, neq, contains, notContains | Postal 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.
<details id="example-audience-filter-by-segment"> <summary>Restrict to a single segment</summary>{
"logicalOperator": "and",
"filters": [
{"field": "segmentID", "operator": "eq", "value": "000000000000000000000001"}
]
}
</details>
<details id="example-audience-filter-by-tag-include-exclude">
<summary>Include one tag, exclude another</summary>
{
"logicalOperator": "and",
"filters": [
{"field": "tag", "operator": "eq", "value": "early-adopter"},
{"field": "tag", "operator": "neq", "value": "beta-churned"}
]
}
</details>
<details id="example-audience-filter-by-gender">
<summary>Gender (only `eq`, only `"m"` or `"f"`)</summary>
{
"logicalOperator": "and",
"filters": [
{"field": "gender", "operator": "eq", "value": "f"}
]
}
</details>
<details id="example-audience-filter-by-location">
<summary>Country + city substring match</summary>
{
"logicalOperator": "and",
"filters": [
{"field": "country", "operator": "eq", "value": "US"},
{"field": "city", "operator": "contains", "value": "York"}
]
}
</details>
<details id="example-audience-filter-by-date-added">
<summary>Recent contacts only (date cohort)</summary>
{
"logicalOperator": "and",
"filters": [
{"field": "dateAdded", "operator": "gt", "value": "2025-01-01"}
]
}
</details>
<details id="example-audience-filter-combined-or">
<summary>OR across multiple tags</summary>
{
"logicalOperator": "or",
"filters": [
{"field": "tag", "operator": "eq", "value": "vip"},
{"field": "tag", "operator": "eq", "value": "beta"}
]
}
</details>
<details id="example-audience-filter-combined-and">
<summary>AND across name, country, and tag</summary>
{
"logicalOperator": "and",
"filters": [
{"field": "firstName", "operator": "contains", "value": "John"},
{"field": "country", "operator": "eq", "value": "US"},
{"field": "tag", "operator": "eq", "value": "vip"}
]
}
</details>Request
- Base URLhttps://api.omnisend.com/api
- URLhttps://api.omnisend.com/api/automations
- Auth
- OAuth 2Client credentialsToken URL: https://app.omnisend.com/oauth2/token scopes: automations.write
- or API key in header Authorization
Headers
API version that specifies the response format and behaviour
Request body
Example request
{
"blocks": [
{
"abTesting": {
"aBlocksPercentage": 50
},
"action": {
"addTag": {
"value": "vip-customer"
},
"removeTag": {
"value": "vip-customer"
},
"sendEmail": {
"isSkipAllowed": true,
"language": "en_US",
"preheader": "Check out what we have for you",
"replyToEmail": "support@example.com",
"senderEmail": "hello@example.com",
"senderName": "My Store",
"subject": "Welcome to our store!",
"templateID": "000000000000000000000001"
},
"sendPush": {
"body": "Track your delivery now",
"clickUrl": "https://example.com/order/123",
"iconID": "000000000000000000000001",
"imageID": "000000000000000000000002",
"isSkipAllowed": true,
"title": "Your order has shipped"
},
"sendSms": {
"compliance": {
"isStopKeywordIncluded": true,
"isUnsubscribeLinkIncluded": true,
"stopKeywordText": "Reply STOP to opt out",
"unsubscribeLinkText": "Unsubscribe [[unsubscribe_link]]"
},
"imageID": "000000000000000000000001",
"isLinkShorteningEnabled": true,
"isSkipAllowed": true,
"message": "Hello [[contact.first_name]]!"
},
"sendWebhook": {
"body": "{\"contactEmail\": \"[[contact.email]]\"}",
"callbackUrl": "https://example.com/webhook",
"headers": [
{
"key": "X-Api-Key",
"value": "secret-token"
}
]
},
"type": "sendEmail"
},
"delay": {
"duration": {
"amount": 24,
"units": "h"
},
"mode": "duration",
"time": "09:30"
},
"split": {
"filterGroup": {
"filters": [
{
"field": "app_language_code",
"operator": "eq",
"type": "event",
"urlMatch": {
"operator": "contains",
"value": "https://example.com/promo"
}
}
],
"logicalOperator": "and"
}
},
"temporaryID": "welcome-email",
"type": "action"
}
],
"exitConditions": [
{
"event": "placed order",
"filterGroup": {
"filters": [
{
"field": "total_price",
"operator": "gte"
}
],
"logicalOperator": "and"
},
"origin": "omnisend"
}
],
"name": "Welcome Series",
"settings": {
"frequencyLimiter": {
"duration": {
"amount": 7,
"units": "d"
},
"mode": "interval"
},
"overlapLimiter": {
"automationIDs": [
"000000000000000000000001"
],
"mode": "currentlyIn",
"withinDays": 7
},
"sendingThresholds": {
"email": "subscribed",
"sms": "subscribed"
}
},
"trigger": {
"audienceFilterGroup": {
"filters": [
{
"field": "tag",
"operator": "eq",
"value": "vip"
}
],
"logicalOperator": "and"
},
"condition": {
"event": "clicked message",
"filterGroups": [
{
"filters": [
{
"field": "total_price",
"operator": "gte"
}
],
"logicalOperator": "and"
}
],
"origin": "omnisend"
},
"inactivitySettings": {
"duration": {
"amount": 1,
"units": "h"
}
}
}
}Response
Created automation workflow
Example response
{
"blocks": [
{
"abTesting": {
"aBlocksPercentage": 50
},
"action": {
"addTag": {
"value": "vip-customer"
},
"removeTag": {
"value": "vip-customer"
},
"sendEmail": {
"contentID": "000000000000000000000001",
"isSkipAllowed": true,
"language": "en_US",
"preheader": "Check out what we have for you",
"replyToEmail": "support@example.com",
"senderEmail": "hello@example.com",
"senderName": "My Store",
"subject": "Welcome to our store!"
},
"sendPush": {
"body": "We have something special for you.",
"clickUrl": "https://example.com/promo",
"iconID": "000000000000000000000001",
"imageID": "000000000000000000000001",
"isSkipAllowed": true,
"title": "Check this out!"
},
"sendSms": {
"compliance": {
"isStopKeywordIncluded": true,
"isUnsubscribeLinkIncluded": true,
"stopKeywordText": "Reply STOP to opt out",
"unsubscribeLinkText": "Unsubscribe [[unsubscribe_link]]"
},
"discountSettings": {
"combinesWith": {
"isOrderCompatible": true,
"isProductCompatible": true
},
"expiry": {
"dateFormat": "MMM DD, YYYY",
"expirationText": "expires on",
"expiresInDays": 14
},
"scope": {
"collectionID": 123456,
"collectionType": "smart",
"conditions": "allOrders",
"minimumOrderAmount": "50.00"
},
"type": "percentage",
"value": "10"
},
"imageID": "000000000000000000000001",
"isLinkShorteningEnabled": true,
"isSkipAllowed": true,
"message": "Hello [[contact.first_name]]! Check out our deals"
},
"sendWebhook": {
"body": "{\"contactEmail\": \"[[contact.email]]\"}",
"callbackUrl": "https://example.com/webhook",
"headers": [
{
"key": "X-Api-Key",
"value": "secret-token"
}
]
},
"type": "sendEmail"
},
"delay": {
"duration": {
"amount": 24,
"units": "h"
},
"mode": "duration",
"time": "09:30"
},
"id": "000000000000000000000002",
"split": {
"filterGroup": {
"filters": [
{
"field": "app_language_code",
"operator": "eq",
"type": "event",
"urlMatch": {
"operator": "contains",
"value": "https://example.com"
}
}
],
"logicalOperator": "and"
}
},
"type": "action"
}
],
"brandID": "000000000000000000000001",
"createdAt": "2026-01-15T10:30:00Z",
"disabledAt": "2026-01-15T10:30:00Z",
"enabledAt": "2026-01-15T10:30:00Z",
"exitConditions": [
{
"event": "placed order",
"filterGroup": {
"filters": [
{
"field": "app_language_code",
"operator": "eq"
}
],
"logicalOperator": "and"
},
"origin": "omnisend"
}
],
"id": "000000000000000000000001",
"isEnabled": true,
"name": "Welcome Series",
"settings": {
"discount": {
"combinesWith": {
"isOrderCompatible": true,
"isProductCompatible": true
},
"expiry": {
"dateFormat": "MMM DD, YYYY",
"expirationText": "expires on",
"expiresInDays": 14
},
"scope": {
"collectionID": 123456,
"collectionType": "smart",
"conditions": "allOrders",
"minimumOrderAmount": "50.00"
},
"type": "percentage",
"value": "10"
},
"frequencyLimiter": {
"duration": {
"amount": 1,
"units": "w"
},
"mode": "interval"
},
"overlapLimiter": {
"automationIDs": [
"000000000000000000000001"
],
"mode": "currentlyIn",
"withinDays": 7
},
"sendingThresholds": {
"email": "subscribed",
"sms": "subscribed"
}
},
"trigger": {
"audienceFilterGroup": {
"filters": [
{
"field": "tag",
"operator": "eq"
}
],
"logicalOperator": "and"
},
"condition": {
"event": "placed order",
"filterGroups": [
{
"filters": [
{
"field": "app_language_code",
"operator": "eq"
}
],
"logicalOperator": "and"
}
],
"origin": "omnisend"
},
"inactivitySettings": {
"duration": {
"amount": 24,
"units": "h"
}
}
},
"updatedAt": "2026-01-15T10:30:00Z",
"url": "https://app.omnisend.com/automation/edit/000000000000000000000001"
}Changes
No recorded changes to this operation across all 1 revision of this API.