Guide to clearing the Message history of a Chat in the Fetch Hive API.
Last updated 18 days ago
Was this helpful?
Remove all messages from a chat
Agent token
Chat token
PATCH /v1/agents/{agent_id}/chats/{id}/clear_messages HTTP/1.1 Host: api.fetchhive.com Authorization: YOUR_API_KEY Accept: */*
Successful response
{ "message": "Successfully cleared the messages.", "chat": { "id": 1, "name": "text", "last_message_content": "text", "last_message_sent_at": "2025-04-24T09:54:56.902Z", "message_count": 1, "generated_at": "2025-04-24T09:54:56.902Z", "token": "text", "status": "text", "agent": { "token": "text" } } }