Skip to Content
iAdvizeDocs

Get one instruction with its text

Returns one entry of the site's instruction library with its full text. `ref` is either a site instruction id, which returns the text and condition of its latest revision, or a catalog key (`cross_sell`, `key_sales_period`, `gift_finding`), which returns the entry's text in the site's default language when it is English, French or German, in English otherwise. An instruction of another site or organization, a deleted one, or any other value answers `404`.

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

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.

ref*string

A site instruction id (prefixed instr_) or a catalog key.

Response Body

The entry with its full text.

application/json
  1. response
data*|

One entry of the instruction library with its full text, told apart by source.

Example Request
curl -X GET 'https://example.com/api/v1/sites/string/instructions/string'
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,    "instructionText": "Always mention the 30-day return window when a shopper asks about returns.",    "condition": "The shopper asks about returns or refunds.",    "latestRevisionBy": "member"  }}

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.

List a site's pages

Returns the pages of this site with the site's totals by status and type, the number of pages it holds against its limit, the generation and read budgets and its last sitemap import. The totals count every page whatever the filters. The order is newest first unless `sort` asks for another; each sort pages with its own cursor. A list never carries the extracted text: get one page for it. Filters combine with AND. `limit` is 1 to 100 (50 by default), and a cursor is bound to the filters and the sort it was issued for.