API Reference
Permanently delete an agent and all associated data including training data, conversations, and vector embeddings. Requires Enterprise plan.
/api/v1/agents/{id}
Enterprise| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Required | The agent ID to delete |
Returns 204 No Content on success with no response body.
bash
curl -X DELETE https://chatspark.io/api/v1/agents/42 \
-H "Authorization: Bearer cs_live_abc123..."javascript
const response = await fetch('https://chatspark.io/api/v1/agents/42', {
method: 'DELETE',
headers: {
'Authorization': 'Bearer cs_live_abc123...',
},
});
if (response.status === 204) {
console.log('Agent deleted successfully');
}