Skip to content
Last updated

🔨 In Development — This section is still being developed and may change.
Create a new custom rule category for your organization. Categories help organize and filter rules, and can include custom priority ranges and character limits.
POSThttps://api.freddy.aitronos.com/v1/organizations/{organization_id}/rules/categories

Create a custom category for organizing rules within your organization. Categories can be used to group related rules and set organization-specific guidelines for priority ranges and character limits.

Path Parameters

organizationId string required

The organization identifier where the category will be created.

Request Body

name string required

Unique identifier for the category (lowercase, no spaces). Maximum length: 50 characters. Examples: "compliance", "brand_voice", "industry_specific".

display_name string required

Human-readable name for the category. Used in UI and documentation. Maximum length: 100 characters. Example: "Compliance & Legal".

description string optional

Optional description explaining the category's purpose and use cases. Maximum length: 500 characters.

priority_range string optional

Recommended priority range for rules in this category (format: "min-max"). Higher numbers indicate higher priority. Example: "70-89".

recommended_limit integer optional

Recommended maximum character count for rules in this category. Used for optimization guidance. Range: 100-50000.

metadata object optional

Custom key-value pairs for tagging and organization. Maximum: 10 keys, each value up to 200 characters.


Returns

A RuleResponse object containing the API response data.

Bash
curl https://api.freddy.aitronos.com/v1/organizations/org_123/rules/categories \
-H "Authorization: Bearer $FREDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "name": "compliance",
  "display_name": "Compliance & Legal",
  "description": "Rules for legal compliance, regulatory requirements, and data protection",
  "priority_range": "90-100",
  "recommended_limit": 5000,
  "metadata": {
    "department": "legal",
    "requires_approval": "true"
  }
}'

Response

{
  "id": "cat_compliance_001",
  "name": "compliance",
  "display_name": "Compliance & Legal",
  "description": "Rules for legal compliance, regulatory requirements, and data protection",
  "priority_range": "90-100",
  "recommended_limit": 5000,
  "rule_count": 0,
  "is_default": false,
  "is_active": true,
  "organizationId": "org_xyz789",
  "createdBy": "user_123",
  "createdAt": "2024-10-04T12:00:00Z",
  "updatedAt": "2024-10-04T12:00:00Z",
  "metadata": {
    "department": "legal",
    "requires_approval": "true"
  }
}