# Reject Change

`POST /pending-approvals/{pendingId}/reject` · Core · Policy & Approvals

Records a checker rejection decision on a pending change, capturing an optional reason in `status_reason`.

Errors:

- `K9O_APPROVAL_NOT_PENDING` (409) for a decision on a change not in `pending_approval` status
- `K9O_APPROVAL_CANCELLED_BY_MAKER` (409) for a decision on a maker-cancelled row
- `K9O_APPROVAL_NOT_AUTHORIZED` (403) if the caller is not in the change's denormalized `approver_set` and holds no active approval delegation
- `K9O_APPROVAL_EXPIRED` (410) when acting on an expired change

On rejection the pending-change status transitions to `rejected` and a `data.write.approval.*` audit event is emitted; the change is not committed.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `pendingId` | path | yes | The pending change's id (`apr_...`). Example: `"apr_3Lq9Wx2Km7Rp5Tz8"`. |
| `projectSlug` | path | yes | The project's slug: the path segment after `@`. It is unique within the org. Example: `"storefront"`. |

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `reason` | object | no | Why you decided this way. Surrounding whitespace is trimmed, and an empty string counts as no reason. Required to reject. |
| _one of_ | | |  |
| _or_ | | |  |
| `reviewBasis` | enum ("read", "verified", "unread") | no | What you went on. Required to approve a held function call or MCP tool call, and ignored for other changes. `read`: you read the held payload (only when the case holds one). `verified`: you checked it another way. `unread`: you approved without seeing it. |

## Responses

- **200**: Success

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | object | yes | A pending change: a write or action held until an approver decides it. |
| `data.id` | string | yes | The pending change id (`apr_...`). |
| `data.status` | enum ("pending_approval", "approved", "redeemed", "rejected", "expired", "cancelled", "superseded") | yes | Where the change stands. `pending_approval` is waiting for a decision, including a change that has some but not all of the approvals it needs. `approved` was granted; `redeemed` was granted and then carried out by its maker. `rejected`, `expired`, `cancelled` and `superseded` are closed without being applied. |
| `data.collection` | object | yes | The collection the change writes to. `_policies` for a policy publish. Null for a change that is not a data write, such as a function call or a platform action. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.operation` | object | yes | The kind of write: `insert`, `update` or `delete` for a single record. Null for a change that is not a data write. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.makerId` | string | yes | Who proposed the change: a user (`usr_...`), a token (`tok_...`) or another principal id. |
| `data.proposedPayload` | object | yes | What the change would do. For a data write it is the proposed record. For any other change it holds that change's own details: a policy publish, for example, carries `kind` `policy_publish` and the `bundleId`. |
| `data.targetRecordId` | object | yes | The id of the record (or policy bundle) the change targets. Null for an insert and for a change with no single target. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.approverId` | object | yes | Who decided the change (`usr_...`). Null while it is undecided. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.decidedAt` | object | yes | When the change was decided. Null while it is undecided. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.decisionReason` | object | yes | The reason the approver gave. Null when none was given. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.createdAt` | string (date-time) | yes | When the change was proposed. |
| `data.expiresAt` | object | yes | When the change expires if it is still undecided. Null when it does not expire. |
| _one of_ | | |  |
| _or_ | | |  |
| `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_IAM_POLICY_DENIED` | The caller's bound IAMPolicy ceiling denies approvals:manage, so they are not authorised to reject pending changes in this project. |
| 404 | `K9O_POLICY_NOT_FOUND` | No pending-approval record with the supplied identifier exists or is accessible in this project. |
| 409 | `K9O_STATE_CONFLICT` | The pending change is not in a state that permits rejection; it has already been decided, expired, or cancelled, or it was decided concurrently. |
| 403 | `K9O_RBAC_DENY` | A session is required to reject a pending change: a personal access token alone is refused with `context.reason` `session_required`, and a service, workload or extension token with `human_only`. |

## Code samples

### cURL

```bash
curl -X POST 'https://<org>.api-<region>.k9o.io/@storefront/pending-approvals/<pendingId>/reject' \
  -H 'Authorization: Bearer $K9O_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/pending-approvals/<pendingId>/reject', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({}),
});
const { data, meta } = await res.json();
```

### k9o CLI

```bash
k9o approvals reject <id> --reason <text>
```

### @k9o/core

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

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.approvals.reject("apr_3Lq9Wx2Km7Rp5Tz8", {})
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.Approvals.Reject(ctx, "apr_3Lq9Wx2Km7Rp5Tz8", map[string]any{})
```

### k9o

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

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.approvals().reject("apr_3Lq9Wx2Km7Rp5Tz8", Map.of())
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.Approvals.RejectAsync("apr_3Lq9Wx2Km7Rp5Tz8", new Dictionary<string, object> {  })
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.approvals.reject("apr_3Lq9Wx2Km7Rp5Tz8", {  })
```

### k9o/sdk

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


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/reject-change
