Skip to Content
iAdvizeDocs

List a site's instruction library

Returns the site's own instructions and the iAdvize catalog entries in one list, as the dashboard's Instructions page shows them, told apart by `source`. Site rows come first and catalog rows after, in catalog order, whatever the sort. A site instruction counts as used by an agent only when the agent's live version selects it. `usage` and `agentId` keep site instructions only; `vertical` keeps catalog entries only (those tagged with that vertical, or with none). An `agentId` whose agent uses no instruction matches no row. Filters combine with AND. `meta.matching` counts the rows that match, across pages. `limit` is 1 to 100 (25 by default) and pages the site instructions: the matching catalog entries follow them on the last page, so that page can hold up to three rows more than `limit`. With `source=iadvize` or a `vertical`, the response is one page of catalog entries. A cursor is bound to the filters, the search and the sort it was issued for. Catalog names and descriptions are in the site's default language when it is English, French or German, in English otherwise.

GET
/api/v1/sites/{siteId}/instructions

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

A WorkOS org-scoped API key, created from the dashboard's organization settings page. Identifies the tenant every read and write is scoped to. Missing, malformed, unknown, revoked, expired, or non-organization-owned keys all return 401 (no distinction, so the response can't be used to probe which keys or org ids exist).

Path Parameters

siteId*string

The site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.

Query Parameters

source?string

iadvize for the catalog entries, site for the site's own instructions.

Value in"iadvize""site"
type?string

Only rows of this type.

Value in"always""conditional"
usage?string

Only the site instructions with this usage: unused, dedicated (one agent) or shared (two or more). Leaves out every catalog entry.

Value in"unused""dedicated""shared"
agentId?string

Only the site instructions this agent's live version uses. Leaves out every catalog entry.

vertical?string

Only the catalog entries written for this vertical or for every vertical. Leaves out every site instruction.

Value in"retail""health_beauty""electronics""food_beverage""home_garden""fashion_apparel""travel_hospitality""other"
search?string

Rows whose name or description contains this text, case-insensitively. At most 200 characters.

Lengthlength <= 200
sort?string

updated (when the latest revision was written, the default), revisions (revision count) or type. Catalog entries come after every site instruction, in catalog order, whatever the sort and the order.

Default"updated"
Value in"type""revisions""updated"
order?string

desc (the default) or asc, for the sort.

Default"desc"
Value in"asc""desc"
cursor?string

The meta.nextCursor of the previous page, with the same filters, search and sort.

Lengthlength <= 1024
limit?integer

The page size, 1 to 100.

Range1 <= value <= 100
Default25

Response Body

One page of the library. meta.nextCursor is null on the last page.

application/json
  1. response

A page of the site's instruction library.

data*array<|>
meta*
Example Request
curl -X GET 'https://example.com/api/v1/sites/string/instructions'
Example Response
{  "data": [    {      "source": "site",      "id": "instr_01kvnwmagvf27rc9cze5rm9e1r",      "name": "Returns policy",      "description": "When shoppers ask about returns",      "type": "conditional",      "revisionCount": 3,      "updatedAt": "2026-11-18T10:42:00.000Z",      "usage": "dedicated",      "agents": [        {          "id": "agt_01kvnwmagvf27rc9cze5rm9e1r",          "name": "Sales agent"        }      ],      "startedFrom": null    },    {      "source": "iadvize",      "key": "cross_sell",      "name": "Cross-sell",      "description": "After a product is chosen, suggests one complementary product from your catalog, once.",      "type": "always",      "version": 1,      "verticals": [],      "addedInstructionId": "instr_01kw2c9b7rf3m8t4x6y0z1a2b3"    },    {      "source": "iadvize",      "key": "gift_finding",      "name": "Gift finding",      "description": "When a shopper buys for someone else, asks who it is for, then suggests two or three products.",      "type": "always",      "version": 1,      "verticals": [],      "addedInstructionId": null    }  ],  "meta": {    "nextCursor": null,    "matching": 3  }}