---
title: "Update exclusions"
method: PATCH
path: "/v25-10-beta/agentic-logic/exclusions"
tags: ["Agentic Logic"]
---

# Update exclusions

`PATCH /v25-10-beta/agentic-logic/exclusions`

## Request

- Base URL: `https://api.intelligems.io`
- URL: `https://api.intelligems.io/v25-10-beta/agentic-logic/exclusions`
- Auth: API key in header `intelligems-access-token`
- TypeScript: <https://skmtc.dev/intelligems/apis/intelligems-external-api-v25-10-beta/docs/v25-10-beta/agentic-logic/exclusions/patch.ts> (a function with typed inputs; its response is checked against the schema)

```http
PATCH /v25-10-beta/agentic-logic/exclusions
```

Adds and removes selected organization-wide exclusions. The operation preserves
all values that the request does not name and returns the complete updated
exclusion set.

- `add` (object, optional) — Exclusion values to add.
- `remove` (object, optional) — Exclusion values to remove.
- `add.productIds` / `remove.productIds` (string array, optional) — Shopify
  product GIDs.
- `add.tags` / `remove.tags` (string array, optional) — Exact product tags.
- `add.collections` / `remove.collections` (string array, optional) — Shopify
  collection GIDs.
- `add.vendors` / `remove.vendors` (string array, optional) — Exact vendor
  names.

The request must add or remove at least one value. A value cannot occur in both
operations for the same field.

- Adding an existing value and removing a missing value are successful no-ops.
- The update is atomic and takes effect on the next evaluation for every rule.
- No rule publish is required.

Use the `intelligems-access-token` header. The token selects the organization; do not send `orgId`. The organization must have Agentic Logic enabled.

**Rate Limit:** 50 requests per 30s window, refilling 25 tokens every 30s.

## Request body

- object: Add or remove selected org exclusions without replacing unrelated values. Effective immediately on the next evaluation; no republish.
  - `add` object: Exclusion values to add. Existing values are unchanged.
    - `productIds` string[]: Products never to recommend (gid://shopify/Product/<n>).
    - `tags` string[]: Product tags never to recommend.
    - `collections` string[]: Collections whose members are never recommended (gid://shopify/Collection/<n>).
    - `vendors` string[]: Vendors whose products are never recommended.
  - `remove` object: Exclusion values to remove. Missing values are unchanged.
    - `productIds` string[]: Products never to recommend (gid://shopify/Product/<n>).
    - `tags` string[]: Product tags never to recommend.
    - `collections` string[]: Collections whose members are never recommended (gid://shopify/Collection/<n>).
    - `vendors` string[]: Vendors whose products are never recommended.

## Response `200`

OK

- object
  - `exclusions` object, required: The org's serve-time ban list, enforced by the broker on every result envelope. One row per org; edits are effective immediately (no republish). All ids are Shopify GIDs.
    - `productIds` string[], required: Products never to recommend (gid://shopify/Product/<n>).
    - `tags` string[], required: Product tags never to recommend.
    - `collections` string[], required: Collections whose members are never recommended (gid://shopify/Collection/<n>).
    - `vendors` string[], required: Vendors whose products are never recommended.
    - `lastUpdateTs` number, nullable, required: Last edit time, Unix epoch-ms; null when the org has never saved exclusions.

## Other responses

- `429`: Too Many Requests

---

[API](https://skmtc.dev/intelligems/apis/intelligems-external-api-v25-10-beta.md) - [All operations](https://skmtc.dev/intelligems/apis/intelligems-external-api-v25-10-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/intelligems/apis/intelligems-external-api-v25-10-beta/revisions/7b769b2f90b1?raw)
