Speko Docs
API Reference

Delete agent

Removes the agent and its registered tools. The organization's only remaining agent cannot be deleted and returns 409.

DELETE
/v1/agents/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Agent id, prefixed agent_.

Response Body

application/json

application/json

application/json

application/json

{
  "deleted": true
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
{
  "error": "not found",
  "code": "NOT_FOUND"
}
{
  "error": "Cannot delete the only agent in this organization",
  "code": "LAST_AGENT"
}