Delete a chat
delete
/v1/chat/{chatId}Retired. This endpoint answers
410 Goneand no longer works. It is documented for reference only; use the v2 agent API's Chat instead.
Permanently delete a chat and every message in it. This cannot be undone. Only chats owned by the key's organization can be deleted.
Private keyapi.v1.chat.deleteNo demoDeprecated
Path parameters
1chatIdstring (uuid)required
The chat's id (a UUID). Surrounding whitespace is trimmed.
Response
200The chat was deleted.
messagestringrequired
Confirmation text.
chatIdstring (uuid)required
Id of the deleted chat (trimmed).
e.g. "3f0c2a4e-8b1d-4c6a-9e2f-7a5b1c0d9e88"
Errors
20Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.
404
Chat not found or you do not have permission to delete it.No chat with that id belongs to the organization.
410
This endpoint has been retired (v1/chat/[chatId]).Always, for API callers. This check runs before authentication and consumes no quota.
422
A valid chatId is required.The path segment is only whitespace (for example %20).
curl -X DELETE "https://stylor.ai/api/v1/chat/YOUR_CHAT_ID" \
-H "Authorization: Bearer $STYLOR_API_KEY"Response · 200
{
"message": "Chat deleted successfully.",
"chatId": "3f0c2a4e-8b1d-4c6a-9e2f-7a5b1c0d9e88"
}