PUThttps://api.aitronos.com/v1/organizations/{org_id}/rules-stack
Atomically replace the organisation's rule stack. Entries are processed in list order — index 0 compiles first. At most one entry may carry is_entity_default=true. Every assistant in the organisation has its rule cache invalidated after the operation.
org_id string required
Organisation ID (prefixed with org_).
entries array optional
List of stack entries (max 50). Omitting or sending an empty list clears the stack. Each entry is an object with:
rule_idstring required — Rule ID to include in the stack (prefixed withrule_).priorityinteger optional — Attachment priority (0–100). When omitted, priorities are auto-assigned from list order (index × 10).is_entity_defaultboolean optional — Mark as the org's default rule. At most one entry may betrue. Default:false.
Returns the full updated stack as an array of stack items.
Bash
- Bash
- Python
- Python
- JavaScript
curl -X PUT https://api.aitronos.com/v1/organizations/org_abc123/rules-stack \
-H "X-API-Key: $FREDDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"entries": [
{"rule_id": "rule_xyz", "priority": 0, "is_entity_default": true},
{"rule_id": "rule_abc", "priority": 10}
]
}'