# List Approval Policies

`GET /approval-policies` · Core · Policy & Approvals

Lists the project's approval policies (`apo_...`), oldest first. Each policy applies to one collection and one write operation, and carries a predicate and an action: `auto_approve` lets a matching write skip review, `queue` sends it for approval. When a write needs review, the matching policies are checked oldest first and the first match decides. Any member with read access to the project can list them. The list isn't paginated.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `projectSlug` | path | yes | The project's slug: the path segment after `@`. It is unique within the org. Example: `"storefront"`. |

## Responses

- **200**: Success

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | array of object | yes | The project's approval policies, oldest first. |
| `data.[]id` | string | yes | The policy id (`apo_...`). |
| `data.[]collection` | string | yes | The collection whose writes the policy applies to. |
| `data.[]operation` | enum ("insert", "update", "delete") | yes | The kind of write the policy applies to. |
| `data.[]predicate` | object | yes | The condition, as a JSON predicate: `{"<operator>": [arg, ...]}`, nested as deep as you need. Operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `in`, `contains`, `and`, `or`, `not`. A string that starts with `maker.` or `change.` reads a value from the write being checked: - `maker.id`, `maker.account_type`, `maker.roles`, `maker.groups` - `change.table`, `change.operation`, `change.row.<field>`, `change.fields_modified`, `change.magnitude` Any other value is a literal. |
| `data.[]action` | enum ("auto_approve", "queue") | yes | What happens to a matching write: `auto_approve` applies it with no checker, `queue` holds it for a checker. Policies for the same collection and operation are tried oldest first, and the first whose predicate matches decides. |
| `data.[]authoredBy` | string | yes | The id of the user who created the policy (`usr_...`). |
| `data.[]createdAt` | string (date-time) | yes | When the policy was created. |
| `meta` | object | yes |  |


## Errors

| HTTP | Code | When |
|---|---|---|
| 401 | `K9O_SESSION_EXPIRED` | The caller's session token is expired or invalid; re-authenticate to continue. |
| 403 | `K9O_ACCESS_DENIED` | The caller does not hold the minimum required role to list approval policies for this project. |

## Code samples

### cURL

```bash
curl -X GET 'https://<org>.api-<region>.k9o.io/@storefront/approval-policies' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/approval-policies', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`
  },
});
const { data, meta } = await res.json();
```

### k9o CLI

```bash
k9o approval-policy list
```

### @k9o/core

```typescript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.approvalPolicies.list()
```

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.approval_policies.list()
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.ApprovalPolicies.List(ctx)
```

### k9o

```rust
// let k9o = Client::new(ClientOpts { org_slug: "playground".into(), project_slug: "storefront".into(), api_key: "k9o_…".into() })?;
let resp = k9o.approval_policies.list().await?
```

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.approvalPolicies().list()
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.ApprovalPolicies.ListAsync()
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.approval_policies.list()
```

### k9o/sdk

```php
// $k9o = K9oClient::create(['org_slug' => 'playground', 'project_slug' => 'storefront', 'api_key' => 'k9o_…']);
$response = $k9o->approval_policies->list()
```


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/list-approval-policies
