> ## Documentation Index
> Fetch the complete documentation index at: https://docs.causeloop.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Alert Rule

> Test-fire an alert rule.

- type="crest" (V2 Wave 5C): evaluates the rule's `condition` against the
  LATEST REAL fitted hazard for every pattern in its scope
  (app/services/alert_eval.py). Never synthesizes a firing — a workspace
  with no fitted hazards yet gets an honest `any_fitted: false` result,
  not a fake alert.
- type="threshold" (legacy): fires a test notification and returns
  {sent_to, channels} to confirm delivery targets. In this in-memory
  implementation the notification is logged; in production it would
  dispatch via each configured channel adapter.



## OpenAPI

````yaml /openapi.json post /v1/alert-rules/{rule_id}/test
openapi: 3.1.0
info:
  description: Causeloop Platform Backend
  title: Causeloop API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/alert-rules/{rule_id}/test:
    post:
      tags:
        - alert-rules
      summary: Test Alert Rule
      description: >-
        Test-fire an alert rule.


        - type="crest" (V2 Wave 5C): evaluates the rule's `condition` against
        the
          LATEST REAL fitted hazard for every pattern in its scope
          (app/services/alert_eval.py). Never synthesizes a firing — a workspace
          with no fitted hazards yet gets an honest `any_fitted: false` result,
          not a fake alert.
        - type="threshold" (legacy): fires a test notification and returns
          {sent_to, channels} to confirm delivery targets. In this in-memory
          implementation the notification is logged; in production it would
          dispatch via each configured channel adapter.
      operationId: test_alert_rule_v1_alert_rules__rule_id__test_post
      parameters:
        - in: path
          name: rule_id
          required: true
          schema:
            title: Rule Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                title: Response Test Alert Rule V1 Alert Rules  Rule Id  Test Post
                type: object
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````