Skip to main content
POST
Delete Agent
Use this API to delete a custom agent configuration and all of its versions. Group cleanup: Before the agent document and its versions subcollection are deleted, the agentId is first removed from the agentIds array of every agent group it belongs to. If cleanup fails, the delete is aborted and the agent is left intact, so the call can be safely retried. Groups themselves are never deleted, even if they become empty.

Endpoint

POST https://api.velt.dev/v2/agents/delete

Headers

string
required
Your API key.
string
required

Body

Params

object
required

Example Requests

Response

Success Response

Delete is idempotent. Deleting an agent that does not exist (or was already deleted) returns 200 success with the agentId echoed back, not an error. Do not rely on the response to tell you whether the agent existed; call Get Agent first if you need to know.

Failure Response

Errors: INVALID_ARGUMENT (missing or empty agentId) / NOT_FOUND (the workspace store database could not be resolved) / INTERNAL (group cleanup failed, in which case the agent is left intact and the call can be safely retried).