curl --request DELETE \
--url https://www.asteragents.com/api/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"agentId": 1
}'import requests
url = "https://www.asteragents.com/api/agents"
payload = { "agentId": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({agentId: 1})
};
fetch('https://www.asteragents.com/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://www.asteragents.com/api/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://www.asteragents.com/api/agents"
payload := strings.NewReader("{\n \"agentId\": 1\n}")
req, _ := http.NewRequest("DELETE", 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))
}HttpResponse<String> response = Unirest.delete("https://www.asteragents.com/api/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.asteragents.com/api/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"name": "Customer Support Agent",
"stage": "development",
"showInChat": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T14:00:00.000Z",
"description": "Handles customer inquiries and support tickets",
"logoUrl": "<string>",
"conversationStarters": [
"How can I help you today?",
"What issue are you experiencing?"
],
"model": "openai:gpt-4o",
"maxToolRoundtrips": 50,
"systemPrompt": "<string>",
"tools": {},
"mcpServers": [
123
],
"emailSlug": "support-bot",
"publishedVersionId": 42,
"tags": [
{
"id": 1,
"name": "Production"
}
]
}{
"error": "Agent ID is required"
}{
"error": "Unauthorized: User is not an admin in this organization"
}{
"error": "Internal Server Error"
}Delete an agent
Soft-delete an agent by ID.
The agent will no longer be accessible. Existing conversations will be preserved but new conversations cannot be started.
curl --request DELETE \
--url https://www.asteragents.com/api/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"agentId": 1
}'import requests
url = "https://www.asteragents.com/api/agents"
payload = { "agentId": 1 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({agentId: 1})
};
fetch('https://www.asteragents.com/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://www.asteragents.com/api/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'agentId' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://www.asteragents.com/api/agents"
payload := strings.NewReader("{\n \"agentId\": 1\n}")
req, _ := http.NewRequest("DELETE", 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))
}HttpResponse<String> response = Unirest.delete("https://www.asteragents.com/api/agents")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.asteragents.com/api/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"name": "Customer Support Agent",
"stage": "development",
"showInChat": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-20T14:00:00.000Z",
"description": "Handles customer inquiries and support tickets",
"logoUrl": "<string>",
"conversationStarters": [
"How can I help you today?",
"What issue are you experiencing?"
],
"model": "openai:gpt-4o",
"maxToolRoundtrips": 50,
"systemPrompt": "<string>",
"tools": {},
"mcpServers": [
123
],
"emailSlug": "support-bot",
"publishedVersionId": 42,
"tags": [
{
"id": 1,
"name": "Production"
}
]
}{
"error": "Agent ID is required"
}{
"error": "Unauthorized: User is not an admin in this organization"
}{
"error": "Internal Server Error"
}Authorizations
JWT token from Clerk authentication.
Must be from a user with org:admin role.
Body
The ID of the agent to delete
1
Response
Agent deleted successfully
Unique agent identifier
1
Agent name
"Customer Support Agent"
Agent lifecycle stage
development, released "development"
Whether the agent appears in the chat interface
true
When the agent was created
"2024-01-15T10:30:00.000Z"
When the agent was last updated
"2024-01-20T14:00:00.000Z"
Short description of the agent's purpose
"Handles customer inquiries and support tickets"
URL to the agent's logo image
Suggested conversation starters shown to users
[
"How can I help you today?",
"What issue are you experiencing?"
]
Model identifier (e.g., openai:gpt-4o)
"openai:gpt-4o"
Maximum number of tool call roundtrips per response
50
System prompt / instructions for the agent
Tool definitions keyed by tool name
Connected MCP server IDs (integer mcp_server.id values)
Custom email slug for the agent's email address
"support-bot"
ID of the agent_version snapshot this agent's config currently
reflects. Every save appends a version and advances this pointer;
see GET /agents/versions. The live agent fields above remain the
source of truth — this is bookkeeping for history and rollback.
42
Tags associated with this agent
Show child attributes
Show child attributes