cURL
curl -X PATCH "https://app.cotool.ai/api/agents/:agentId/operational-settings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"createAlertsForApiRuns":true}'import requests
url = "https://app.cotool.ai/api/agents/{agentId}/operational-settings"
payload = { "createAlertsForApiRuns": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({createAlertsForApiRuns: true})
};
fetch('https://app.cotool.ai/api/agents/{agentId}/operational-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://app.cotool.ai/api/agents/{agentId}/operational-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"createAlertsForApiRuns\": true\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/agents/{agentId}/operational-settings"
payload := strings.NewReader("{\n \"createAlertsForApiRuns\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"createAlertsForApiRuns": true
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>"
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>"
}Agents
Update agent operational settings (deprecated)
Deprecated: legacy API-run alerting is retired — new agents use explicit alert sources and default to alert-free API runs. Kept for backward compatibility so existing consumers can still toggle createAlertsForApiRuns on response agents.
PATCH
/
api
/
agents
/
{agentId}
/
operational-settings
cURL
curl -X PATCH "https://app.cotool.ai/api/agents/:agentId/operational-settings" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"createAlertsForApiRuns":true}'import requests
url = "https://app.cotool.ai/api/agents/{agentId}/operational-settings"
payload = { "createAlertsForApiRuns": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({createAlertsForApiRuns: true})
};
fetch('https://app.cotool.ai/api/agents/{agentId}/operational-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.patch("https://app.cotool.ai/api/agents/{agentId}/operational-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"createAlertsForApiRuns\": true\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.cotool.ai/api/agents/{agentId}/operational-settings"
payload := strings.NewReader("{\n \"createAlertsForApiRuns\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"createAlertsForApiRuns": true
}{
"error": "<string>",
"issues": [
{}
]
}{
"error": "<string>"
}{
"error": "<string>",
"missingPerms": [
"<string>"
]
}{
"error": "<string>"
}Authorizations
API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here
Path Parameters
Unique identifier of the agent to update
Body
application/json
Runtime-owned agent settings that are not managed by GitOps
Whether API-invoked runs of this response agent create alerts
Response
Successful response
Runtime-owned agent settings that are not managed by GitOps
Whether API-invoked runs of this response agent create alerts
Was this page helpful?
⌘I