# List redaction rules

```http
GET https://trydimmi.com/api/v1/redaction-rules
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `settings:read`.

## Response 200 (OK)

- `data` (object, required)
  - `built_ins` (object, required)
    - `card_numbers` (boolean, required): True when payment card numbers are redacted from messages; on by default.
    - `us_ssn` (boolean, required): True when US social security numbers are redacted from messages; off by default.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `rules` (object[] | null, required): The workspace's own redaction rules, in the order they apply. Empty when it has none.
    - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
    - `enabled` (boolean, required): True when the rule is applied to messages before they are stored.
    - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
    - `name` (string, required): Name of the rule.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `pattern` (string, required): The regular expression whose matches are replaced, up to 256 characters.
    - `position` (integer, required): Where the rule comes in the order rules apply, lowest first.
    - `replacement` (string, required): What each match becomes in the stored text, up to 80 characters, such as [redacted].
    - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request GET \
  --url 'https://trydimmi.com/api/v1/redaction-rules' \
  --header 'Authorization: Bearer <token>'
```

## Example response

```json
{
  "data": {
    "built_ins": {
      "card_numbers": true,
      "us_ssn": true
    },
    "object": "<string>",
    "rules": [
      {
        "created_at": "2026-11-01T09:30:00Z",
        "enabled": true,
        "id": "<string>",
        "name": "<string>",
        "object": "<string>",
        "pattern": "<string>",
        "position": 123,
        "replacement": "<string>",
        "updated_at": "2026-11-01T09:30:00Z"
      }
    ]
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
