# blog.brookie.atprotify.listRules

> List the notification rules this relay runs, so an app can show a toggle for each. No auth needed.

- Kind: query
- Authority: atprotify.brookie.blog
- Lexicon: 1
- Published by [brookie.blog](https://lexicon.garden/identity/did:plc:v46ojbiop5ebs5h7gaomixcc), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:v46ojbiop5ebs5h7gaomixcc/blog.brookie.atprotify.listRules)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:v46ojbiop5ebs5h7gaomixcc/blog.brookie.atprotify.listRules/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:v46ojbiop5ebs5h7gaomixcc/blog.brookie.atprotify.listRules/analytics)

## Query (`blog.brookie.atprotify.listRules`)

Type: query · GET

### Output (application/json)

- `follows` (boolean): Whether devices can ask for rules from people they follow only.
- `rules` (array, required)
  - `items` (ref)
    - Reference: `#rule`
- `serviceDid` (string · did, required): The audience to request service-auth tokens for.

## #rule (`blog.brookie.atprotify.listRules#rule`)

Type: object

### Properties

- `collection` (string · nsid, required)
- `id` (string, required)
- `subscribers` (string): For subscriber rules, the channel devices subscribe on.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "List the notification rules this relay runs, so an app can show a toggle for each. No auth needed.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "follows": {
              "description": "Whether devices can ask for rules from people they follow only.",
              "type": "boolean"
            },
            "rules": {
              "items": {
                "ref": "#rule",
                "type": "ref"
              },
              "type": "array"
            },
            "serviceDid": {
              "description": "The audience to request service-auth tokens for.",
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "serviceDid",
            "rules"
          ],
          "type": "object"
        }
      },
      "type": "query"
    },
    "rule": {
      "properties": {
        "collection": {
          "format": "nsid",
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "subscribers": {
          "description": "For subscriber rules, the channel devices subscribe on.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "collection"
      ],
      "type": "object"
    }
  },
  "id": "blog.brookie.atprotify.listRules",
  "lexicon": 1
}
```
