{
 "openapi": "3.1.0",
 "info": {
  "title": "Guardrails (Agentic AI)",
  "version": "20261030b",
  "description": "The limits that are not the agent's own. Checked before every tool call and again against what it would move. A new deployment with agents and no limits is one bad prompt away from a thousand purchase orders."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "guardrails": {
    "type": "object",
    "required": [
     "code",
     "name",
     "rule_kind"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "code": {
      "type": "string",
      "description": "Code"
     },
     "name": {
      "type": "string",
      "description": "Name"
     },
     "name_local": {
      "type": "string",
      "description": "Local name"
     },
     "description": {
      "type": "string",
      "description": "What it is for"
     },
     "scope_kind": {
      "type": "string",
      "description": "Applies to",
      "enum": [
       "org",
       "module",
       "agent",
       "workflow",
       "tool",
       "connection"
      ]
     },
     "agent_id": {
      "type": "string",
      "format": "uuid",
      "description": "Agent"
     },
     "workflow_id": {
      "type": "string",
      "format": "uuid",
      "description": "Workflow"
     },
     "tool_id": {
      "type": "string",
      "format": "uuid",
      "description": "Tool"
     },
     "connection_id": {
      "type": "string",
      "format": "uuid",
      "description": "Connection"
     },
     "target_module": {
      "type": "string",
      "description": "Module"
     },
     "rule_kind": {
      "type": "string",
      "description": "Rule"
     },
     "limit_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Amount limit"
     },
     "limit_count": {
      "type": "integer",
      "description": "Count limit"
     },
     "limit_window": {
      "type": "string",
      "description": "Per",
      "enum": [
       "run",
       "hour",
       "day",
       "week",
       "month"
      ]
     },
     "currency": {
      "type": "string",
      "description": "Currency"
     },
     "expression": {
      "type": "string",
      "description": "Fires when"
     },
     "allowed_values": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "Only these"
     },
     "denied_values": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "Never these"
     },
     "on_breach": {
      "type": "string",
      "description": "When broken"
     },
     "severity": {
      "type": "string",
      "description": "Severity",
      "enum": [
       "low",
       "medium",
       "high",
       "critical"
      ]
     },
     "message": {
      "type": "string",
      "description": "What to say"
     },
     "breach_count": {
      "type": "string",
      "format": "decimal",
      "description": "Breach count",
      "readOnly": true
     },
     "last_breach_at": {
      "type": "string",
      "format": "date-time",
      "description": "Last breach at",
      "readOnly": true
     },
     "is_active": {
      "type": "boolean",
      "description": "Active"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "name_ar": {
      "type": "string",
      "description": "Name ar",
      "readOnly": true
     },
     "name_bn": {
      "type": "string",
      "description": "Name bn",
      "readOnly": true
     },
     "name_de": {
      "type": "string",
      "description": "Name de",
      "readOnly": true
     },
     "name_es": {
      "type": "string",
      "description": "Name es",
      "readOnly": true
     },
     "name_fr": {
      "type": "string",
      "description": "Name fr",
      "readOnly": true
     },
     "name_hi": {
      "type": "string",
      "description": "Name hi",
      "readOnly": true
     },
     "name_it": {
      "type": "string",
      "description": "Name it",
      "readOnly": true
     },
     "name_ja": {
      "type": "string",
      "description": "Name ja",
      "readOnly": true
     },
     "name_kn": {
      "type": "string",
      "description": "Name kn",
      "readOnly": true
     },
     "name_ko": {
      "type": "string",
      "description": "Name ko",
      "readOnly": true
     },
     "name_mr": {
      "type": "string",
      "description": "Name mr",
      "readOnly": true
     },
     "name_pt": {
      "type": "string",
      "description": "Name pt",
      "readOnly": true
     },
     "name_ru": {
      "type": "string",
      "description": "Name ru",
      "readOnly": true
     },
     "name_ta": {
      "type": "string",
      "description": "Name ta",
      "readOnly": true
     },
     "name_ur": {
      "type": "string",
      "description": "Name ur",
      "readOnly": true
     },
     "name_zh": {
      "type": "string",
      "description": "Name zh",
      "readOnly": true
     },
     "description_ar": {
      "type": "string",
      "description": "Description ar",
      "readOnly": true
     },
     "description_bn": {
      "type": "string",
      "description": "Description bn",
      "readOnly": true
     },
     "description_de": {
      "type": "string",
      "description": "Description de",
      "readOnly": true
     },
     "description_es": {
      "type": "string",
      "description": "Description es",
      "readOnly": true
     },
     "description_fr": {
      "type": "string",
      "description": "Description fr",
      "readOnly": true
     },
     "description_hi": {
      "type": "string",
      "description": "Description hi",
      "readOnly": true
     },
     "description_it": {
      "type": "string",
      "description": "Description it",
      "readOnly": true
     },
     "description_ja": {
      "type": "string",
      "description": "Description ja",
      "readOnly": true
     },
     "description_kn": {
      "type": "string",
      "description": "Description kn",
      "readOnly": true
     },
     "description_ko": {
      "type": "string",
      "description": "Description ko",
      "readOnly": true
     },
     "description_mr": {
      "type": "string",
      "description": "Description mr",
      "readOnly": true
     },
     "description_pt": {
      "type": "string",
      "description": "Description pt",
      "readOnly": true
     },
     "description_ru": {
      "type": "string",
      "description": "Description ru",
      "readOnly": true
     },
     "description_ta": {
      "type": "string",
      "description": "Description ta",
      "readOnly": true
     },
     "description_ur": {
      "type": "string",
      "description": "Description ur",
      "readOnly": true
     },
     "description_zh": {
      "type": "string",
      "description": "Description zh",
      "readOnly": true
     },
     "message_ar": {
      "type": "string",
      "description": "Message ar",
      "readOnly": true
     },
     "message_bn": {
      "type": "string",
      "description": "Message bn",
      "readOnly": true
     },
     "message_de": {
      "type": "string",
      "description": "Message de",
      "readOnly": true
     },
     "message_es": {
      "type": "string",
      "description": "Message es",
      "readOnly": true
     },
     "message_fr": {
      "type": "string",
      "description": "Message fr",
      "readOnly": true
     },
     "message_hi": {
      "type": "string",
      "description": "Message hi",
      "readOnly": true
     },
     "message_it": {
      "type": "string",
      "description": "Message it",
      "readOnly": true
     },
     "message_ja": {
      "type": "string",
      "description": "Message ja",
      "readOnly": true
     },
     "message_kn": {
      "type": "string",
      "description": "Message kn",
      "readOnly": true
     },
     "message_ko": {
      "type": "string",
      "description": "Message ko",
      "readOnly": true
     },
     "message_mr": {
      "type": "string",
      "description": "Message mr",
      "readOnly": true
     },
     "message_pt": {
      "type": "string",
      "description": "Message pt",
      "readOnly": true
     },
     "message_ru": {
      "type": "string",
      "description": "Message ru",
      "readOnly": true
     },
     "message_ta": {
      "type": "string",
      "description": "Message ta",
      "readOnly": true
     },
     "message_ur": {
      "type": "string",
      "description": "Message ur",
      "readOnly": true
     },
     "message_zh": {
      "type": "string",
      "description": "Message zh",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/agentic/guardrails": {
   "get": {
    "summary": "list guardrails",
    "operationId": "list_guardrails_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create guardrails",
    "operationId": "create_guardrails_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/guardrails/{id}": {
   "get": {
    "summary": "get guardrails",
    "operationId": "get_guardrails_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change guardrails",
    "operationId": "change_guardrails_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete guardrails",
    "operationId": "delete_guardrails_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/agentic/guardrails/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_guardrails_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}