---
title: "Update sync rules"
method: PUT
path: "/sync-rules"
tags: ["Sync Rules"]
---

# Update sync rules

`PUT /sync-rules`

Replaces the company's full sync rule set. Send an empty array to disable rules, or null to opt into the inherited SaaS/ecommerce platform preset. This is not a partial update - fetch the current rules, edit them, and send the whole set back.

## Request body

- object
  - `syncRules` SyncRule[], nullable, required — Full replacement rule set. An empty array disables rules; null opts into the inherited SaaS/ecommerce platform preset.
    - `triggerEvent` string, required — Event name that triggers the rule.
    - `actions` object, required
      - `addTags` string[], required
      - `removeTags` string[], required
    - `conditions` object — Optional conditions that must all hold for the rule to apply.
      - `requiresTags` string[] — Rule only applies if the subscriber has ALL of these tags.
      - `requiresNotTags` string[] — Rule only applies if the subscriber has NONE of these tags.
      - `purchasedProduct` object — For commerce events with product context - rule only applies when a product on the event matches every specified selector (values within a selector are OR'd).
        - `tags` string[]
        - `collectionIds` string[]
        - `productTypes` string[]
        - `vendors` string[]

## Response `200`

Sync rules updated

- object
  - `success` boolean
  - `message` string
  - `syncRules` SyncRule[]
    - `triggerEvent` string, required — Event name that triggers the rule.
    - `actions` object, required
      - `addTags` string[], required
      - `removeTags` string[], required
    - `conditions` object — Optional conditions that must all hold for the rule to apply.
      - `requiresTags` string[] — Rule only applies if the subscriber has ALL of these tags.
      - `requiresNotTags` string[] — Rule only applies if the subscriber has NONE of these tags.
      - `purchasedProduct` object — For commerce events with product context - rule only applies when a product on the event matches every specified selector (values within a selector are OR'd).
        - `tags` string[]
        - `collectionIds` string[]
        - `productTypes` string[]
        - `vendors` string[]
  - `isDefault` boolean

## Other responses

- `400` — Invalid rules
- `401` — Unauthorized
- `503` — The database was temporarily unavailable. The request may be retried after the delay in Retry-After.

## Changes

> 121 revisions in range; 10 could not be searched.

- **2026-08-18** `8fbabe82a04d` — 1 info
  - added the non-success response with the status `503`
- **2026-08-16** `6fd2903b91ce` — 2 info
  - added the optional property `code` to the response with the `400` status
  - added the optional property `code` to the response with the `401` status
- **2026-08-02** `36f92fc0caa2` — 2 breaking
  - the response property `success` became optional for the status `400`
  - the response property `success` became optional for the status `401`
- **2026-07-03** `7264ea552df4` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/sync-rules/put.md)

---

[API](https://skmtc.dev/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.dev/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/revisions/73f826277d9a/schema)
