Client Matters
Manage billing attribution and access control for legal work
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.
Overview
Use the Client Matter API to:
- Enable Cost Recovery: 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 Billing Codes
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
, andname
conventions across systems - Automate imports: Tie the POST endpoint to your firm’s intake or billing system
- Verify before deletion: Always run a
GET
call before using DELETE to confirm matter IDs - Track usage attribution: Cross-reference matter IDs in
/history/usage
and/history/query
responses - Use clear naming: Populate the
name
field 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.