Delete a workflow
curl --request DELETE \
--url https://api.langdock.com/workflows/v1/delete \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.langdock.com/workflows/v1/delete"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.langdock.com/workflows/v1/delete', 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://api.langdock.com/workflows/v1/delete",
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://api.langdock.com/workflows/v1/delete"
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://api.langdock.com/workflows/v1/delete")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.langdock.com/workflows/v1/delete")
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_bodyWorkflow API
Delete Workflow
Permanently delete a workflow the API key user can edit
DELETE
/
workflows
/
v1
/
delete
Delete a workflow
curl --request DELETE \
--url https://api.langdock.com/workflows/v1/delete \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.langdock.com/workflows/v1/delete"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.langdock.com/workflows/v1/delete', 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://api.langdock.com/workflows/v1/delete",
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://api.langdock.com/workflows/v1/delete"
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://api.langdock.com/workflows/v1/delete")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.langdock.com/workflows/v1/delete")
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_bodyPermanently deletes a workflow, including its draft and published versions. There is no confirmation query parameter. Holding
WORKFLOW_DELETE_API is the confirmation.
This endpoint requires editor access. That is broader than the builder, which still requires owner access.
Base URL
https://api.langdock.com/workflows/v1/delete
Dedicated deploymentsReplace
api.langdock.com with <your-deployment-url>/api/public in all requests.Required scopes
This endpoint requires theWORKFLOW_DELETE_API scope (Workflow Deletion API). This scope cannot be granted on a personal API key.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workflowId | string | Yes | UUID of the workflow. Passed as a query parameter. |
Example
const axios = require("axios");
async function deleteWorkflow(workflowId) {
const response = await axios.delete(
"https://api.langdock.com/workflows/v1/delete",
{
params: { workflowId },
headers: {
Authorization: "Bearer YOUR_API_KEY"
}
}
);
console.log(response.data.message);
}
deleteWorkflow("550e8400-e29b-41d4-a716-446655440000");
Response format
Success response (200 OK)
{
status: "success";
message: "Workflow permanently deleted.";
}
Error handling
| Status code | Description |
|---|---|
| 400 | Invalid workflow ID |
| 401 | Invalid or missing API key |
| 403 | Missing WORKFLOW_DELETE_API scope |
| 404 | Workflow not found, or the key user cannot edit it |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Deleting a workflow is permanent.
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.
Was this page helpful?