Workflows
Delete a workflow
Delete a workflow, its settings and its runs. Its runs stop with it.
DELETE
/
workflows
/
{id}
Delete a workflow
curl --request DELETE \
--url https://www.orgo.ai/api/workflows/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.orgo.ai/api/workflows/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.orgo.ai/api/workflows/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.orgo.ai/api/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.orgo.ai/api/workflows/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://www.orgo.ai/api/workflows/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "morning-report",
"deleted": true
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "Too many API requests this minute (120 a minute on your plan). Try again in 12 seconds.",
"code": "rate_limited",
"limit": "api_other_per_minute",
"retry_after": 12
}{
"error": "Service temporarily unavailable. The database is not accepting requests. Retry shortly."
}Deletes a workflow. Its runs stop with it, and every open canvas goes back to the list. A deleted workflow can’t be brought back.
Path parameters
string
required
The workflow’s id, like
morning-report.Headers
string
The version you read. When the workflow changed since, the delete is refused with
409 and code: "version_conflict", so you never delete a change you didn’t see.Response
string
The workflow’s id.
boolean
Always
true.Example
curl -X DELETE https://www.orgo.ai/api/workflows/morning-report \
-H "Authorization: Bearer $ORGO_API_KEY" \
-H 'If-Match: "4"'
import os, requests
r = requests.delete(
"https://www.orgo.ai/api/workflows/morning-report",
headers={"Authorization": f"Bearer {os.environ['ORGO_API_KEY']}", "If-Match": "4"},
)
await fetch("https://www.orgo.ai/api/workflows/morning-report", {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.ORGO_API_KEY}`, "If-Match": "4" },
});
Response
{ "id": "morning-report", "deleted": true }
Errors
| Status | Code | When |
|---|---|---|
401 | No key, or a key Orgo doesn’t know. | |
403 | key_permission | A restricted key without Workflows write. |
404 | not_found | No workflow by that id. |
404 | (no body) | Workflows aren’t open to your account. |
409 | version_conflict | If-Match names an older version. |
429 | rate_limited | Too many writes. Carries Retry-After. |
503 | Orgo couldn’t verify the key because of a server-side fault. Retry. |
Authorizations
API key authentication. Get your key at orgo.ai/workspaces
Headers
The version you read (GET’s version, or its ETag).
Path Parameters
Pattern:
^[a-z0-9-]{1,60}$⌘I
Delete a workflow
curl --request DELETE \
--url https://www.orgo.ai/api/workflows/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.orgo.ai/api/workflows/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.orgo.ai/api/workflows/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.orgo.ai/api/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.orgo.ai/api/workflows/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://www.orgo.ai/api/workflows/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "morning-report",
"deleted": true
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "<string>",
"code": "<string>",
"say": "<string>",
"next": "<string>",
"to_fix": [
"<string>"
],
"problems": [
{}
],
"version": 123,
"lines": "<string>"
}{
"error": "Too many API requests this minute (120 a minute on your plan). Try again in 12 seconds.",
"code": "rate_limited",
"limit": "api_other_per_minute",
"retry_after": 12
}{
"error": "Service temporarily unavailable. The database is not accepting requests. Retry shortly."
}