Search AIRule

LLM-friendly URL
POST
https://api.luzmo.com/0.1.0/airule
API call form
Examples
List of examples
  • Get a rule by ID
  • Get a rule with its draft and published text
  • List the rules that are not published
  • List the published rules whose draft moved on
  • Search published rules by the name the Agents see
  • Get the version history of a rule
  • Get the Agents that apply a rule
Description

Get a rule by ID together with the text of the version that is being edited ( latest_version ) and the text the Agents currently apply ( published_version ). published_version is null for a rule that is not published.

Install
npm install @luzmo/nodejs-sdk
Example Response
200
400
500
{
  "count": 1,
  "rows": [
    {
      "id": "c1f4a0c2-6c9e-4f6b-9a5a-3f0d2b8f1e77",
      "name": "Pricing policy",
      "status": "published",
      "has_unpublished_changes": true,
      "latest_version_id": "2e7c8a10-4b3d-4a2f-9c1e-7d6b5a4f3e2d",
      "published_version_id": "9b1d2f34-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
      "published_name": "Discount policy",
      "published_at": "2026-09-18T09:12:44.512Z",
      "organization_id": "0f2b8a6d-3c4e-4d5a-8b7c-1e2f3a4b5c6d",
      "user_id": "5ec6950f-d7bb-4554-8f6a-10ea8b68c254",
      "created_at": "2026-09-18T09:04:11.204Z",
      "updated_at": "2026-09-18T09:31:02.880Z",
      "latest_version": {
        "id": "2e7c8a10-4b3d-4a2f-9c1e-7d6b5a4f3e2d",
        "ai_rule_id": "c1f4a0c2-6c9e-4f6b-9a5a-3f0d2b8f1e77",
        "version": 2,
        "name": "Pricing policy",
        "content": "Never quote a discount below cost price. Escalate to the account manager, and record the reason.",
        "created_by": "5ec6950f-d7bb-4554-8f6a-10ea8b68c254",
        "created_at": "2026-09-18T09:31:02.880Z"
      },
      "published_version": {
        "id": "9b1d2f34-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
        "ai_rule_id": "c1f4a0c2-6c9e-4f6b-9a5a-3f0d2b8f1e77",
        "version": 1,
        "name": "Discount policy",
        "content": "Never quote a discount below cost price. Escalate to the account manager instead.",
        "created_by": "5ec6950f-d7bb-4554-8f6a-10ea8b68c254",
        "created_at": "2026-09-18T09:04:11.204Z"
      }
    }
  ]
}