---
title: "Delete a workflow and all its data"
method: DELETE
path: "/workflows/{workflow_id}"
tags: ["Workflows"]
---

# Delete a workflow and all its data

`DELETE /workflows/{workflow_id}`

## Request

- Base URL: `https://api.indexone.io`
- URL: `https://api.indexone.io/workflows/{workflow_id}`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Permanently deletes the workflow **and every row it produced**. This is not reversible and there is no soft-delete window.

The sequence is: notify the coordinator (`workflow_deleted`) so it stops scheduling; mark the row `stage=deleting`; purge every partition of `index-holdings`, `index-values-eod`, `index-weightings`, `index-universes` and `index-corporate-actions` in parallel; delete the workflow row; unlink it from the caller's teams.

The response reports how many rows were purged per table; `-1` means that table's purge raised and its data may be partially left behind.

## Path parameters

- `workflow_id` string, required

## Response `200`

Deleted.

- object
  - `deleted` string
  - `purged` object: Rows deleted per table; `-1` on failure.
  - `trigger_notification` object

## Other responses

- `400`: `id required`.
- `401`: Missing or invalid id token.
- `403`: The caller's teams do not own this workflow.
- `429`: API key usage-plan rate limit exceeded.

---

[API](https://skmtc.dev/indexone/apis/index-one-rest-api.md) · [All operations](https://skmtc.dev/indexone/apis/index-one-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/indexone/apis/index-one-rest-api/revisions/df5a92216a9c?raw)
