History Exports
Export usage and query history across your organization
Harvey’s History Export APIs let you retrieve detailed logs of how users are interacting with the platform. Use them to power usage reports, perform compliance investigations, or attribute activity to clients and matters.
Overview
The History APIs support:
- Usage Tracking: Understand frequency, volume, and system-wide adoption
- Query Forensics: Review exact prompts, outputs, and sources for internal audits or client escalations
- Billing & Cost Attribution: Map usage and queries back to client-matter structures
Usage History
Use Case 1: Usage Reporting and Oversight
Challenge: Firms need reliable, exportable usage metrics to support leadership reporting and billing.
Solution: Pull usage data weekly or monthly and load it into your reporting environment.
Use Case 2: Monitoring Adoption Across Teams
Challenge: Legal and operational leaders need to understand how teams are engaging with Harvey.
Solution: Pull usage logs and associate them with user emails or internal department mappings.
Query History
Use Case 1: Deep Dive Analysis of Specific Queries
Challenge: Admins need to understand exactly what was asked, by whom, and what sources were used.
Solution: Use query history logs to reconstruct an interaction.
Use Case 2: Reviewing Draft Quality and Sources
Challenge: Teams need to verify whether specific outputs were grounded in expected sources.
Solution: Use the documents
and source
fields to trace citation paths.
Best Practices
- Limit to 30-day windows: The API supports a max range of 30 days
- Align client-matter attribution: Combine query and usage logs with client_matter metadata to analyze usage patterns and client activity
- Check task diversity: Use
task
to analyze how different Harvey features are used - Trace user activity contextually: Use email, timestamp, and documents fields to piece together how a user interacted with a specific document or feature
Error Handling
Status Code | Description | Example Error Message |
---|---|---|
200, 201 | Success | N/A |
400 | Bad Request – Missing or invalid input | { "error": "Missing start_time" } |
401 | Unauthorized – Invalid API key | { "error": "Unauthorized" } |
429 | Too Many Requests – Rate limit exceeded | { "error": "Rate limit exceeded" } |
500 | Internal Server Error | { "error": "Unexpected server error" } |
Need help getting started? Contact your Harvey Customer Success Manager for more information.