The Client Matter API allows you to programmatically create, retrieve, and remove client-matter associations in Harvey. This enables alignment of usage and query activity with specific billing codes, legal engagements, or internal projects.Documentation Index
Fetch the complete documentation index at: https://developers.harvey.ai/llms.txt
Use this file to discover all available pages before exploring further.
The current API request rate limits for Client Matter API endpoints are 150 requests per minute.
Overview
Use the Client Matter API to:- Track Usage by Client Matter: Attribute usage to specific clients or matters
- Streamline Onboarding: Bulk upload client-matter lists during rollout
- Maintain Clean Data: Deactivate unused or outdated entries
Endpoints
Add or Update Client Matters
List Existing Client Matters
Delete Client Matters
Use Cases
Use Case 1: Bulk Onboarding of Client Matters
Challenge: Large firms need to load thousands of client-matter combinations before go-live. Solution: Use the POST endpoint to upload up to 10,000 entries at once.Use Case 2: Enforcing Scope-Based Access
Challenge: Admins need to ensure users only access work linked to authorized matters. Solution: Sync client-matter assignments with workspace or group-level permissions.Use Case 3: Cleaning Up Inactive Matters
Challenge: Outdated entries clutter reporting and can lead to billing confusion. Solution: Use the DELETE endpoint to retire no-longer-used matter IDs.Best Practices
- Normalize naming: Ensure consistent
client_id,matter_id, andnameconventions across systems - Automate imports: Tie the POST endpoint to your firm’s intake or billing system
- Verify before deletion: Always run a
GETcall before using DELETE to confirm matter IDs - Track usage attribution: Cross-reference matter IDs in
/history/usageand/history/queryresponses - Use clear naming: Populate the
namefield with a human-readable description for internal clarity
Error Handling
| Status Code | Description | Example Error Message |
|---|---|---|
| 200 | Success | N/A |
| 400 | Bad Request – Invalid format | { "error": "Missing client_id" } |
| 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.