---
title: "Delete a plan"
method: DELETE
path: "/etl/v1/plans/{key}"
tags: ["ETL"]
---

# Delete a plan

`DELETE /etl/v1/plans/{key}`

## Request

- Base URL: `https://api.minubo.com`
- URL: `https://api.minubo.com/etl/v1/plans/{key}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Plans created by POST /etl/v1/plans are deleted right away (in any status) together with their staged data (204); their table disappears with the next ETL run. Plans uploaded as SFTP files get status deleting (202): the next ETL run deletes their files from the SFTP server, no longer loads the plan and then removes it. This is refused (409 plan_shares_files, details.sharedWith) while one of the plan's files also contains other plans, because files are only deleted as a whole. A plan's name can be used again once it is gone.

## Path parameters

- `key` string, required

## Response `202`

Deletion scheduled; the plan has status deleting

- EtlPlanResponse
  - `id` integer, required
  - `key` string, required: The plan name as it appears in the plan data (planName); identifies the plan in the URL.
  - `displayName` string
  - `description` string
  - `status` 'staged' | 'loaded' | 'failed' | 'deleting', required: staged: created by POST /etl/v1/plans, not yet loaded by an ETL run. loaded: in the ClickHouse table since the last completed ETL run. failed: staged, but still not loaded 36 hours after its creation (statusMessage says why); becomes loaded if it arrives later, delete it to reuse the name. deleting: deletion requested; the next ETL run deletes its files and then the plan.
  - `statusMessage` string
  - `source` 'sftp' | 'api', required: Where the plan comes from: sftp (generic plan files uploaded via SFTP) or api (this API).
  - `measures` string[], required
  - `attributes` string[], required
  - `startDate` string, date: First day with planned values (ISO date).
  - `endDate` string, date: Last day with planned values (ISO date).

## Other responses

- `204`: Plan deleted
- `404`: No such plan (plan_not_found)
- `409`: Plan shares SFTP files with other plans (plan_shares_files)
- `500`: Unexpected internal error

## Changes

- **2026-11-24** `ff6f75bd8816`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/minubo/apis/minubo-api/changes/etl/v1/plans/:key/delete.md)

---

[API](https://skmtc.dev/minubo/apis/minubo-api.md) - [All operations](https://skmtc.dev/minubo/apis/minubo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/minubo/apis/minubo-api/revisions/ff6f75bd8816?raw)
