Chatspark
K

API Reference

v1
K

Delete Agent

Permanently delete an agent and all associated data including training data, conversations, and vector embeddings. Requires Enterprise plan.

DELETE

/api/v1/agents/{id}

Enterprise
Destructive Action
This action is permanent and cannot be undone. All training data, conversations, leads, and vector embeddings for this agent will be permanently deleted.

Path Parameters

NameTypeRequiredDescription
idintegerRequired

The agent ID to delete

Response

Returns 204 No Content on success with no response body.

What Gets Deleted

  • The agent record and all configuration
  • All training data (files, URLs, text)
  • All conversations and chat messages
  • All captured leads
  • Pinecone vector embeddings (namespace)
  • S3 stored files (training data, avatar)

Example Request

bash

curl -X DELETE https://chatspark.io/api/v1/agents/42 \
  -H "Authorization: Bearer cs_live_abc123..."

Node.js Example

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');
}

Previous

Create Agent

Next

List Conversations