Delete Goal Bot
curl --request DELETE \
--url https://app.tuco.ai/api/goal-bots/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/goal-bots/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.tuco.ai/api/goal-bots/{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://app.tuco.ai/api/goal-bots/{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://app.tuco.ai/api/goal-bots/{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://app.tuco.ai/api/goal-bots/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/goal-bots/{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_bodyGoal Bots
Delete Goal Bot
Permanently remove a goal bot. To stop it without deleting it, PATCH status to paused instead.
DELETE
/
api
/
goal-bots
/
{id}
Delete Goal Bot
curl --request DELETE \
--url https://app.tuco.ai/api/goal-bots/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/goal-bots/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.tuco.ai/api/goal-bots/{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://app.tuco.ai/api/goal-bots/{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://app.tuco.ai/api/goal-bots/{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://app.tuco.ai/api/goal-bots/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/goal-bots/{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_bodyThe Try it panel runs against production (
https://app.tuco.ai) with the key you paste
into it. There is no sandbox — a request from this page permanently deletes a real bot.Goal bots and task agents are the same object. The two engines merged;
/api/goal-bots
and /api/tasks are aliases over one collection and return identical bodies. Every response
carries both goalBot and taskAgent (or goalBots and taskAgents) so integrations written
against either name keep working.The older stage-based engine moved to /api/instructions
and is being retired.The built-in Auto Replies bot cannot be deleted. It is recreated on the next list call, so a
successful delete would be a lie. Deleting it returns
409; set its mode to manual to stop it
instead.To stop a bot temporarily,
PATCH status to
"paused" rather than deleting it.Authentication
Pass your workspace API key as a Bearer token, or use a Clerk session token.Authorization: Bearer tuco_xxxxxxxxxxxxx
Path parameter
string
required
The bot id. A malformed id returns
400 Invalid id.Example
curl -X DELETE "https://app.tuco.ai/api/goal-bots/6ac3ed5f71adb32c88d566df" \
-H "Authorization: Bearer tuco_xxxxxxxxxxxxx"
Success (200 OK)
{ "success": true }
Errors
| Status | When | Body |
|---|---|---|
400 | Malformed {id} | { "error": "Invalid id" } |
400 | Key has no active workspace | { "error": "No active workspace" } |
401 | Missing or invalid API key | { "error": "Unauthorized" } |
404 | No bot with that id in your workspace | { "error": "Not found" } |
409 | Target is the default Auto Replies bot | { "error": "The Auto Replies bot cannot be deleted. Set its mode to Off (manual) to stop it." } |