GET
/
api
/
v1
/
history
/
query
Get Query History
curl --request GET \
  --url https://api.harvey.ai/api/v1/history/query \
  --header 'Authorization: Bearer <token>'
[
  {
    "event_id": 103230489,
    "Time": "2024-09-03T14:47:12.000Z",
    "User": "user@example.com",
    "Task": "Assist",
    "Client Matter #": 1234.56,
    "Source": "Files",
    "Query": "In 3 sentences, can you explain how indemnity and limitation of liability clauses typically work in commercial contracts?",
    "Response": "Indemnity clauses in commercial contracts require one party to compensate the other for certain losses or damages arising from specified events, such as breaches or third-party claims. Limitation of liability clauses cap the amount or types of damages one party can recover from the other, often excluding indirect or consequential losses. Together, these clauses allocate and manage risk between the parties, providing predictability and protecting against potentially catastrophic financial exposure.",
    "Documents": "2025_IP_Licensing_Terms_Redline_vs_2024.docx",
    "Number of documents": 1,
    "Link": "https://app.harvey.ai/assistant/assist/123456789"
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

start_time
integer
required

UTC epoch timestamp, up to 2023-07-14

end_time
integer
required

UTC epoch timestamp, up to 30 days from start_time. Note: The API supports a maximum range of 30 days, but it's best to retrieve a max of one day at a time on a regular cadence.

Response

200
application/json

Array of events with QueryHistory entries

The response is of type object[].