Delete Agent
Delete an agent configured for your workspace.
Deletes an agent by its numeric id, scoped to the workspace. The agent is archived and stops monitoring immediately; signals it already surfaced are preserved. Returns 404 when the agent does not exist.
Delete agent
DELETE/api/v2/agents/:agent_id
Path parameters
| Parameter | Type | Description |
|---|---|---|
| agent_id | integer | Identifier of the agent. |
Example request
curl -X DELETE "https://api.getsillage.com/api/v2/agents/42" \
-H "Authorization: Bearer $SILLAGE_API_KEY"const response = await fetch('https://api.getsillage.com/api/v2/agents/42', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SILLAGE_API_KEY}`,
},
})
const result = await response.json()import { request } from 'node:https'
const req = request(
new URL('https://api.getsillage.com/api/v2/agents/42'),
{
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SILLAGE_API_KEY}`,
},
},
(res) => {
let data = ''
res.on('data', (chunk) => {
data += chunk
})
res.on('end', () => {
console.log(JSON.parse(data))
})
},
)
req.end()import os
import requests
response = requests.delete(
"https://api.getsillage.com/api/v2/agents/42",
headers={"Authorization": f"Bearer {os.environ['SILLAGE_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
result = response.json()Example response
{
"data": {
"id": 42
}
}Response fields
| Field | Type | Description |
|---|---|---|
| data.id | integer | Identifier of the deleted agent. |
Errors
| Status | Description |
|---|---|
| 401 | The API key is missing or invalid. |
| 404 | The agent does not exist. |
| 422 | Invalid agent_id — must be a positive integer. |