cURL
curl --request DELETE \
--url https://api.{environment}.corti.app/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <tenant-name>'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
await client.agents.delete("12345678-90ab-cdef-gh12-34567890abc");using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Agents.DeleteAsync("12345678-90ab-cdef-gh12-34567890abc");import requests
url = "https://api.{environment}.corti.app/agents/{id}"
headers = {
"Tenant-Name": "<tenant-name>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/agents/{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 => [
"Authorization: Bearer <token>",
"Tenant-Name: <tenant-name>"
],
]);
$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://api.{environment}.corti.app/agents/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Tenant-Name", "<tenant-name>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.{environment}.corti.app/agents/{id}")
.header("Tenant-Name", "<tenant-name>")
.header("Authorization", "Bearer <token>")
.asString();{
"code": "<string>",
"description": "<string>",
"howToFix": "<string>",
"details": {},
"cause": {}
}{
"code": "<string>",
"description": "<string>",
"howToFix": "<string>",
"details": {},
"cause": {}
}{
"code": "<string>",
"description": "<string>",
"howToFix": "<string>",
"details": {},
"cause": {}
}Agents
Delete Agent by ID
This endpoint deletes an agent by its identifier. Once deleted, the agent can no longer be used in threads.
DELETE
/
agents
/
{id}
cURL
curl --request DELETE \
--url https://api.{environment}.corti.app/agents/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <tenant-name>'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
await client.agents.delete("12345678-90ab-cdef-gh12-34567890abc");using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Agents.DeleteAsync("12345678-90ab-cdef-gh12-34567890abc");import requests
url = "https://api.{environment}.corti.app/agents/{id}"
headers = {
"Tenant-Name": "<tenant-name>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/agents/{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 => [
"Authorization: Bearer <token>",
"Tenant-Name: <tenant-name>"
],
]);
$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://api.{environment}.corti.app/agents/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Tenant-Name", "<tenant-name>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.{environment}.corti.app/agents/{id}")
.header("Tenant-Name", "<tenant-name>")
.header("Authorization", "Bearer <token>")
.asString();{
"code": "<string>",
"description": "<string>",
"howToFix": "<string>",
"details": {},
"cause": {}
}{
"code": "<string>",
"description": "<string>",
"howToFix": "<string>",
"details": {},
"cause": {}
}{
"code": "<string>",
"description": "<string>",
"howToFix": "<string>",
"details": {},
"cause": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Identifies a distinct entity within Corti's multi-tenant system. Ensures correct routing and authentication of the request.
Example:
"base"
Path Parameters
The identifier of the agent associated with the context.
Example:
"12345678-90ab-cdef-gh12-34567890abc"
Response
Agent deleted successfully.
Was this page helpful?
⌘I