Delete agent
curl --request DELETE \
--url https://api.inya.ai/platform/v1/agents/{botId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}"
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://api.inya.ai/platform/v1/agents/{botId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Agent deleted successfully",
"response": {
"botId": "fb79920229d144608ebf665a10e50275"
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}Agents API
Delete Agent
Permanently delete an agent and all associated configuration
DELETE
/
v1
/
agents
/
{botId}
Delete agent
curl --request DELETE \
--url https://api.inya.ai/platform/v1/agents/{botId} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}"
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://api.inya.ai/platform/v1/agents/{botId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Agent deleted successfully",
"response": {
"botId": "fb79920229d144608ebf665a10e50275"
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}What it does: Permanently delete a voice agent and all of its associated configuration from your organization. This action cannot be undone.
Required Permission
agents
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
botId | string | Yes | Unique agent identifier. |
Minimum working example
curl -X DELETE "https://api.inya.ai/platform/v1/agents/fb79920229d144608ebf665a10e50275" \
-H "x-api-key: <your_api_key>"
Response
Success (200)
{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Agent deleted successfully",
"response": { "botId": "fb79920229d144608ebf665a10e50275" }
}
Errors
404 Not Found - Agent not found or not accessible{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Agent not found or does not belong to your organization"
}
Use Cases
- Removing outdated or unused agents from your organization
- Cleaning up test agents after development
- Decommissioning agents after a project is completed
This action is permanent and cannot be undone. All agent configuration, FAQ entries, and settings will be removed. Ensure you have a backup of any configuration you may need before deleting.
Save the
requestId from every response. You will need it if you contact Gnani support to trace a specific request.Was this page helpful?