Delete a workflow
DELETE/
Deletes a workflow for good, with its versions and every run.
Needs an API token with the Delete permission for workflows (workflow:delete).
Danger There is no undo. A live workflow is deleted without being unpublished, and its webhook address stops working.
Parameters
Path
idRequired · UUIDThe workflow’s ID.
What goes with it
Its versions, its runs (held and waiting ones too), their steps, and the step data kept in storage, which workers remove shortly after.
A workflow that calls it as a sub-flow, or names it as its error workflow, isn’t stopped. Its runs fail when they reach it.
Responses
- 200OK
Deleted.
idisn’t a UUID.- 403
FORBIDDENThe token lacks the Delete permission for workflows. Write isn’t enough.
- 404
NOT_FOUNDNo workflow with this ID in the token’s workspace.
- 409
BUSYSomething else held the workflow, and the call gave up waiting after 30 seconds. Nothing changed. Try again.
Nothing was deleted, and the workflow is still there. Try again.
Any call can also answer: 401 UNAUTHORIZED · 401 TOKEN_ENDED · 403 TOKEN_SURFACE_OFF · 403 FEATURE_OFF · 403 EMBED_NOT_ALLOWED · 403 EMBED_NOT_AVAILABLE · 403 ACCOUNT_SUSPENDED · 429 RATE_LIMITED · 503 BUSY · 503 PAUSED · 503 SERVICE_UNAVAILABLE. See Errors.
Request
GORUNNER="https://api.gorunner.io"
GORUNNER_TOKEN="grt_…" # needs Delete for workflows
WORKFLOW_ID="your-workflow-id"
curl -X DELETE "$GORUNNER/api/workflows/$WORKFLOW_ID" \
-H "Authorization: Bearer $GORUNNER_TOKEN"const GORUNNER = "https://api.gorunner.io";
const TOKEN = process.env.GORUNNER_TOKEN;
const WORKFLOW_ID = process.env.WORKFLOW_ID;
const res = await fetch(
`${GORUNNER}/api/workflows/${WORKFLOW_ID}`,
{
method: "DELETE",
headers: { Authorization: `Bearer ${TOKEN}` },
},
);
const { data } = await res.json();import os, requests
GORUNNER = "https://api.gorunner.io"
TOKEN = os.environ["GORUNNER_TOKEN"]
WORKFLOW_ID = os.environ["WORKFLOW_ID"]
res = requests.delete(
f"{GORUNNER}/api/workflows/{WORKFLOW_ID}",
headers={"Authorization": f"Bearer {TOKEN}"},
)
data = res.json()["data"]Response · 200 OK
{
"data": {
"message": "Workflow deleted"
}
}Every field
It takes no body.
Response · 200 OK
dataobjectmessagestring