Delete Agent by ID
curl --request DELETE \
--url https://server.sellagent.ai/api/agent/delete/{id} \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://server.sellagent.ai/api/agent/delete/{id}"
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "<content-type>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': '<content-type>'}
};
fetch('https://server.sellagent.ai/api/agent/delete/{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://server.sellagent.ai/api/agent/delete/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-key: <x-api-key>"
],
]);
$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://server.sellagent.ai/api/agent/delete/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://server.sellagent.ai/api/agent/delete/{id}")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "<content-type>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.sellagent.ai/api/agent/delete/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = '<content-type>'
response = http.request(request)
puts response.read_body{
"message": "Agent deleted successfully.."
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Agent
Delete Agent
Deletes an existing agent using its unique ID.
DELETE
/
delete
/
{id}
Delete Agent by ID
curl --request DELETE \
--url https://server.sellagent.ai/api/agent/delete/{id} \
--header 'Content-Type: <content-type>' \
--header 'x-api-key: <x-api-key>'import requests
url = "https://server.sellagent.ai/api/agent/delete/{id}"
headers = {
"x-api-key": "<x-api-key>",
"Content-Type": "<content-type>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-api-key': '<x-api-key>', 'Content-Type': '<content-type>'}
};
fetch('https://server.sellagent.ai/api/agent/delete/{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://server.sellagent.ai/api/agent/delete/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"x-api-key: <x-api-key>"
],
]);
$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://server.sellagent.ai/api/agent/delete/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://server.sellagent.ai/api/agent/delete/{id}")
.header("x-api-key", "<x-api-key>")
.header("Content-Type", "<content-type>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.sellagent.ai/api/agent/delete/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<x-api-key>'
request["Content-Type"] = '<content-type>'
response = http.request(request)
puts response.read_body{
"message": "Agent deleted successfully.."
}{
"status": "error",
"message": "Invalid request format, please check API reference."
}{
"status": "error",
"message": "API key is missing or invalid."
}{
"status": "error",
"message": "An unexpected server error occurred."
}Headers
Your API key for authentication
Must be application/json
Available options:
application/json Optional Workspace ID. Defaults to user's current workspace.
Path Parameters
The unique ID of the agent to delete.
Example:
"686679f702bfb2054ec3d1f0"
Response
Agent deleted successfully.
The response is of type object.
⌘I
