Delete Chat
Marks a specific chat session as deleted. This is a soft delete; the data is not immediately removed but flagged.
Endpoint
DELETE /chats/{chat_id}
Path Parameters
| Name | Required | Description |
|---|---|---|
chat_id | Yes | The ID of the chat session to delete |
Headers
| Name | Required | Description |
|---|---|---|
X-API-Key | Yes | Your unique API Key provided by ZeroinAI |
Response
Success Response (200 OK)
{
"chat_id": "generated-unique-chat-id",
"created_at": "2023-10-28T14:30:00Z",
"agent_name": "Support Pro Agent",
"creator_company_name": "Your Company Inc.",
"token_limit": 1500.0,
"token_used": 150.0,
"deleted": true,
"messages": []
}
Error Responses
| Status Code | Description |
|---|---|
| 401 Unauthorized | Invalid or missing API Key |
| 404 Not Found | chat_id not found |
| 500 Internal Server Error | If marking as deleted fails for an unexpected reason |
Example Request
curl -X DELETE 'https://api.zeroinai.com/micro-apps/for-api-providers/chat-service/chats/generated-unique-chat-id' \
-H 'X-API-Key: YOUR_UNIQUE_API_KEY'