# Test a content rule Tests a rule against a sample document to verify whether its conditions match and previews the resulting actions. Request: ruleId - ID of the rule to test. documentKind - Kind name of the sample document being tested against. sampleDocument - Optional current state of the document as a JSON value. previousDocument - Optional previous state of the document for change-detection conditions. Response: matched - Whether the rule's conditions matched the sample document. actions - List of ActionType values that would be triggered if the rule matched. error - Optional error message if the rule could not be evaluated. Endpoint: POST /api/v1/rule/test-rule Version: 3.0 Security: bearerAuth ## Request fields (application/json): - `ruleId` (string) Rule data fields - `documentKind` (string) Rule data fields - `sampleDocument` (any) - `previousDocument` (any) ## Response 200 fields (application/json): - `matched` (boolean) - `actions` (array) - `error` (string) Rule data fields ## Response 400 fields (application/json): - `message` (string) ## Response 401 fields (application/json): - `message` (string) ## Response 403 fields (application/json): - `message` (string) ## Response 404 fields (application/json): - `message` (string) ## Response 409 fields (application/json): - `message` (string) ## Response 429 fields (application/json): - `message` (string) ## Response 499 fields (application/json): - `message` (string) ## Response 500 fields (application/json): - `message` (string) ## Response 501 fields (application/json): - `message` (string) ## Response 503 fields (application/json): - `message` (string) ## Response 504 fields (application/json): - `message` (string)