Skip to main content
DELETE
Eliminar un agente
Deletes the agent. This is a hard delete of the agent document and it cannot be undone. It is not a cascade. Every block the agent referenced stays in the project catalogue, un-archived, with its full version history. Deleting an agent unwires it; it does not clean up after it.
If your goal is to stop an agent answering, PATCH it with is_active: false instead. That is reversible and keeps the configuration intact.

Endpoint

Required scope

agents:write

Headers

Path parameters

Example request

Response

204 No Content

Deleted. No body.

401 Unauthorized

Missing, invalid, revoked, or expired token.

403 Forbidden

The token does not have the agents:write scope.

404 Not Found

No agent with that id in the token’s company and project. A repeated delete lands here, so treat 404 as “already gone” when retrying.

502 Bad Gateway

The agent service is unreachable.

Operational notes

  • The sections go with the agent, and so does their history: they belonged to it. The tools and knowledge nodes it referenced belong to the company and are left alone.
  • Knowledge documents are untouched. Deleting an agent removes its assignments, not the documents themselves.
  • Anything still routing to this agent will stop working. The delete does not check for inbound routes, channels or funnel stages pointing at it. Repoint them first.
  • A retry is safe. The operation is idempotent from the caller’s point of view: the second call is a 404, never a partial delete.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Path Parameters

id
string
required

Response

204 - undefined