Agent Management→Delete Agent
Delete Agent
Permanently remove an agent from your account. Note that you cannot delete an agent that is currently assigned to any recipients.
DELETE
https://api.sparkco.ai/api/v1/agents/:id
Path Parameters
Name | Type | Description |
---|---|---|
id Required | integer | The unique identifier of the agent to delete |
Example Request
curl -X DELETE https://api.sparkco.ai/api/v1/agents/1 \
-H "X-API-Key: your-api-key"
Success Response
{
"success": true,
"data": {
"message": "Agent deleted successfully"
}
}
Error Responses
Agent Not Found
{
"success": false,
"error": {
"code": "AGENT_NOT_FOUND",
"message": "Agent not found"
}
}
Access Denied
{
"success": false,
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"message": "You can only delete your own agents"
}
}
Agent In Use
{
"success": false,
"error": {
"code": "AGENT_IN_USE",
"message": "Cannot delete agent that is assigned to recipients"
}
}