---
title: "List published versions"
method: GET
path: "/v25-10-beta/agentic-logic/rules/{ruleId}/versions"
tags: ["Agentic Logic"]
---

# List published versions

`GET /v25-10-beta/agentic-logic/rules/{ruleId}/versions`

## Request

- Base URL: `https://api.intelligems.io`
- URL: `https://api.intelligems.io/v25-10-beta/agentic-logic/rules/{ruleId}/versions`
- 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/rules/:ruleId/versions/get.ts> (a function with typed inputs; its response is checked against the schema)

```http
GET /v25-10-beta/agentic-logic/rules/{ruleId}/versions
```

Lists the published versions of a rule, including which one is active.

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.

## Path parameters

- `ruleId` string, uuid, required

## Response `200`

OK

- object
  - `versions` object[], required
    - `id` string, required: Version row id (uuid).
    - `version` integer, required: Monotonic publish number (1, 2, 3, …). Defines recency for retention.
    - `status` 'active' | 'superseded' | 'failed', required: 'active' = the version the rule serves; 'superseded' = previously active; 'failed' = the publish never promoted it.
    - `notes` string, nullable, required: Publish notes, when provided.
    - `title` string, nullable, required: Display title for the version (e.g. "Built from chat"). Explicit publish-time title when given, defaulted server-side to "Built from chat" for chat-origin drafts, else null.
    - `origin` 'chat' | 'manual', nullable, required: Provenance copied from the draft at publish time: 'chat' = built by the workspace AI chat, 'manual' = human-authored, null for versions published before provenance was recorded.
    - `settings` object, required: The recommendation settings frozen with this version. THE copy serving obeys — the rule row's is the editable draft of it — which is what makes a settings edit take effect at republish rather than instantly.
      - `maxItems` integer, required: Most products the rule may return, 1-10. The engine supplies it to the rule as `context.slotsNeeded` and trims the envelope to it. One bound for every surface, because one rule can serve several. A surface may still show fewer at once: the checkout block's grid paginates the returned list into a carousel, which is presentation and stays with the placement.
      - `excludeOutOfStock` boolean, required: Drop products with no purchasable variant. Applied where the product data already is: inside the template for a builder rule, inside the generated source for a code rule, and again as a floor when the engine hydrates the result — so the setting is true on every surface rather than only the ones that remembered to pass it.
      - `excludeItemsInCart` boolean, required: Drop products the shopper already has in the cart. Runs before the emptiness test, so an envelope this empties falls through to `onEmpty` rather than reporting itself as a result.
      - `excludePdpProduct` boolean, required: Drop the product the shopper is viewing (`request.pageProduct`, PDP only). Applied inside builder templates before the item cap, so the slot backfills, and again by the engine on every rule's result. Turn it off when the viewed product belongs in the result, e.g. a bundle built around it.
      - `onEmpty` 'hide' | 'smart-recs', required: What the slot does when the rule returns zero items: 'hide' the placement or fall back to 'smart-recs'. Errors and timeouts take the same route as a miss — there is no separate error policy — and stay distinct in telemetry.
    - `templateId` string, nullable, required: Template this version was built from, or null for a custom-code version. Frozen at publish time: repointing the rule at another template never rewrites it.
    - `templateVersion` integer, nullable, required: The template's own version at publish time, or null for a custom-code version. Says which template implementation the frozen params were validated against.
    - `templateParams` object, nullable, required: The normalized template parameters frozen with this version, or null for a custom-code version. THE copy serving executes — the rule row's is the editable draft of them — which is why a params edit takes effect at republish rather than instantly, and why two versions of one rule are only distinguishable here.
    - `dependencyLockHash` string, nullable, required: Hash of the resolved dependency lockfile, or null when the version has no locked dependencies.
    - `contentFingerprint` string, nullable, required: SHA-256 identity of the code workspace (source, user tests, generated tests). Equal draft and active-version fingerprints mean the draft has nothing to apply. Null for template rules, and for rows not yet fingerprinted.
    - `shopifyApiVersion` string, nullable, required: The Shopify API version this rule version's queries were validated against at publish time (the app is currently on 2026-07).
    - `publishedAtTs` number, nullable, required: Promotion time, Unix epoch-ms; null for failed versions.
    - `publishedByUserId` string, nullable, required: User who published, or null (system publishes).
    - `publishedByUser` object, nullable, required: Display record for the publisher, resolved at read time, or null when there is no publisher or the account no longer resolves. Readers render this; `publishedByUserId` is an identifier, never a label.
      - `name` string, required
    - `createdAtTs` number, required: Row creation time, Unix epoch-ms.

## Other responses

- `429`: Too Many Requests

## Changes

- **2026-11-06** `7b769b2f90b1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/intelligems/apis/intelligems-external-api-v25-10-beta/changes/v25-10-beta/agentic-logic/rules/:ruleId/versions/get.md)

---

[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/ca5d7c5b1bb6?raw)
