# Delete Rollup

`DELETE /analytics/{datasetSlug}/rollups/{rollupId}` · Core · Analytics & Intelligence

Deletes the rollup. Returns `{id, deleted: true}`. Requires the `datasets:write` permission (PROJECT_ADMIN or PROJECT_AUTHOR by default). Callers must be members of the project (an organization role alone does not grant access); project service tokens and extension tokens cannot call it.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `datasetSlug` | path | yes | The Dataset's slug. Example: `"orders"`. |
| `rollupId` | path | yes | The id of the rollup to delete (`rollup_...`), as create and list return it. It must belong to the dataset in the path. Example: `"rollup_9f3k2m7x1q"`. |
| `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 deleted rollup. |
| `data.id` | string | yes | The deleted rollup's id, as given in the path. |
| `data.deleted` | enum (true) | yes | Always true. The rollup stops folding; cells already written to its dataset stay there. |
| `meta` | object | yes |  |


## Errors

| HTTP | Code | When |
|---|---|---|
| 401 | `K9O_UNAUTHENTICATED` | The caller is not signed in. |
| 403 | `K9O_ACCESS_DENIED` | The caller is not a member of this project; an organization role alone does not grant access. |
| 404 | `K9O_NOT_FOUND` | The project was not found for this caller (project service tokens and extension tokens cannot call this endpoint). |
| 403 | `K9O_IAM_POLICY_DENIED` | The caller's role or IAM policy does not grant datasets:write. |

## Code samples

### cURL

```bash
curl -X DELETE 'https://<org>.api-<region>.k9o.io/@storefront/analytics/<datasetSlug>/rollups/<rollupId>' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

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

### k9o CLI

```bash
k9o analytics rollups delete <dataset> <rollup-id>
```

### @k9o/core

```typescript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.analytics.rollups.delete('<datasetSlug>', '<rollupId>')
```

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.analytics.rollups.delete("<datasetSlug>", "<rollupId>")
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.Analytics.Rollups.Delete(ctx, "<datasetSlug>", "<rollupId>")
```

### k9o

```rust
// let k9o = Client::new(ClientOpts { org_slug: "playground".into(), project_slug: "storefront".into(), api_key: "k9o_…".into() })?;
let resp = k9o.analytics.rollups.delete("<datasetSlug>", "<rollupId>").await?
```

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.analytics().rollups().delete("<datasetSlug>", "<rollupId>")
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.Analytics.Rollups.DeleteAsync("<datasetSlug>", "<rollupId>")
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.analytics.rollups.delete("<datasetSlug>", "<rollupId>")
```

### k9o/sdk

```php
// $k9o = K9oClient::create(['org_slug' => 'playground', 'project_slug' => 'storefront', 'api_key' => 'k9o_…']);
$response = $k9o->analytics->rollups->delete('<datasetSlug>', '<rollupId>')
```


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