Automations

Patch automation workflow

Partially update an automation workflow. Only the fields provided in the request body are updated.

Enabled automations cannot be patched. Disable the automation via POST /automations/{id}/disable, make changes, then re-enable via POST /automations/{id}/enable when ready. When disabling, contactsInWorkflow controls whether contacts already in the workflow continue through the remaining blocks (keep) or exit immediately (exit). Enable/disable state is controlled exclusively via the /automations/{id}/enable and /automations/{id}/disable endpoints.

trigger sub-fields (condition, audienceFilterGroup, inactivitySettings) are patched individually — each provided sub-field replaces the corresponding sub-field in full. exitConditions are replaced in full when provided. blocks are patched individually.

Scopes: automations.write

Rate Limiting: This endpoint is rate limited to 400 requests per minute.

Audience filter group examples

The trigger.audienceFilterGroup field in PATCH requests replaces the existing audience filter group in full (or sets it for the first time). Omit it to leave the existing audience filter group unchanged.

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 sits inside trigger in the PATCH request body, alongside condition and inactivitySettings:

{
  "trigger": {
    "audienceFilterGroup": { ... }
  }
}

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

<details id="example-patch-replace-audience-filter"> <summary>Replace audience filter without touching trigger event or blocks</summary>
{
  "logicalOperator": "or",
  "filters": [
    {"field": "tag", "operator": "eq", "value": "vip"},
    {"field": "tag", "operator": "eq", "value": "beta"}
  ]
}
</details> <details id="example-patch-narrow-audience"> <summary>Narrow to US women</summary>
{
  "logicalOperator": "and",
  "filters": [
    {"field": "country", "operator": "eq", "value": "US"},
    {"field": "gender",  "operator": "eq", "value": "f"}
  ]
}
</details> <details id="example-patch-swap-segment-for-tag"> <summary>Swap a segment-based audience for a tag-based one</summary>
{
  "logicalOperator": "and",
  "filters": [
    {"field": "tag", "operator": "eq",  "value": "vip"},
    {"field": "tag", "operator": "neq", "value": "beta-churned"}
  ]
}
</details>
patch/automations/{id}

Request

  • Base URL
    https://api.omnisend.com/api
  • URL
    https://api.omnisend.com/api/automations/{id}
  • Auth
    • OAuth 2
      Client credentials
      Token URL: https://app.omnisend.com/oauth2/token scopes: automations.write
    • or API key in header Authorization

Path parameters

idstring required

Automation workflow ID (24 character hexadecimal)

Headers

Omnisend-Versionstring required

API version that specifies the response format and behaviour

Request body

namestring

Automation workflow name

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!"
        },
        "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"
      },
      "id": "000000000000000000000001",
      "split": {
        "filterGroup": {
          "filters": [
            {
              "field": "app_language_code",
              "operator": "eq",
              "type": "event",
              "urlMatch": {
                "operator": "contains",
                "value": "https://example.com/promo"
              }
            }
          ],
          "logicalOperator": "and"
        }
      },
      "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

Updated automation workflow

brandIDstring

Brand identifier (read-only)

createdAtstring

Automation creation timestamp (read-only)

disabledAtstring

Timestamp when automation was disabled (read-only)

enabledAtstring

Timestamp when automation was enabled (read-only)

idstring

Automation workflow unique identifier (read-only)

isEnabledboolean

Whether the automation workflow is enabled (read-only). Controlled via enable/disable actions.

namestring

Automation workflow name

updatedAtstring

Automation last update timestamp (read-only)

urlstring

Link to the automation workflow editor in the Omnisend app (read-only)

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.