Delete API Tool
curl --request DELETE \
--url https://app.tuco.ai/api/campaign-tools \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/campaign-tools"
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/campaign-tools', 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/campaign-tools",
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/campaign-tools"
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/campaign-tools")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/campaign-tools")
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_bodyAPI Tools
Delete API Tool
Delete an API tool from your Tuco AI workspace — removes it from goal bots so it can no longer be invoked by AI replies.
DELETE
/
api
/
campaign-tools
Delete API Tool
curl --request DELETE \
--url https://app.tuco.ai/api/campaign-tools \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.tuco.ai/api/campaign-tools"
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/campaign-tools', 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/campaign-tools",
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/campaign-tools"
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/campaign-tools")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.tuco.ai/api/campaign-tools")
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 tool.An API tool lets a goal bot call your endpoint mid-conversation — check stock, look up an
order, fetch a balance — and use the answer in its reply. Attach a tool to a bot by putting its
_id in that bot’s allowedToolIds.The tool id goes in the query string, not the body —
?id=.... There is no request body, and
a DELETE without id returns 400 Invalid tool id.Authentication
Pass your workspace API key as a Bearer token, or use a Clerk session token.Authorization: Bearer tuco_xxxxxxxxxxxxx
Query parameter
string
required
The tool
_id from GET /api/campaign-tools. A missing or
malformed id returns 400 Invalid tool id.Example
curl -X DELETE "https://app.tuco.ai/api/campaign-tools?id=6ac3ed9271adb32c88d566e0" \
-H "Authorization: Bearer tuco_xxxxxxxxxxxxx"
Success (200 OK)
{ "ok": true }
Deleting a tool does not edit the bots that referenced it — a stale id left in a bot’s
allowedToolIds is simply ignored. Clean it up with
PATCH /api/goal-bots/{id} if you want the config tidy.Errors
| Status | When | Body |
|---|---|---|
400 | id missing or malformed | { "error": "Invalid tool id" } |
401 | Missing or invalid API key | { "error": "Unauthorized" } |
404 | No tool with that id in your workspace | { "error": "Tool not found" } |