Clear Chat Messages

Guide to clearing the Message history of a Chat in the Fetch Hive API.

Clear chat messages

patch

Remove all messages from a chat

Authorizations
Path parameters
agent_idstringRequired

Agent token

idstringRequired

Chat token

Responses
200
Successful response
application/json
patch
PATCH /v1/agents/{agent_id}/chats/{id}/clear_messages HTTP/1.1
Host: api.fetchhive.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "message": "Successfully cleared the messages.",
  "chat": {
    "id": 1,
    "name": "text",
    "last_message_content": "text",
    "last_message_sent_at": "2025-06-26T20:17:18.891Z",
    "message_count": 1,
    "generated_at": "2025-06-26T20:17:18.891Z",
    "token": "text",
    "status": "text",
    "agent": {
      "token": "text"
    }
  }
}

Last updated

Was this helpful?