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

# Approvals

> Read and set approval mode and rules.

See [Approvals](https://docs.usecadence.gg/work/approvals.md) for how approvals work. To answer a single approval card, use [`threads/answer`](https://docs.usecadence.gg/api/reference/threads#threads%2Fanswer).

## autoReview/get and autoReview/set

`autoReview/get` returns the approval settings:

**mode** `"ask" | "auto" | "never"`

Ask, Auto or Never ask.

**checkerAvailable** `boolean`

Whether an approval model is set, so `auto` can work.

`autoReview/set` changes the mode:

**mode** `"ask" | "auto" | "never"`

The new mode.

## approvalRules/list

`POST /rpc/approvalRules/list` returns the rules. No input needed.

### The rule object

**id** `string`

The rule's id.

**effect** `string`

`always_allow` or `deny`. Older rules may be `require_approval`.

**matchKind** `string`

`tool`, `connector`, `category` or `site`.

**matchValue** `string`

The tool name, app, category or site it matches.

## approvalRules/set

`POST /rpc/approvalRules/set` adds or changes a rule.

**effect** `"always_allow" | "deny"` *required*

Allow or block.

**matchKind** `"tool" | "connector" | "site"` *required*

What the rule matches.

**matchValue** `string` *required*

The tool name, app or site.

```bash theme={null}
curl -s "$CADENCE_URL/rpc/approvalRules/set" \
  -H "Authorization: Bearer $CADENCE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"json": {"effect": "deny", "matchKind": "site", "matchValue": "example.org"}}'
```

## approvalRules/remove

**id** `string` *required*

The rule to delete.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.