GET
/
api
/
v1
/
history
/
usage
Get Usage History
curl --request GET \
  --url https://api.harvey.ai/api/v1/history/usage \
  --header 'Authorization: Bearer <token>'
[
  {
    "event_id": 103230489,
    "message_ID": "ab12a1ab-abcd-1a12-1234-1234ab123456",
    "Time": "2024-09-03T14:47:12.000Z",
    "User": "user@example.com",
    "Task": "Assist",
    "Client Matter #": 1234.56,
    "Source": "Files",
    "Number of documents": 5,
    "Feedback Comments": "Incomplete response",
    "Feedback Sentiment": "negative"
  }
]

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 1 year ago from now

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 UsageHistory entries

event_id
integer

Unique identifier for the usage event.

Example:

103230489

message_ID
string<uuid>

ID of the message.

Example:

"ab12a1ab-abcd-1a12-1234-1234ab123456"

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"

Number of documents
integer

Sum of all uploaded documents

Example:

5

Feedback Comments
string[]

Description of negative feedback - can be all or any of Hallucination, Incomplete response, Poor formatting, Something else. Only Negative Feedback can have comments.

Example:

"Incomplete response"

Feedback Sentiment
string

The sentiment of the feedback given, if any, either Positive or Negative.

Example:

"negative"