Agents
Create agent definition
Create a new agent definition. The agent starts in paused status and must be explicitly activated.
Permission: agents:write (Pro plan and above)
POST
/
api
/
agents
Create agent definition
curl --request POST \
--url https://app.dacard.ai/api/agents \
--header 'Content-Type: application/json' \
--cookie __session= \
--data '
{
"name": "<string>",
"description": "<string>",
"status": "paused",
"config": {
"schedule": "<string>",
"notifySlack": true,
"productIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
'import requests
url = "https://app.dacard.ai/api/agents"
payload = {
"name": "<string>",
"description": "<string>",
"status": "paused",
"config": {
"schedule": "<string>",
"notifySlack": True,
"productIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
}
headers = {
"cookie": "__session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: '__session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
status: 'paused',
config: {
schedule: '<string>',
notifySlack: true,
productIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
})
};
fetch('https://app.dacard.ai/api/agents', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'status' => 'paused',
'config' => [
'schedule' => '<string>',
'notifySlack' => true,
'productIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"paused\",\n \"config\": {\n \"schedule\": \"<string>\",\n \"notifySlack\": true,\n \"productIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.dacard.ai/api/agents")
.header("cookie", "__session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"paused\",\n \"config\": {\n \"schedule\": \"<string>\",\n \"notifySlack\": true,\n \"productIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dacard.ai/api/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"paused\",\n \"config\": {\n \"schedule\": \"<string>\",\n \"notifySlack\": true,\n \"productIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
clerkAuthbearerAuth
Clerk session cookie. Authentication is handled by Clerk. Sign in at https://app.dacard.ai/sign-in to obtain a session.
Body
application/json
The type of agent to create
Available options:
strategic_intelligence, anomaly_detection, competitive_monitor, coaching_digest, voc_analysis, strategy_brief, code_quality, spec_quality Display name for this agent
Optional description of the agent's purpose
Available options:
active, paused Agent-specific configuration (schedule, thresholds, notification settings)
Show child attributes
Show child attributes
Response
Agent created
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Create agent definition
curl --request POST \
--url https://app.dacard.ai/api/agents \
--header 'Content-Type: application/json' \
--cookie __session= \
--data '
{
"name": "<string>",
"description": "<string>",
"status": "paused",
"config": {
"schedule": "<string>",
"notifySlack": true,
"productIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
}
'import requests
url = "https://app.dacard.ai/api/agents"
payload = {
"name": "<string>",
"description": "<string>",
"status": "paused",
"config": {
"schedule": "<string>",
"notifySlack": True,
"productIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
}
headers = {
"cookie": "__session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: '__session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
status: 'paused',
config: {
schedule: '<string>',
notifySlack: true,
productIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
}
})
};
fetch('https://app.dacard.ai/api/agents', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'status' => 'paused',
'config' => [
'schedule' => '<string>',
'notifySlack' => true,
'productIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"paused\",\n \"config\": {\n \"schedule\": \"<string>\",\n \"notifySlack\": true,\n \"productIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://app.dacard.ai/api/agents")
.header("cookie", "__session=")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"paused\",\n \"config\": {\n \"schedule\": \"<string>\",\n \"notifySlack\": true,\n \"productIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dacard.ai/api/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"paused\",\n \"config\": {\n \"schedule\": \"<string>\",\n \"notifySlack\": true,\n \"productIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}