Skip to content
Last updated
POSThttps://api.aitronos.com/v1/rules/{rule_id}/attachments

Attach an entity (assistant, user, model, vector_store, or organization) to a rule with priority and character limit configuration.

rule_id string required

The rule ID

Body parameters

entity_type string required

Entity type: assistant, user, model, vector_store, organization

entity_id string required

The entity ID to attach

priority integer optional · Defaults to 50

Priority for rule application (1-100). Higher priority rules apply first. Use 90-100 for critical rules, 70-89 for high priority, 50-69 for standard, 30-49 for low, and 1-29 for optional rules.

character_limit integer optional · Defaults to 50000

Maximum characters from this rule's content to include when applied. Useful for managing context window limits. Range: 100-50,000.

Returns

Returns the created attachment object.

Bash
curl -X POST https://api.aitronos.com/v1/rules/rule_abc123/attachments \
  -H "X-API-Key: $FREDDY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entity_type": "assistant",
    "entity_id": "asst_abc123"
  }'

Response:

{
  "success": true,
  "data": {
    "id": "ratt_xyz789",
    "rule_id": "rule_abc123",
    "entity_type": "assistant",
    "entity_id": "asst_abc123",
    "priority": 50,
    "character_limit": 50000,
    "is_active": true,
    "attached_by": "usr_456",
    "attached_at": "2025-11-24T12:00:00Z",
    "created_at": "2025-11-24T12:00:00Z",
    "updated_at": "2025-11-24T12:00:00Z"
  }
}