Skip to main content
DELETE
/
agents
/
{agentId}
Delete Agent
curl --request DELETE \
  --url https://voice-livekit.studio.lyzr.ai/v1/agents/{agentId} \
  --header 'x-api-key: <api-key>'
import requests

url = "https://voice-livekit.studio.lyzr.ai/v1/agents/{agentId}"

headers = {"x-api-key": "<api-key>"}

response = requests.delete(url, headers=headers)

print(response.text)
const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};

fetch('https://voice-livekit.studio.lyzr.ai/v1/agents/{agentId}', 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://voice-livekit.studio.lyzr.ai/v1/agents/{agentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <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://voice-livekit.studio.lyzr.ai/v1/agents/{agentId}"

req, _ := http.NewRequest("DELETE", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://voice-livekit.studio.lyzr.ai/v1/agents/{agentId}")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://voice-livekit.studio.lyzr.ai/v1/agents/{agentId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "error": "<string>",
  "issues": [
    {}
  ],
  "example": {}
}
{
"error": "Agent not found.",
"details": "<string>"
}
Use this endpoint to permanently remove a saved Voice Agent from your organization.
Irreversible Action: Deleting an agent cannot be undone. Any ongoing or future LiveKit sessions attempting to use this agentId will fail. Please ensure you are deleting the correct agent.
Authentication Required: You must include your API key in the x-api-key header to authenticate this request.

Required Parameters

You must pass the agent’s unique identifier in the request URL.
  • agentId: The 24-character string ID of the agent you wish to delete (e.g., 1bca24a70cf2e9fb0c722a35).

Understanding the Response

Unlike GET or POST requests, a successful deletion does not return a JSON payload.
  • 204 No Content: This is the success response. It means the server successfully processed the request and the agent has been completely removed.
  • 400 Invalid agent id: The ID provided does not match the expected format. Check for typos or accidental spaces in your URL path.
  • 404 Agent not found: The server could not locate an agent with that ID. It may have already been deleted, or the ID might belong to a different organization.

Authorizations

x-api-key
string
header
required

Path Parameters

agentId
string
required

The unique identifier of the agent to delete.

Example:

"1bca24a70cf2e9fb0c722a35"

Response

Agent successfully deleted. No content is returned.