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

Array of events with QueryHistory entries

event_id
integer

Unique identifier for the usage event.

Example:

103230489

Time
string<date-time>

Timestamp of the event.

Example:

"2024-09-03T14:47:12.000Z"

User
string

Email of the user who triggered the event.

Example:

"user@example.com"

Task
enum<string>

Type of query.

Available options:
Assist,
Company Profile,
Draft,
Redlines Issues List,
Redlines Q&A,
Translation,
Vault Review,
Workflows
Example:

"Assist"

Client Matter #
string

Client matter ID, if exists.

Example:

1234.56

Source
enum<string>

Source of the event.

Available options:
Files,
EDGAR,
EUR-Lex,
Vault
Example:

"Files"

Query
string

Query submitted by the user.

Example:

"In 3 sentences, can you explain how indemnity and limitation of liability clauses typically work in commercial contracts?"

Response
string

Response for the query.

Example:

"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
string[]

Document names associated with the query, if any.

Example:

"2025_IP_Licensing_Terms_Redline_vs_2024.docx"

Number of documents
integer

Sum of all uploaded documents

Example:

1

The link Workspace Admins can use to view the Workspace History item.

Example:

"https://app.harvey.ai/assistant/assist/123456789"