# Delete Approval Policy

`DELETE /approval-policies/{policyId}` · Core · Policy & Approvals

Permanently deletes a draft policy bundle identified by `policyId`. Deletion is permitted only while the bundle is in `draft` status; attempting to delete a `published` or `superseded` bundle returns `K9O_POLICY_PUBLISH_CONFLICT` (409). Returns `K9O_POLICY_NOT_FOUND` (404) if `policyId` does not resolve to a bundle in the project. Requires `PROJECT_ADMIN`.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `policyId` | path | yes | The approval policy id (`apo_...`). The `apo_` prefix may be left out. Example: `"apo_demo00000001"`. |
| `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` | object | yes | The approval policy that was deleted. |
| `data.id` | string | yes | The id of the deleted policy (`apo_...`). |
| `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 required role to delete this approval policy. |
| 403 | `K9O_POLICY_AUTHORING_AUTHORITY_INSUFFICIENT` | The caller's role is not authorised under the org-policy constraint to remove the approval rule for the targeted collection and operation scope. |
| 404 | `K9O_POLICY_NOT_FOUND` | No approval policy with the supplied identifier exists in this project. |

## Code samples

### cURL

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

### fetch

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

### k9o CLI

```bash
k9o approval-policy delete <id>
```

### @k9o/core

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

### k9o

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

### sdk-go

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

### k9o

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

### dev.k9o:core

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

### K9o.Core

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

### k9o

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

### k9o/sdk

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


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/delete-approval-policy
