Agents
Update agent trigger
Update a trigger’s enabled state, name, condition, or action configuration.
Permission: agents:write (Pro plan and above)
PATCH
/
api
/
agents
/
triggers
/
{id}
Update agent trigger
curl --request PATCH \
--url https://app.dacard.ai/api/agents/triggers/{id} \
--header 'Content-Type: application/json' \
--cookie __session= \
--data '
{
"name": "<string>",
"enabled": true,
"conditionConfig": {
"cron": "<string>",
"threshold": 123,
"dropPercent": 123,
"signalTypes": [
"<string>"
]
},
"actionConfig": {
"autoRun": true,
"notifySlack": true
}
}
'import requests
url = "https://app.dacard.ai/api/agents/triggers/{id}"
payload = {
"name": "<string>",
"enabled": True,
"conditionConfig": {
"cron": "<string>",
"threshold": 123,
"dropPercent": 123,
"signalTypes": ["<string>"]
},
"actionConfig": {
"autoRun": True,
"notifySlack": True
}
}
headers = {
"cookie": "__session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: '__session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
enabled: true,
conditionConfig: {cron: '<string>', threshold: 123, dropPercent: 123, signalTypes: ['<string>']},
actionConfig: {autoRun: true, notifySlack: true}
})
};
fetch('https://app.dacard.ai/api/agents/triggers/{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.dacard.ai/api/agents/triggers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'enabled' => true,
'conditionConfig' => [
'cron' => '<string>',
'threshold' => 123,
'dropPercent' => 123,
'signalTypes' => [
'<string>'
]
],
'actionConfig' => [
'autoRun' => true,
'notifySlack' => true
]
]),
CURLOPT_COOKIE => "__session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dacard.ai/api/agents/triggers/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"conditionConfig\": {\n \"cron\": \"<string>\",\n \"threshold\": 123,\n \"dropPercent\": 123,\n \"signalTypes\": [\n \"<string>\"\n ]\n },\n \"actionConfig\": {\n \"autoRun\": true,\n \"notifySlack\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "__session=")
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))
}HttpResponse<String> response = Unirest.patch("https://app.dacard.ai/api/agents/triggers/{id}")
.header("cookie", "__session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"conditionConfig\": {\n \"cron\": \"<string>\",\n \"threshold\": 123,\n \"dropPercent\": 123,\n \"signalTypes\": [\n \"<string>\"\n ]\n },\n \"actionConfig\": {\n \"autoRun\": true,\n \"notifySlack\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dacard.ai/api/agents/triggers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = '__session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"conditionConfig\": {\n \"cron\": \"<string>\",\n \"threshold\": 123,\n \"dropPercent\": 123,\n \"signalTypes\": [\n \"<string>\"\n ]\n },\n \"actionConfig\": {\n \"autoRun\": true,\n \"notifySlack\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}Authorizations
clerkAuthbearerAuth
Clerk session cookie. Authentication is handled by Clerk. Sign in at https://app.dacard.ai/sign-in to obtain a session.
Path Parameters
Body
application/json
Response
Trigger updated
Was this page helpful?
⌘I
Update agent trigger
curl --request PATCH \
--url https://app.dacard.ai/api/agents/triggers/{id} \
--header 'Content-Type: application/json' \
--cookie __session= \
--data '
{
"name": "<string>",
"enabled": true,
"conditionConfig": {
"cron": "<string>",
"threshold": 123,
"dropPercent": 123,
"signalTypes": [
"<string>"
]
},
"actionConfig": {
"autoRun": true,
"notifySlack": true
}
}
'import requests
url = "https://app.dacard.ai/api/agents/triggers/{id}"
payload = {
"name": "<string>",
"enabled": True,
"conditionConfig": {
"cron": "<string>",
"threshold": 123,
"dropPercent": 123,
"signalTypes": ["<string>"]
},
"actionConfig": {
"autoRun": True,
"notifySlack": True
}
}
headers = {
"cookie": "__session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {cookie: '__session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
enabled: true,
conditionConfig: {cron: '<string>', threshold: 123, dropPercent: 123, signalTypes: ['<string>']},
actionConfig: {autoRun: true, notifySlack: true}
})
};
fetch('https://app.dacard.ai/api/agents/triggers/{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.dacard.ai/api/agents/triggers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'enabled' => true,
'conditionConfig' => [
'cron' => '<string>',
'threshold' => 123,
'dropPercent' => 123,
'signalTypes' => [
'<string>'
]
],
'actionConfig' => [
'autoRun' => true,
'notifySlack' => true
]
]),
CURLOPT_COOKIE => "__session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dacard.ai/api/agents/triggers/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"conditionConfig\": {\n \"cron\": \"<string>\",\n \"threshold\": 123,\n \"dropPercent\": 123,\n \"signalTypes\": [\n \"<string>\"\n ]\n },\n \"actionConfig\": {\n \"autoRun\": true,\n \"notifySlack\": true\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("cookie", "__session=")
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))
}HttpResponse<String> response = Unirest.patch("https://app.dacard.ai/api/agents/triggers/{id}")
.header("cookie", "__session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"conditionConfig\": {\n \"cron\": \"<string>\",\n \"threshold\": 123,\n \"dropPercent\": 123,\n \"signalTypes\": [\n \"<string>\"\n ]\n },\n \"actionConfig\": {\n \"autoRun\": true,\n \"notifySlack\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dacard.ai/api/agents/triggers/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["cookie"] = '__session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"enabled\": true,\n \"conditionConfig\": {\n \"cron\": \"<string>\",\n \"threshold\": 123,\n \"dropPercent\": 123,\n \"signalTypes\": [\n \"<string>\"\n ]\n },\n \"actionConfig\": {\n \"autoRun\": true,\n \"notifySlack\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}