DELETE
/workflows/{wflId}Delete Workflow
Permanently deletes a workflow by its wfl_<base62> identifier.
Requires the PROJECT_AUTHOR role.
Returns K9O_WORKFLOW_NOT_FOUND (404) if the workflow does not exist in the project.
Parameters
| wflId * | path | The workflow id ( |
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
Responses
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 401 | K9O_INVALID_CREDENTIALS | The request was made without a valid session or bearer token. |
| 401 | K9O_SESSION_EXPIRED | Your session has expired; re-authenticate and retry. |
| 403 | K9O_ACCESS_DENIED | Deleting a workflow requires the PROJECT_AUTHOR role; your current role does not grant it. |
| 404 | K9O_WORKFLOW_NOT_FOUND | No workflow with the supplied ID exists in this project. |
Response body (200)
| data * | object | The workflow that was deleted. |
| id * | string | The deleted workflow ( |
| status * | "deleted" | Always The workflow's runs were deleted with it, and approvals its runs were waiting on were cancelled. |
| meta * | any |
TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.studio.workflows.delete('wfl_demo00000001')Showing example in TypeScript
Response example (200)
{
"data": {
"id": "string",
"status": "deleted"
}
}