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

ParameterTypeDescription
agent_idintegerIdentifier 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

FieldTypeDescription
data.idintegerIdentifier of the deleted agent.

Errors

StatusDescription
401The API key is missing or invalid.
404The agent does not exist.
422Invalid agent_id — must be a positive integer.

On this page