Delete Agent

Archive an AI agent so it stops handling calls. The agent can be restored later.

DELETE

Delete (Archive) Agent

Archive an agent to remove it from active duty. Archived agents stop receiving calls immediately but their configuration and call history are preserved. You can restore them later from the platform.

This endpoint is idempotent — re-archiving an already-archived agent returns 200.

Endpoint

POST https://crmwebhook.com/functions/v1/crm-api/archive-agent

Headers

HeaderValueRequired
x-api-keycfy_your_api_keyYes
Content-Typeapplication/jsonYes

Request Body

{
  "agent_id": "d8f2a229-2f5c-42ba-ac65-402f2c25fee2"
}
FieldTypeRequiredDescription
agent_idstring (UUID)RequiredThe agent to archive

Example Request

curl -X POST \
  https://crmwebhook.com/functions/v1/crm-api/archive-agent \
  -H "x-api-key: cfy_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "d8f2a229-2f5c-42ba-ac65-402f2c25fee2"}'

Response Shape

{
  "agent_id": "d8f2a229-2f5c-42ba-ac65-402f2c25fee2",
  "archived_at": "2026-04-17T12:30:00Z"
}

Response Codes

StatusMeaning
200Agent archived (or already archived)
401Unauthorized — invalid or missing API key
403Organization/sub-account mismatch with API key scope
404Agent not found
Is this a permanent delete?

No. Archiving is a soft delete. The agent moves to the Archived tab in the platform. You can restore it from the UI at any time.

What happens to call history and recordings?

All call history, transcripts, and recordings are preserved. They remain accessible in the Call Logs section even after archiving the agent.

Can I archive via the API and restore via the API?

Currently, archiving is available via the API but restoring must be done from the platform UI under AI Agents > Archived.

© 2026 Centerfy AI. All rights reserved.