Skip to main content

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

NameRequiredDescription
chat_idYesThe ID of the chat session to delete

Headers

NameRequiredDescription
X-API-KeyYesYour 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 CodeDescription
401 UnauthorizedInvalid or missing API Key
404 Not Foundchat_id not found
500 Internal Server ErrorIf 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'