Skip to content
Last updated

List all rules accessible to the authenticated user with filtering and pagination options.

GEThttps://api.aitronos.com/v1/organizations/{org_id}/rules

Path Parameters

org_id string required

Organization ID (org_ prefixed string).

Query Parameters

skip integer optional · Defaults to 0

Pagination offset - number of records to skip.

limit integer optional · Defaults to 100

Maximum number of results per page. Range: 1-100.

search string optional

Search text across rule name, description, and content.

category string optional

Filter by category. Values: safety, professional, creative, technical, custom.

rule_type string optional

Filter by rule type. Values: behavior, guardrails, formatting, context, content_policy, constraint.

scope string optional

Filter by scope. Values: global, organization, model, assistant, user, vector_store.

is_active boolean optional

Filter by active status (true or false).

is_public boolean optional

Filter by public visibility (true or false).

entity_type string optional

Filter by entity type. Values: assistant, vector_store, user, model, organization.

entity_id string optional

Filter by specific entity ID. Requires entity_type to be set.

attached_only boolean optional

Filter by attachment status. true: only attached rules, false: only unattached rules.

Returns

Returns a paginated list of Rule objects with 200-character content previews. Includes total count, pagination info, and applied filters. Use the Retrieve rule endpoint to get the full content of a specific rule.

Bash
curl https://api.aitronos.com/v1/rules \
  -H "X-API-Key: $FREDDY_API_KEY"

Response:

{
  "success": true,
  "data": [
    {
      "id": "rule_abc123",
      "name": "Customer Support Guidelines",
      "content_preview": "Always be polite and professional...",
      "category": "communication",
      "rule_type": "guideline",
      "scope": "organization",
      "is_public": false,
      "is_active": true,
      "version": 1,
      "created_at": "2025-11-23T10:00:00Z",
      "updated_at": "2025-11-23T10:00:00Z"
    },
    {
      "id": "rule_def456",
      "name": "Safety Guidelines",
      "content_preview": "Never share customer personal information...",
      "category": "safety",
      "rule_type": "policy",
      "scope": "organization",
      "is_public": false,
      "is_active": true,
      "version": 2,
      "created_at": "2025-11-22T15:30:00Z",
      "updated_at": "2025-11-23T09:15:00Z"
    }
  ],
  "pagination": {
    "total": 42,
    "skip": 0,
    "limit": 50,
    "has_more": false
  }
}