> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.cail.health/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.cail.health/_mcp/server.

# List configured alert rules

GET https://staging.cail.health/v1/alert-rules

Returns the alert rules configured for the operator’s organisation. Filter by event type, active state, or delivery channel; use the catalog endpoint to discover what event types are available.

Reference: https://docs.cail.health/api-references/api-reference/configure-access-policy/list

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: cail-api
  version: 1.0.0
paths:
  /v1/alert-rules:
    get:
      operationId: list
      summary: List configured alert rules
      description: >-
        Returns the alert rules configured for the operator’s organisation.
        Filter by event type, active state, or delivery channel; use the catalog
        endpoint to discover what event types are available.
      tags:
        - subpackage_configureAccessPolicy
      parameters:
        - name: cursor
          in: query
          description: Opaque cursor returned from a prior call.
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Maximum number of results to return. Defaults to 20.
          required: false
          schema:
            type: number
            format: double
        - name: sortBy
          in: query
          description: Sort field.
          required: false
          schema:
            type: string
        - name: sortOrder
          in: query
          description: Sort order.
          required: false
          schema:
            $ref: '#/components/schemas/V1AlertRulesGetParametersSortOrder'
        - name: eventType
          in: query
          description: Filter by alert event type code.
          required: false
          schema:
            type: string
        - name: isActive
          in: query
          description: Filter by active state. Set false to view paused rules.
          required: false
          schema:
            type: boolean
        - name: channel
          in: query
          description: Filter by delivery channel.
          required: false
          schema:
            $ref: '#/components/schemas/V1AlertRulesGetParametersChannel'
        - name: Authorization
          in: header
          description: Bearer authentication
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A cursor-paginated page of alert rules.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAlertRulesResponse'
servers:
  - url: https://staging.cail.health
    description: https://staging.cail.health
components:
  schemas:
    V1AlertRulesGetParametersSortOrder:
      type: string
      enum:
        - asc
        - desc
      title: V1AlertRulesGetParametersSortOrder
    V1AlertRulesGetParametersChannel:
      type: string
      enum:
        - in-app
        - email
        - both
      title: V1AlertRulesGetParametersChannel
    AlertRuleConditionOperator:
      type: string
      enum:
        - <
        - '>'
        - <=
        - '>='
        - '='
      description: Comparison operator.
      title: AlertRuleConditionOperator
    AlertRuleCondition:
      type: object
      properties:
        field:
          type: string
          description: Field name on the alert event the condition evaluates against.
        operator:
          $ref: '#/components/schemas/AlertRuleConditionOperator'
          description: Comparison operator.
        value:
          type: number
          format: double
          description: Numeric threshold the field is compared against.
      required:
        - field
        - operator
        - value
      title: AlertRuleCondition
    AlertRuleResourceChannel:
      type: string
      enum:
        - in-app
        - email
        - both
      description: Delivery channel.
      title: AlertRuleResourceChannel
    AlertRuleResource:
      type: object
      properties:
        id:
          type: string
          description: Stable identifier of the alert rule.
        organizationId:
          type: string
          description: Stable identifier of the operator’s organisation.
        name:
          type: string
          description: Human-readable name for the rule.
        eventType:
          type: string
          description: Event-type code the rule listens for.
        condition:
          oneOf:
            - $ref: '#/components/schemas/AlertRuleCondition'
            - type: 'null'
          description: >-
            Threshold condition. Null when the rule fires on every event of its
            type.
        channel:
          $ref: '#/components/schemas/AlertRuleResourceChannel'
          description: Delivery channel.
        isActive:
          type: boolean
          description: Whether the rule fires when matched.
        createdAt:
          type: string
          description: ISO 8601 timestamp at which the rule was created.
        lastUpdated:
          type: string
          description: ISO 8601 timestamp of the most recent update.
      required:
        - id
        - organizationId
        - name
        - eventType
        - channel
        - isActive
        - createdAt
        - lastUpdated
      title: AlertRuleResource
    ListAlertRulesPaginationCursor:
      type: object
      properties: {}
      description: Opaque cursor for the next page.
      title: ListAlertRulesPaginationCursor
    ListAlertRulesPagination:
      type: object
      properties:
        cursor:
          oneOf:
            - $ref: '#/components/schemas/ListAlertRulesPaginationCursor'
            - type: 'null'
          description: Opaque cursor for the next page.
        hasMore:
          type: boolean
          description: True when more results exist after this page.
        limit:
          type: number
          format: double
          description: Echoes the requested page size.
      required:
        - cursor
        - hasMore
        - limit
      title: ListAlertRulesPagination
    ListAlertRulesResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AlertRuleResource'
          description: Alert rules for this page.
        pagination:
          $ref: '#/components/schemas/ListAlertRulesPagination'
          description: Cursor metadata for paging forward.
      required:
        - data
        - pagination
      title: ListAlertRulesResponse
  securitySchemes:
    auth0Bearer:
      type: http
      scheme: bearer

```

## Examples



**Response**

```json
{
  "data": [
    {
      "id": "1d7d4e29-3b8e-4a01-a4f1-7e2a5b8c1d6e",
      "organizationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "name": "A&E diversion alert",
      "eventType": "a_and_e_diversion_rate",
      "channel": "both",
      "isActive": true,
      "createdAt": "2026-04-19T11:32:00.000Z",
      "lastUpdated": "2026-05-13T14:21:00.000Z",
      "condition": {
        "field": "avoidanceRate",
        "operator": "<",
        "value": 0.6
      }
    }
  ],
  "pagination": {
    "cursor": null,
    "hasMore": false,
    "limit": 20
  }
}
```

**SDK Code**

```python Two active rules
import requests

url = "https://staging.cail.health/v1/alert-rules"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Two active rules
const url = 'https://staging.cail.health/v1/alert-rules';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Two active rules
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://staging.cail.health/v1/alert-rules"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Two active rules
require 'uri'
require 'net/http'

url = URI("https://staging.cail.health/v1/alert-rules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Two active rules
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://staging.cail.health/v1/alert-rules")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Two active rules
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://staging.cail.health/v1/alert-rules', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Two active rules
using RestSharp;

var client = new RestClient("https://staging.cail.health/v1/alert-rules");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Two active rules
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://staging.cail.health/v1/alert-rules")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```