# Add Client Matters
Source: https://developers.harvey.ai/api-reference/add/add-client-matters
/client_matters_api.json post /api/v1/client_matters
Deprecated. Use POST /api/v2/clients followed by POST /api/v2/matters for new integrations. See the [Client Matters guide](/guides/client_matters#migrate-from-v1-writes) for migration steps. The v1 GET and DELETE endpoints remain available. When the workspace requires legacy name validation, each name must split into client and matter identifiers using the configured delimiter. Names that do not match appear in failed. A missing required delimiter rejects the batch with HTTP 400 and kind: DELIMITER_REQUIRED.
### Permissions
Requires `Client matters admin` permission.
# Authentication
Source: https://developers.harvey.ai/api-reference/authentication
> [!NOTE]
>
> To create and manage API tokens for your organization’s workspace, visit the "API Tokens" section in your workspace settings. If this section isn't visible to you, contact your Customer Success Manager.
The Harvey API uses bearer token authentication. Include the token in the Authorization header of all API requests.
```bash theme={null}
curl https://api.harvey.ai/v2/endpoint \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json"
```
Your bearer tokens grant access to sensitive data and privileged operations, so they must be kept secure. Never share tokens in public repositories, client-side code, or unsecured channels. If you need to contact Harvey support, make sure to redact your token from any example requests or screenshots.
All API requests must use HTTPS. Requests sent over HTTP or without authentication will be rejected.
## Permissions
To help you further control what can be done with your bearer tokens, each token also has a managable permissions list which can be used to restrict what API endpoints can be used with the token. Consult the API Tokens setting page to learn
more.
Some permissions are only available if your workspace has been specially configured for them. See your Order Form, or email [support@harvey.ai](mailto:support@harvey.ai) for details on which feature(s) your organization can use.
## Country-Specific Endpoint URL
If your organization is using Harvey’s EU-hosted deployment, update the request URL to point to the EU API endpoint: [**https://eu.api.harvey.ai**](https://eu.api.harvey.ai)
```bash theme={null}
curl https://eu.api.harvey.ai/v2/endpoint \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json"
```
If your organization is using Harvey’s AU-hosted deployment, update the request URL to point to the AU API endpoint: [**https://au.api.harvey.ai**](https://au.api.harvey.ai)
```bash theme={null}
curl https://au.api.harvey.ai/v2/endpoint \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json"
```
## Testing Authentication
```bash theme={null}
GET https://api.harvey.ai/api/whoami
```
Returns the underlying service user account associated with the API token, useful for testing that the token works or identifying which token has taken actions surfaced in audit logs.
# Completion
Source: https://developers.harvey.ai/api-reference/completion/completion
/v2_completion_api.json post /api/v2/completion
Harvey's Completion API provides access to Harvey's models via our orchestration engine, allowing users to ask complex, freeform questions and receive detailed legal-grade responses programmatically. It can also be used in conjunction with files attached to the request, Vaults, and Regional Knowledge Sources.
Access to this API requires `Assistant access via API` permission, which is only available in your workspace with an additional purchase. To get started, contact your Account Manager or reach out to us at support@harvey.ai to discuss an agreement.
### Permissions
Requires `Assistant access via API` and `Assistant access` permission.
# Delete Client Matters
Source: https://developers.harvey.ai/api-reference/delete/delete-client-matters
/client_matters_api.json delete /api/v1/client_matters
Soft-deletes client matters by their stored names, preventing future selection. Use name from GET /api/v1/client_matters, not a label or UUID. Inspect success_count and failed even when the response is HTTP 200. Missing names appear in failed. A retry that deletes no active matters can also return requested names in failed; use GET to check their deleted_at values. Externally linked matters cannot be deleted while ethical-wall enforcement is enabled.
Deleting a Client Matter does not delete historical queries associated with that Client Matter, nor does it remove the Client Matter from those historical queries. Users and Admins can update the Client Matter associated with a previous query in the Dashboard.
### Permissions
Requires `Client matters admin` permission.
# Delete Clients
Source: https://developers.harvey.ai/api-reference/delete/delete-clients
/client_matters_api.json delete /api/v2/clients
Soft-deletes clients by your firm's client identifiers. Submit 1 to 10,000 identifiers per request. Each identifier receives one result in deleted, already_absent, or errors. Inspect errors even when the response is HTTP 200. Missing and already-deleted clients appear in already_absent. A client that still has a matter that is not deleted fails with client_has_matters. Delete its matters with DELETE /api/v2/matters first. This endpoint does not change matters.
### Permissions
Requires **Client matters admin** (`write:client_matters`).
### Order
Delete the client's matters with `DELETE /api/v2/matters` before you delete the client. A client with at least one matter that is not deleted fails with `client_has_matters` and is not deleted. This includes matters with `allowed` set to `false`. This endpoint never deletes or changes matters.
### Matching
Send the `client_id` values you use with `POST /api/v2/clients`. Do not send the client label (`client_name`) or the Harvey client UUID. Harvey trims leading and trailing whitespace from each identifier.
### Results
Each identifier appears once in the response: in `deleted`, `already_absent`, or `errors`. Within each array, results keep the order of the request. `deleted` and `already_absent` return the trimmed identifiers. `errors` echoes the values you sent. An identifier with no matching client appears in `already_absent`. So does a client that was already deleted. These are successful results, so a repeated request is safe. An identifier that repeats an earlier identifier after trimming fails with `duplicate_client_id`. Harvey processes the earlier identifier as usual.
A later `POST /api/v2/clients` with the same `client_id` restores the client. It does not restore the client's deleted matters.
See the [Client Matters guide](/guides/client_matters#delete-clients) for examples and error handling.
# Delete Matters
Source: https://developers.harvey.ai/api-reference/delete/delete-matters
/client_matters_api.json delete /api/v2/matters
Soft-deletes matters by your firm's client and matter identifiers. Submit 1 to 10,000 pairs per request. Each pair receives one result in deleted, already_absent, or errors. Inspect errors even when the response is HTTP 200. Missing and already-deleted matters appear in already_absent. Externally linked matters cannot be deleted while ethical-wall enforcement is enabled. The parent client is kept.
Deleting a matter does not delete historical queries associated with that matter, nor does it remove the matter from those historical queries.
### Permissions
Requires **Client matters admin** (`write:client_matters`).
### Matching
Send the `client_id` and `matter_id` you use with `POST /api/v2/matters`. Do not send the full matter name or `harvey_id`. Harvey trims leading and trailing whitespace from both identifiers. Matching uses the identifier pair first, then the stored name: `client_id` + the delimiter + `matter_id`. This finds matters created through v1. Deleted matters also match. The API uses the delimiter configured for the token's active workspace, or `.` when it is unset or blank. This endpoint never returns `delimiter_required`, and the workspace's name format does not apply.
### Results
Each pair appears once in the response: in `deleted`, `already_absent`, or `errors`. `deleted` and `already_absent` return the trimmed identifiers. `errors` echoes the values you sent. A pair with no matching matter, including a pair whose client does not exist, appears in `already_absent`. So does a matter that was already deleted. These are successful results, so a repeated request is safe. A pair that repeats an earlier pair after trimming fails with `duplicate_pair`; Harvey processes the earlier pair as usual.
Externally linked matters, such as matters synced from a DMS or an ethical-wall provider, fail with `blocked_by_ethical_wall` while ethical-wall enforcement is enabled for the workspace.
Deleting a matter keeps its parent client and its ethical-wall configuration. A later `POST /api/v2/matters` with the same pair restores the matter.
See the [Client Matters guide](/guides/client_matters#delete-matters) for examples and error handling.
# Create Request
Source: https://developers.harvey.ai/api-reference/intake/create-request
/intake_api.json post /api/v1/intake/requests
Submits a request into your workspace's Intake queue and returns its identifier. [Read the intake request](/api-reference/intake/get-request) for its progress.
### Permissions
Requires `Intake API` permission, and one of `Intake requests`, `Intake access`, or `Intake admin` permission. If these permissions are not available to select, contact [support@harvey.ai](mailto:support@harvey.ai).
# Get Request
Source: https://developers.harvey.ai/api-reference/intake/get-request
/intake_api.json get /api/v1/intake/requests/{request_id}
Fetches the status for an intake request.
### Permissions
Requires `Intake API` permission, and one of `Intake requests`, `Intake access`, or `Intake admin` permission. If these permissions are not available to select, contact [support@harvey.ai](mailto:support@harvey.ai).
# List Comments
Source: https://developers.harvey.ai/api-reference/intake/list-comments
/intake_api.json get /api/v1/intake/requests/{request_id}/comments
Lists the comments on an intake request, newest first. Follow `pagination.next_cursor` until `pagination.has_more` is false.
### Permissions
Requires `Intake API` permission, and one of `Intake requests`, `Intake access`, or `Intake admin` permission. If these permissions are not available to select, contact [support@harvey.ai](mailto:support@harvey.ai).
# List Requests
Source: https://developers.harvey.ai/api-reference/intake/list-requests
/intake_api.json get /api/v1/intake/requests
Lists the intake requests your token's user can see, newest first. Follow `pagination.next_cursor` until `pagination.has_more` is false.
### Permissions
Requires `Intake API` permission, and one of `Intake requests`, `Intake access`, or `Intake admin` permission. If these permissions are not available to select, contact [support@harvey.ai](mailto:support@harvey.ai).
# Update Request
Source: https://developers.harvey.ai/api-reference/intake/update-request
/intake_api.json patch /api/v1/intake/requests/{request_id}
Changes the fields sent in the body and leaves every other field as it was.
### Permissions
Requires `Intake API` permission, and `Intake access` or `Intake admin` permission. If these permissions are not available to select, contact [support@harvey.ai](mailto:support@harvey.ai).
# Query Audit Logs
Source: https://developers.harvey.ai/api-reference/query/query-audit-logs
/audit_logs_api.json get /api/v1/logs/audit
Paginates forward in time from a given audit log ID. It takes a log ID parameter to begin fetching from and a take parameter for the number of log entries to fetch.
For a complete list of all audit log types and their descriptions, see the [Audit Logs Guide](/guides/audit_logs#audit-log-types).
### Permissions
Requires `Territory admin` or `Organization admin` permission.
# Rate Limits
Source: https://developers.harvey.ai/api-reference/ratelimits
Harvey API implements rate limiting to ensure fair usage and maintain service stability. Rate limits are applied per organization and are reset every minute.
## Rate Limits by Endpoint
| Endpoint Category | Rate Limit (requests/minute) |
| - | - |
| **Assistant Completion Endpoint** | 20 |
| **Vault API Endpoints** | 10 |
| **Audit Log Endpoints** | 60 |
| **History Export Endpoints** | 2 |
| **Client Matters Endpoints** | 150 |
| **Intake – Create Request** | 30 |
| **Intake – Get Request** | 60 |
| **Intake – Update Request** | 30 |
| **Intake – List Requests** | 30 |
| **Intake – List Comments** | 60 |
## Handling Rate Limits
When you exceed the rate limit, the API returns a `429 Too Many Requests` status code. To handle rate limits effectively:
1. **Monitor the rate limit headers** to track your usage
2. **Implement exponential backoff** when you receive a 429 response
3. **Space out your requests** to stay within the limits
4. **Consider batching operations** where possible to reduce the number of API calls
# Get Client Matters
Source: https://developers.harvey.ai/api-reference/retrieve/get-client-matters
/client_matters_api.json get /api/v1/client_matters
Retrieves the full list of client matters in Harvey, including deleted ones, with usage statistics.
### Permissions
Requires either **Access client matters** (`read:client_matters`) or **Client matters admin** (`write:client_matters`). A token with write access does not also need read access.
# Retrieve Earliest Audit Log
Source: https://developers.harvey.ai/api-reference/retrieve/retrieve-earliest-audit-log
/audit_logs_api.json get /api/v1/logs/audit/earliest
Returns the earliest audit log for the workspace. Useful to begin pagination to get more logs.
For a complete list of all audit log types and their descriptions, see the [Audit Logs Guide](/guides/audit_logs#audit-log-types).
### Permissions
Requires `Territory admin` or `Organization admin` permission.
# Retrieve Latest Audit Log
Source: https://developers.harvey.ai/api-reference/retrieve/retrieve-latest-audit-log
/audit_logs_api.json get /api/v1/logs/audit/latest
Returns the latest audit log for the workspace. Useful to begin pagination to get more logs.
For a complete list of all audit log types and their descriptions, see the [Audit Logs Guide](/guides/audit_logs#audit-log-types).
### Permissions
Requires `Territory admin` or `Organization admin` permission.
# Search Audit Logs
Source: https://developers.harvey.ai/api-reference/search/search-audit-logs
/audit_logs_api.json get /api/v1/logs/audit/search/
Takes a timestamp as a parameter and returns the audit log at or after the timestamp. Useful to begin pagination to get more logs.
For a complete list of all audit log types and their descriptions, see the [Audit Logs Guide](/guides/audit_logs#audit-log-types).
### Permissions
Requires `Territory admin` or `Organization admin` permission.
# Upsert Clients
Source: https://developers.harvey.ai/api-reference/upsert/upsert-clients
/client_matters_api.json post /api/v2/clients
Creates or updates clients using your firm's client identifiers. Submit 1 to 10,000 clients per request.
### Permissions
Requires **Client matters admin** (`write:client_matters`).
### Matching and results
A live or soft-deleted client with the same trimmed `client_id` is updated or restored. Matched clients appear in `updated`, even when their fields do not change. New clients appear in `created`.
HTTP 200 can include row failures in `errors`; valid rows still succeed. A repeated identifier in the batch produces `duplicate_client_id` for the later row.
See the [Client Matters guide](/guides/client_matters) for examples and migration steps.
# Upsert Matters
Source: https://developers.harvey.ai/api-reference/upsert/upsert-matters
/client_matters_api.json post /api/v2/matters
Creates or updates matters under existing clients using your firm's client and matter identifiers. Submit 1 to 10,000 matters per request. Uses the delimiter configured for the API token's active workspace, or `.` when none is configured. If the workspace requires an explicit delimiter and none is configured, the whole request returns HTTP 400 with delimiter_required.
### Permissions
Requires **Client matters admin** (`write:client_matters`). Sending `allowed` also requires `use:disallowed_client_matters`, even when the value is `true`; otherwise the whole request returns HTTP 403.
### Before you start
Create the parent clients first. This endpoint never creates clients. If the workspace has matters created with full names, set its delimiter to match those names before using this endpoint. For an existing name such as `10022421-M001`, configure `-` and send `client_id: "10022421"` with `matter_id: "M001"`. The API uses the delimiter configured for the token's active workspace. If it is unset or empty, it uses `.` unless the workspace requires an explicit delimiter. In that case, the whole request returns HTTP 400 with `delimiter_required`; configure a delimiter before retrying. Neither path changes workspace settings.
### Matching and results
The stored name is `client_id` + the effective delimiter + `matter_id`. For client `10022421` and matter `M001`, the default produces `10022421.M001`; a configured `-` produces `10022421-M001`. Matching uses the identifier pair first, then the stored name. Matching soft-deleted matters are restored. Restoring a client does not restore its matters.
New matters appear in `created`. Matched matters appear in `updated`, including when their fields do not change. HTTP 200 can include row failures in `errors`; valid rows still succeed. Duplicate pairs and name collisions are row errors. Each successful row returns the full result. Use smaller batches to limit response size, especially with long descriptions or notices.
See the [Client Matters guide](/guides/client_matters) for examples, field update rules, and migration steps.
# Add Row to Review Table
Source: https://developers.harvey.ai/api-reference/vault/add-row-to-review-table
/vault_api.json post /api/v1/vault/add_row/{review_table_id}
Adds one or more files to an existing review table as new rows and populates each new row's cells for every existing visible column.
Send a single file ID in `file_ids` to add it as its own row. Send two or more file IDs to create a **file group** — the files are reviewed together and occupy a single row in the table. Pass the optional `group_name` to name that group; it defaults to the first file's name.
Every file must belong to the same Vault project the review table was created from and must have finished processing. Use **List Files in a Vault Project** or **Get File Details** to check a file's `processing_status` before adding it.
The run is asynchronous: a successful response means the request was accepted and the rows were scheduled for execution. Poll **Get Review Table Row Details** with the same `review_table_id` and one of the submitted file IDs until the row's cells are returned. For a file group, requesting any member file returns the group's single row.
A file that already has a row in the table, or that already belongs to a file group in it, is rejected with `409`; the error message names the offending file ID. Adding a file whose row was previously deleted from the table restores that row rather than creating a duplicate.
The `review_table_id` path parameter is the review table's integer ID — the same value as `review_table_ids` entries in **Get Vault Project Metadata** and as `review_table_id` in the **Get Review Table Metadata** response.
### Permissions
Requires `Vault API` permission and permission to modify workspace projects.
# Create a new Vault project
Source: https://developers.harvey.ai/api-reference/vault/create-a-new-vault-project
/vault_api.json post /api/v1/vault/create_project
Creates a new project in the Vault system. The project can be designated as a knowledge base.
### Permissions
Requires `Vault API` and `Modify workspace projects` permissions.
# Delete a file from a Vault project
Source: https://developers.harvey.ai/api-reference/vault/delete-a-file-from-a-vault-project
/vault_api.json delete /api/v1/vault/delete_file/{file_id}
Enables authorized organizations to remove an existing file from a Vault project. The endpoint verifies that the file exists and that the requesting user belongs to the file's workspace before proceeding with the deletion. In cases where deletion cannot be immediately completed (for example, if there are pending jobs associated with the file), the API responds with a conflict status. On success, the system logs an audit event and returns confirmation of the deletion.
### Permissions
Requires `Vault API` and `Modify workspace projects` permissions.
# Delete an entire vault project and all its contents
Source: https://developers.harvey.ai/api-reference/vault/delete-an-entire-vault-project-and-all-its-contents
/vault_api.json delete /api/v1/vault/delete_project/{project_id}
### Permissions
Requires `Vault API` and `Modify workspace projects` permissions.
# Get File Details
Source: https://developers.harvey.ai/api-reference/vault/get-file-details
/vault_api.json get /api/v1/vault/get_files
Retrieves details and processing status for one or more files by their IDs. A maximum of 1000 file IDs can be provided per request. This endpoint is useful for checking the processing status of recently uploaded files to determine when they are ready to query. Files that are not found or not accessible are returned with an error field instead of file details.
### Permissions
Requires `Vault API` permission.
# Get Review Table Metadata
Source: https://developers.harvey.ai/api-reference/vault/get-review-table-metadata
/vault_api.json get /api/v1/vault/review_table/{review_table_id}
Fetches metadata for a single review table by its ID, including its title, creation timestamp, and the list of file IDs associated with it.
Use the `review_table_ids` returned by **Get Vault Project Metadata** to enumerate available review tables in a project. Once you have a `review_table_id`, you can:
- Call this endpoint to retrieve the table's `title`, `created_at`, and `file_ids`.
- Call **Get Review Table Row** with a `review_table_id` and `file_id` to retrieve row-level data for a specific file.
### Permissions
Requires `Vault API` permission.
# Get Review Table Row Details
Source: https://developers.harvey.ai/api-reference/vault/get-review-table-row-details
/vault_api.json get /api/v1/vault/get_row/{review_table_id}/{file_id}
Enables authorized users to retrieve a row from a review table, given a review table ID and a file ID corresponding to the row.
Files that belong to a file group (multiple files reviewed together as a single row) are supported: requesting any file in the group returns the group's row, with `file_id` in the response echoing the requested file.
The `review_table_id` path parameter is the review table's integer ID — the same value as `review_table_ids` entries in **Get Vault Project Metadata** and as `review_table_id` in the **Get Review Table Metadata** response. Use **Get Review Table Metadata** to obtain the `file_ids` valid for a given `review_table_id`.
For each cell in the response, `summary` contains the short answer and `additional_context` contains the full reasoning behind it. Within each field, a user-edited value takes precedence over the AI-generated value, including the empty string — if a user clears a field, the API returns `""` for that field and sets `is_edited` to `true` rather than falling back to the AI text. The AI value is only used when the user has never edited that field.
### Permissions
Requires `Vault API` permission.
# Get Vault Project Metadata
Source: https://developers.harvey.ai/api-reference/vault/get-vault-project-metadata
/vault_api.json get /api/v1/vault/get_metadata/{project_id}
Fetches metadata for a specified Vault project, including file details and storage limits.
### Permissions
Requires `Vault API` permission.
# List Files in a Vault Project
Source: https://developers.harvey.ai/api-reference/vault/list-files-in-a-vault-project
/vault_api.json get /api/v1/vault/projects/{project_id}/files
Lists files within a single vault project, with filtering and sorting supported.
**Pagination.** Omit `cursor` on the first request. Subsequent requests should pass back the `next_cursor` value returned in the previous response. Continue until `has_more` is `false`.
### Permissions
Requires `Vault API` permission and access to the specified vault project.
# List Project Users
Source: https://developers.harvey.ai/api-reference/vault/list-project-users
/vault_api.json get /api/v1/vault/projects/{project_id}/users
Lists all workspace users with current active access to a specified Vault project, along with their access levels. Includes effective user access (including inherited access), and the project owner is always included with `MANAGE` access.
Requires vault sharing to be enabled.
### Permissions
Requires `Vault API` permission, and either `Vault sharing (view only)` or `Vault sharing` permission.
# List Vault Projects and Knowledge Bases
Source: https://developers.harvey.ai/api-reference/vault/list-vault-projects-and-knowledge-bases
/vault_api.json get /api/v1/vault/workspace/projects
Lists all Vault projects and knowledge bases in the current workspace with pagination support. This endpoint returns a paginated list of projects that the authenticated user has permission to view.
### Permissions
Requires `View workspace projects` permission.
# List Vaults in the Recycle Bin
Source: https://developers.harvey.ai/api-reference/vault/list-vaults-in-the-recycle-bin
/vault_api.json get /api/v1/vault/workspace/recycle_bin
Lists every vault currently in the recycle bin for the current workspace. When a Vault project is deleted it is not purged immediately — it first moves to a workspace recycle bin, where it can be reviewed before being permanently deleted. Entries are ordered by `deleted_at` descending. This endpoint is restricted to workspace vault admins (the same permission as `GET /api/v1/vault/workspace/projects`).
### Permissions
Requires `View workspace projects` permission.
# Remove Project Users
Source: https://developers.harvey.ai/api-reference/vault/remove-project-users
/vault_api.json delete /api/v1/vault/projects/{project_id}/users
Removes direct workspace user shares for specified users (identified by email address) from a Vault project. Only direct `WORKSPACE_USER` shares are removed; inherited access via workspace, group, or space shares is not affected. Per-user validation failures (e.g. unknown email, inactive user, project owner, self-removal) are returned in the `failed` list rather than rejecting the entire request.
Requires vault sharing to be enabled.
### Permissions
Requires `Vault API` and `Vault sharing` permissions.
# Semantic search over a vault project
Source: https://developers.harvey.ai/api-reference/vault/semantic-search-over-a-vault-project
/vault_api.json post /api/v1/vault/semantic_search
Performs semantic search over documents in a single vault project. Returns the most relevant text chunks for the given natural-language query. Intended for use by external systems (e.g. a customer's own assistant or LLM) that need to retrieve relevant passages and then generate responses using their own models.
Requires vault sharing to be enabled.
### Permissions
Requires `Vault API` and `Vault sharing` permissions.
# Update Project Users
Source: https://developers.harvey.ai/api-reference/vault/update-project-users
/vault_api.json post /api/v1/vault/projects/{project_id}/users
Adds or updates workspace user shares on a Vault project. This endpoint uses an additive/partial-update model: users in the request are added or have their access level updated; users not in the request are left unchanged. The project owner cannot be included in the request.
Requires vault sharing to be enabled.
### Permissions
Requires `Vault API` and `Vault sharing` permissions.
# Upload Files to Project
Source: https://developers.harvey.ai/api-reference/vault/upload-files-to-project
/vault_api.json post /api/v1/vault/upload_files/{project_id}
The Upload Files API endpoint enables organizations to both upload new files and update existing ones within Vault projects. A maximum of 50 files can be uploaded per API request.
### Permissions
Requires `Vault API` and `Modify workspace projects` permissions.
# Assistant
Source: https://developers.harvey.ai/guides/assistant
Transform legal workflows with powerful AI-powered reasoning
Harvey's Assistant API enables powerful legal reasoning over your documents and data. With a single endpoint, you can embed natural language queries, document analysis, and grounded legal insights directly into your applications and workflows.
> [!NOTE]
>
> The current API request rate limit for Assistant API endpoint is **20 requests per minute**.
```bash theme={null}
POST /api/v2/completion
```
## Overview
The Assistant API provides AI-powered responses to complex legal questions, document analysis, and specialized tasks. Use it to build intelligent legal applications that deliver accurate, context-aware results to your users.
### Key Capabilities
* **Natural Language Processing**: Process complex legal queries with nuanced understanding
* **Document Analysis**: Extract insights from contracts and legal documents
* **Knowledge Grounding**: Upload relevant documents to provide context
* **Content Generation**: Create professional drafts for emails and responses
## Use Cases
### Use Case 1: Internal Knowledge Chatbot
**Challenge**: Attorneys often need quick access to firm policies, past contract negotiations, case law, or regulatory updates. Searching through internal databases or asking colleagues takes time and disrupts workflows. By integrating Harvey’s AI into internal chatbots, firms empower attorneys to instantly retrieve relevant legal insights, improving efficiency without sacrificing accuracy.
**Solution**: Integrate the Assistant API into a secure internal chatbot to return policy guidance, research, and previous work product on demand.
```json theme={null}
{
"prompt": "Summarize our indemnity position in past vendor contracts.",
"stream": false
}
```
### Use Case 2: Self-Serve Legal Guidance
**Challenge**: Business teams frequently need input on policies, contracts, compliance, and other complex topics. Waiting for expert review slows down workflows and creates bottlenecks.
**Solution**: Embed the Assistant API in internal tools to offer reliable, policy-grounded answers instantly.
```json theme={null}
{
"prompt": "Can I sign this NDA or does it need legal review?",
"stream": false
}
```
### Use Case 3: Drafting Responses to Legal Inquiries
**Challenge**: Drafting accurate and professional responses for routine legal questions is repetitive and time-consuming.
**Solution**: Use the Assistant API to generate draft replies to client or internal questions directly within email tools.
```json theme={null}
{
"prompt": "Draft a response to this client email about contract renewal timing: 'Hi, our agreement is coming up for renewal next month. Can you please advise on our options and the timeline we should follow?'",
"mode": "draft",
"stream": false
}
```
### Use Case 4: Document Ingestion in ETL Pipelines
**Challenge**: Manually ingesting and analyzing documents from diverse sources slows down workflows.
**Solution**: Automate document classification and summarization as part of backend ingestion systems.
```json theme={null}
{
"prompt": "Extract key clauses and obligations from the attached contract.",
"stream": false
}
```
### Use Case 5: AI-Powered Document Review in Third-Party Platforms
**Challenge**: Assessing vendor documents for compliance with regulations or internal policies is repetitive and resource-intensive.
**Solution**: Integrate Harvey with vendor management tools to automatically review documents against internal playbooks.
```json theme={null}
{
"prompt": "Does this MSA comply with our internal data security standards?",
"stream": false
}
```
## Best Practices
### Optimize Prompts
* **Avoid**: "Review this contract"
* **Use**: "Identify and summarize indemnity clauses in this vendor MSA and flag any deviations from our standard policy."
### Stay Within Prompt Limits
If you're uploading a file, limit the prompt to 4,000 characters. Without a file, prompts can be up to 20,000 characters.
### Stream vs. Non-Stream
Set `stream: true` if you want to receive partial results as they are generated. Default is `false`.
### Model selection
You can pass an optional **model** form parameter to choose which model handles the request. Omit the parameter to use your workspace's default model.
**Supported model slugs:** `gpt-5`, `gpt-5-1`, `gpt-5-2`, `gpt-5-4`, `gpt-5-4-mini`, `gpt-5-5`, `gpt-4-1`, `claude-opus-4-5`, `claude-sonnet-4-5`, `claude-opus-4-6`, `claude-opus-4-7`, `gpt-6-1-sol`, `gpt-6-luna`, `claude-opus-5-5`, `claude-sonnet-5-5`.
## Error Handling
The Assistant API uses standard HTTP status codes. Always check and handle error responses appropriately.
| Status Code | Description | Example Error Message |
| - | - | - |
| 200 | Success | N/A |
| 400 | Bad Request – Invalid parameters | `{ "error": "Missing prompt parameter" }` |
| 401 | Unauthorized – Invalid API key | `{ "error": "Invalid API key provided" }` |
| 429 | Too Many Requests – Rate limit exceeded | `{ "error": "Rate limit exceeded" }` |
| 500 | Internal Server Error | `{ "error": "An internal error occurred" }` |
***
Need help getting started? Contact your Harvey Customer Success Manager for more information.
# Audit Log Example
Source: https://developers.harvey.ai/guides/audit-logs-example
# Using the Public API v1 Audit Log APIs
This guide explains how to retrieve audit logs via the Public API using the **search** and **query** endpoints. The main idea: **you use a timestamp once to find a starting point, then use log IDs for all actual retrieval and pagination.**
## **Why log IDs instead of timestamps?**
* **Search by time** is supported only to get a **starting point** (the first log at or after a given time). The API returns one log and its **ID**.
* **Fetching and pagination** use that **log ID** (and then the ID of the last log in each page). We do not support “give me all logs between 10:00 and 10:15” by timestamp in a single call.
Reasons we key off IDs:
1. **Stable ordering** — Logs are ordered by ID. IDs are unique and never change, so pagination is consistent even if many events share the same second.
2. **No gaps or duplicates** — Using “last seen ID” as the cursor avoids skipping or duplicating logs when events are dense.
3. **Clear “next page”** — The next request is always “logs after this ID,” which is unambiguous.
So: **think of the timestamp as “where do I start?”** and **the log ID as “where am I in the stream?”** for all subsequent requests.
## **The two endpoints**
| **Purpose** | **Endpoint** | **You provide** | **You get** |
| :- | :- | :- | :- |
| **Find a starting log by time** | `GET /api/v1/logs/audit/search?time=` | A timestamp (e.g. 10:00 AM) | One log object — the **first** log at or after that time. That log’s `id` is your cursor. |
| **Fetch logs after a given log** | `GET /api/v1/logs/audit?from=&take=` | A log ID (`from`) and how many to fetch (`take`, 1–1000) | Up to `take` logs whose ID is **after** `from`, in ascending order by ID. |
Important details:
* **Search** returns a **single** log: the first one with `timestamp >=` your `time`. The response body is `{ "log": { "id": "...", "timestamp": "...", ... } }`. You need that `log.id` for the next step.
* **Query** returns logs with **ID strictly greater than** `from`. So the log you got from search is **not** included in the first query response — it is the first log in your time range; you add it to your results yourself, then use its ID to fetch the rest.
Base URL for the Public API: `https://api.harvey.ai` (or your environment’s base URL). Full paths are `/api/v1/logs/audit/search` and `/api/v1/logs/audit`. See [developers.harvey.ai](https://developers.harvey.ai) for the full API reference.
## **Example 1: “All logs since 10:00 AM”**
Goal: at 10:15 AM, get every audit log from 10:00 AM onward.
### **Step 1 — Get the first log and its ID (timestamp → ID)**
* Call: `GET /api/v1/logs/audit/search?time=<10:00 AM in ISO 8601 or your API’s accepted format>`
* Response: `{ "log": { "id": "abc-123-...", "timestamp": "2025-03-11T10:00:00.000Z", ... } }`
* **Keep this log** — it is the first log in your range. Add it to your result set.
* **Save** `log.id` (e.g. `abc-123-...`) — this is your cursor for the next request.
If the response is an error (e.g. no logs available for that time), there are no logs at or after 10:00 AM; you’re done.
### **Step 2 — Fetch the next logs (ID-based)**
* Call: `GET /api/v1/logs/audit?from=abc-123-...&take=1000`
* Response: `{ "logs": [ ... ] }` — up to 1000 logs whose ID is **after** `abc-123-...`.
Append these to your result set.
### **Step 3 — Paginate if needed**
* Each response contains **at most** `take` logs (here, 1000). You never get “more than 1000” in one response.
* If you got **exactly 1000** logs, there may be more. Take the **last** log in the array and use its `id` as the new `from`:
* `GET /api/v1/logs/audit?from=&take=1000`
* Repeat until a response has **fewer than 1000** logs — then there are no more.
Your full “logs since 10:00 AM” set is: **\[log from Step 1] + \[all logs from Step 2 and Step 3].**
## **Example 2: “A 15-minute slice starting at 8:00 AM”**
Goal: all logs from 8:00 AM to 8:15 AM.
You still use **search** to turn “8:00 AM” into a starting log ID, then **query** by ID. The only extra part is **stopping** when logs go past 8:15 AM.
### **Step 1 — Get the first log at or after 8:00 AM**
* Call: `GET /api/v1/logs/audit/search?time=<8:00 AM>`
* Keep the returned **log** as the first log in your slice.
* Save `log.id` for the next request.
### **Step 2 — Fetch in pages and stop at the end time**
* Call: `GET /api/v1/logs/audit?from=&take=1000`
* For each log in `logs`, check its `timestamp`:
* If `timestamp <= 8:15 AM` → include it in your 15-minute slice.
* If `timestamp > 8:15 AM` → you’ve passed the end of the window; stop requesting more and (optionally) drop any later logs from this batch.
* If you got 1000 logs and the last one is still before or at 8:15 AM, there may be more in that window. Use the **last** log’s `id` as `from` and call again. Repeat until you either get fewer than 1000 logs or you see a timestamp after 8:15 AM.
So: **timestamps** are used only to (1) find the start via search and (2) filter or stop when you’ve reached your end time. **IDs** are used for every “give me the next page” request.
## **Summary**
* **Timestamps** answer: “Where do I start?” (search) and “Where do I stop?” (your own end-time filter).
* **Log IDs** answer: “What’s the next page?” (query’s `from` and pagination).
* Always **include the log returned by search** in your results; the first **query** call returns only logs **after** that log’s ID.
* Pagination: use the **last** log’s ID from each response as `from` for the next request; when you get fewer than `take` logs, you’ve reached the end.
For exact parameter names, formats, and error codes, use the [Public API reference](https://developers.harvey.ai) for the audit log endpoints.
# Audit Logs
Source: https://developers.harvey.ai/guides/audit_logs
Query and retrieve audit logs for workspace activity monitoring
The Audit Log API allows customers to query audit logs for their workspace. These APIs cover ways to query audit logs at a given time or from an ID and how to paginate through audit logs over time.
> [!NOTE]
>
> The current API request rate limits for Audit Log API endpoints are **60 requests per minute**.
```bash theme={null}
GET /api/v1/logs/audit/search
GET /api/v1/logs/audit/earliest
GET /api/v1/logs/audit/latest
GET /api/v1/logs/audit
```
## Overview
Use the Audit Log API to:
* **Track User Activity**: Monitor all actions taken by users in your workspace
* **Maintain Compliance**: Keep detailed records for audit and compliance purposes
* **Investigate Incidents**: Retrieve historical logs to investigate specific events
* **Export Records**: Fetch and store audit logs in your own systems
***
## Endpoints
### Search Audit Logs
```bash theme={null}
GET /api/v1/logs/audit/search
```
Returns the audit log at or after a specified timestamp. Useful to begin pagination from a specific point in time.
**Parameters:**
* `time` (required): UTC epoch timestamp, up to 1 year old from now
* `log_type` (optional): Filter to return only logs of a specific type (e.g., `auth:login`, `admin:add_users`)
**Example:**
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/logs/audit/search?time=1712066546" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
```
**Example with filtering by log type:**
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/logs/audit/search?time=1712066546&log_type=auth:login" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
```
### Get Earliest Audit Log
```bash theme={null}
GET /api/v1/logs/audit/earliest
```
Returns the earliest audit log for the workspace. Useful to begin pagination from the very beginning.
**Parameters:**
* `log_type` (optional): Filter to return only logs of a specific type (e.g., `auth:login`, `admin:add_users`)
**Example:**
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/logs/audit/earliest" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
```
**Example with filtering by log type:**
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/logs/audit/earliest?log_type=auth:login" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
```
### Get Latest Audit Log
```bash theme={null}
GET /api/v1/logs/audit/latest
```
Returns the latest audit log for the workspace. Useful to begin pagination from the most recent event.
**Parameters:**
* `log_type` (optional): Filter to return only logs of a specific type (e.g., `auth:login`, `admin:add_users`)
**Example:**
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/logs/audit/latest" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
```
**Example with filtering by log type:**
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/logs/audit/latest?log_type=auth:login" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
```
### Query Audit Logs
```bash theme={null}
GET /api/v1/logs/audit
```
Paginates forward in time from a given audit log ID. Use this endpoint to fetch multiple log entries at once.
**Parameters:**
* `from` (required): Audit log ID to begin fetching from (UUID format)
* `take` (required): Number of audit log entries to fetch (max 1000)
* `log_type` (optional): Filter to return only logs of a specific type (e.g., `auth:login`, `admin:add_users`)
**Example:**
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/logs/audit?from=018e983f-d10f-72aa-9c94-d8263e53c6a4&take=100" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
```
**Example with filtering by log type:**
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/logs/audit?from=018e983f-d10f-72aa-9c94-d8263e53c6a4&take=100&log_type=auth:login" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
```
***
## Use Cases
### Use Case 1: Compliance Monitoring and Audit Trail Capture
**Challenge**: Organizations must maintain detailed records of all user activity for compliance and regulatory requirements.
**Solution**: Regularly fetch and store audit logs using the pagination workflow. Each log entry includes the user, timestamp, IP address, and action type.
### Use Case 2: Incident Response and User Investigations
**Challenge**: When investigating a security incident, teams need to reconstruct what happened during a specific time period.
**Solution**: Use `/search?time=` to start from a specific point in time, then paginate through subsequent logs to track all activity during the incident window.
### Use Case 3: Continuous Monitoring
**Challenge**: Security teams need to monitor recent activity in near real-time.
**Solution**: Periodically poll `/latest` to get the most recent log entry, then use `/audit?from=&take=100` to fetch any new logs since the last check.
***
## Regular Cadence Fetching
For continuous monitoring and compliance requirements, you'll want to fetch audit logs on a regular schedule. Here's the recommended approach:
### Initial Backfill
If you're setting up audit log collection for the first time:
```python theme={null}
import requests
import time
token = "YOUR_API_KEY"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {token}"
}
# Start from the earliest log
response = requests.get("https://api.harvey.ai/api/v1/logs/audit/earliest", headers=headers)
current_log = response.json()["log"]
# Save to your database
save_to_database([current_log])
last_processed_id = current_log["id"]
# Paginate through all historical logs
while True:
time.sleep(1) # Respect 60 req/min rate limit
response = requests.get(
f"https://api.harvey.ai/api/v1/logs/audit?from={last_processed_id}&take=1000",
headers=headers
)
logs = response.json()
if not logs:
break
save_to_database(logs)
last_processed_id = logs[-1]["id"]
print(f"Processed {len(logs)} logs, last ID: {last_processed_id}")
# Store checkpoint in database
save_checkpoint(last_processed_id)
```
### Incremental Updates
After your initial backfill, run this on a regular schedule (e.g., every 5-15 minutes):
```python theme={null}
import requests
import time
token = "YOUR_API_KEY"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {token}"
}
# Load the last processed ID from your database
last_processed_id = load_checkpoint()
# Fetch new logs since last check
response = requests.get(
f"https://api.harvey.ai/api/v1/logs/audit?from={last_processed_id}&take=1000",
headers=headers
)
new_logs = response.json()
if new_logs:
save_to_database(new_logs)
# Update the checkpoint
last_processed_id = new_logs[-1]["id"]
save_checkpoint(last_processed_id)
print(f"Fetched {len(new_logs)} new logs")
else:
print("No new logs since last check")
```
### Scheduling Recommendations
* **High-activity workspaces**: Poll every 5-10 minutes with `take=1000`
* **Medium-activity workspaces**: Poll every 15-30 minutes with `take=500`
* **Low-activity workspaces**: Poll hourly with `take=100`
### Key Considerations
* **Persistent storage**: Always save the last processed log ID to disk/database so your process can resume after restarts.
* **Idempotency**: Audit logs are immutable, so it's safe to reprocess the same log multiple times if needed.
* **Error handling**: If a fetch fails, retry from the same log ID and don't skip ahead.
* **Rate limiting**: With the 60 req / min, fetching 1000 logs takes approximately 1 second per batch. Plan your cadence accordingly.
* **Gap detection**: Monitor timestamps to detect if you're falling behind. If the latest fetched timestamp is more than your polling interval old, increase frequency or batch size.
***
## Best Practices
* **Respect rate limits**: The API is limited to 60 requests per minute. Implement appropriate delays in your polling logic
* **Store logs externally**: Export audit logs to your own SIEM or audit repository for long-term retention and analysis
* **Handle timestamps correctly**: The `time` parameter uses UTC epoch timestamps (seconds since January 1, 1970)
* **Track pagination state**: Always save the last processed log ID to persistent storage to resume pagination if your process is interrupted
* **Monitor for new event types**: The API may add new event types over time, so build your parsing logic to handle unknown types gracefully
* **Implement retries with backoff**: If you hit rate limits or encounter errors, implement exponential backoff before retrying
* **Deduplicate on ingestion**: Use the log `id` field as a unique identifier to prevent duplicate storage if you need to reprocess logs
* **Set up alerting**: Monitor your sync process to ensure logs are being fetched regularly and alert if the process fails
* **Use log\_type filtering when needed**: When you only need specific types of logs, use the `log_type` parameter to filter server-side and reduce bandwidth, processing overhead, and API calls
## Error Handling
| Status Code | Description | Example Error Message |
| - | - | - |
| 200 | Success | N/A |
| 400 | Bad Request – Invalid query input | `{ "error": "Missing required filters" }` |
| 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" }` |
***
## Audit Log Types
Each audit log entry carries a `type` field naming the action performed. The tables below
list every type the API returns, grouped by product area. Every value except the ones under
[Retired log types](#retired-log-types) is also accepted by the `log_type` query parameter.
Harvey adds types as new functionality ships, so treat this list as a snapshot of the
current set rather than a closed set, and parse an unrecognized type gracefully.
> [!NOTE]
>
> Types in the `internal`, `internal_admin`, and `internal_mgmt` categories record actions
> Harvey personnel take in Harvey’s own administrative tooling. They are excluded from the
> workspace admin audit log view and are not listed here, though some can still appear in
> API responses.
### API Operations
| Audit Log Type | Description |
| - | - |
| `api:action_control_bulk_set` | Bulk sets action controls via API |
| `api:action_control_bulk_set_for_resources` | Bulk sets action controls for a set of resources via API |
| `api:action_control_set` | Sets an action control via API |
| `api:agent_run_create` | Starts an agent run via API |
| `api:agent_run_get` | Fetches an agent run via API |
| `api:audit_log_fetch` | Fetches audit logs via API |
| `api:can_user_redirect` | Checks whether a user can be redirected to an SSO connection via API |
| `api:case_summarization` | Summarizes a case via API |
| `api:case_summarization_upload_zip_file` | Uploads a ZIP archive of case files for summarization via API |
| `api:client_matter_management` | Manages client matters via API |
| `api:create_query` | Creates a query via API |
| `api:files_download` | Downloads files via API |
| `api:generate_timekeeping_summary` | Generates a timekeeping summary via API |
| `api:history_fetch` | Fetches history records via API |
| `api:icertis_batch_field_extraction` | Extracts fields from a batch of Icertis documents via API |
| `api:icertis_delete_batch_field_extraction_files` | Deletes Icertis batch field extraction files via API |
| `api:icertis_fetch_batch_field_extraction` | Fetches Icertis batch field extraction via API |
| `api:icertis_field_extraction` | Extracts fields from an Icertis document via API |
| `api:icertis_review_document` | Reviews Icertis document via API |
| `api:improve_prompt` | Rewrites a prompt with Harvey via API |
| `api:ks_document_create` | Creates knowledge source document via API |
| `api:ks_document_delete` | Deletes knowledge source document via API |
| `api:ks_document_get` | Fetches knowledge source document via API |
| `api:ks_document_list` | Lists knowledge source documents via API |
| `api:ks_document_update_metadata` | Updates knowledge source document metadata via API |
| `api:legal_hub_request_create` | Creates Legal Hub request via API |
| `api:legal_hub_request_get` | Fetches Legal Hub request via API |
| `api:pwc_hr_workforce` | Submits a PwC HR workforce request via API |
| `api:syncly_doc_upload` | Uploads a document through the Syncly integration via API |
| `api:token_mgmt_create` | Creates an API token |
| `api:token_mgmt_delete` | Deletes an API token |
| `api:token_mgmt_list` | Lists API tokens |
| `api:token_mgmt_rotate` | Rotates API tokens |
| `api:translation` | Translates a document via API |
| `api:vault_add_review_row` | Adds vault review row via API |
| `api:vault_delete_file` | Deletes files from vault via API |
| `api:vault_delete_project` | Deletes vault projects via API |
| `api:vault_get_files` | Fetches vault files via API |
| `api:vault_get_metadata` | Gets vault metadata via API |
| `api:vault_get_review_row` | Fetches vault review row via API |
| `api:vault_get_review_table` | Fetches vault review table via API |
| `api:vault_list_project_files` | Lists vault project files via API |
| `api:vault_list_project_users` | Lists vault project users via API |
| `api:vault_list_projects` | Lists vault projects via API |
| `api:vault_remove_project_users` | Removes vault project users via API |
| `api:vault_update_project_users` | Updates vault project users via API |
| `api:vault_upload_files` | Uploads files to vault via API |
| `api:whoami` | Fetches the authenticated identity via API |
| `api:workflow_get_definition` | Fetches workflow definition via API |
| `api:workflow_list_definitions` | Lists workflow definitions via API |
| `api:workflow_run` | Runs workflow via API |
### Authentication
| Audit Log Type | Description |
| - | - |
| `auth:failed` | Failed authentication attempt |
| `auth:keycloak_failed` | Failed authentication attempt recorded by the Keycloak identity provider |
| `auth:keycloak_login` | User login recorded by the Keycloak identity provider |
| `auth:keycloak_logout` | User logout recorded by the Keycloak identity provider |
| `auth:login` | User login |
| `auth:logout` | User logout |
| `auth:pub_sub_negotiate` | Client negotiates a real-time pub/sub connection |
### SCIM Provisioning
SCIM events record directory-driven changes to users, groups, and territory membership. The `scim:` category covers changes your identity provider pushes to Harvey; the `admin:scim_*` types cover changes an admin makes to the SCIM configuration itself.
#### Directory sync events
| Audit Log Type | Description |
| - | - |
| `scim:active_workspace_fallback` | A user’s active workspace is reassigned to a fallback after SCIM removes the previous one |
| `scim:group_create` | SCIM creates group |
| `scim:group_delete` | SCIM deletes group |
| `scim:group_patch` | SCIM patches a group |
| `scim:group_replace` | SCIM replaces group |
| `scim:territory_membership_add` | SCIM adds territory membership |
| `scim:territory_membership_remove` | SCIM removes territory membership |
| `scim:user_create` | SCIM creates user |
| `scim:user_delete` | SCIM deletes user |
| `scim:user_email_change` | SCIM changes a user’s email address |
| `scim:user_patch` | SCIM patches a user |
| `scim:user_replace` | SCIM replaces user |
| `scim:user_role_sync` | SCIM syncs user role |
| `scim:user_state_change` | SCIM activates or deactivates a user |
#### SCIM configuration
| Audit Log Type | Description |
| - | - |
| `admin:scim_config_update` | Admin updates SCIM configuration |
| `admin:scim_feature_status_read` | Admin reads SCIM feature status |
| `admin:scim_onboard` | Admin onboards SCIM |
| `admin:scim_profile_attribute_mapping_list` | Admin lists SCIM profile attribute mappings |
| `admin:scim_reset` | Admin resets SCIM |
| `admin:scim_role_mapping_create` | Admin creates SCIM role mapping |
| `admin:scim_role_mapping_delete` | Admin deletes SCIM role mapping |
| `admin:scim_role_mapping_reorder` | Admin reorders SCIM role mappings |
| `admin:scim_territory_workspaces_list` | Admin lists SCIM territory workspaces |
| `admin:scim_user_group_mapping_create` | Admin creates SCIM user group mapping |
| `admin:scim_user_group_mapping_delete` | Admin deletes SCIM user group mapping |
| `admin:scim_user_group_mapping_list` | Admin lists SCIM user group mappings |
### Admin Operations
#### Users, roles, and permissions
| Audit Log Type | Description |
| - | - |
| `admin:active_workspace_fallback` | A user’s active workspace is reassigned to a fallback workspace |
| `admin:add_users` | Admin adds users |
| `admin:bulk_update_role_configs` | Admin bulk updates role configurations |
| `admin:create_role` | Admin creates role |
| `admin:delete_role` | Admin deletes role |
| `admin:edit_user_profile` | Admin edits user profile |
| `admin:fetch_all_perm_bundles` | Admin fetches all permission bundles |
| `admin:fetch_workspace_perm_bundles` | Admin fetches workspace permission bundles |
| `admin:fetch_workspace_role` | Admin fetches workspace role |
| `admin:fetch_workspace_role_configs` | Admin fetches workspace role configurations |
| `admin:fetch_workspace_roles` | Admin fetches workspace roles |
| `admin:fetch_workspace_users` | Admin fetches workspace users |
| `admin:get_role_users` | Admin gets users for a role |
| `admin:grant_perms` | Admin grants permissions |
| `admin:membership_add` | Admin adds a user’s workspace membership |
| `admin:membership_remove` | Admin removes a user’s workspace membership |
| `admin:remove_users` | Admin removes users |
| `admin:revoke_perms` | Admin revokes permissions |
| `admin:territory_join` | Admin joins a territory workspace |
| `admin:update_role` | Admin updates role |
| `admin:update_user_role` | Admin updates user role |
#### Workspace configuration
| Audit Log Type | Description |
| - | - |
| `admin:delete_workspace_logo` | Admin deletes workspace logo |
| `admin:fetch_org_domains` | Admin fetches organization domains |
| `admin:fetch_sharing_settings` | Admin fetches sharing settings |
| `admin:fetch_stats` | Admin fetches statistics |
| `admin:fetch_workspace_features` | Admin fetches workspace features |
| `admin:generate_workspace_personalization_blurb` | Admin generates workspace personalization blurb |
| `admin:get_approval_policy` | Admin fetches approval policy |
| `admin:search_intake_config_options` | Admin searches connector intake configuration options |
| `admin:set_approval_policy` | Admin sets approval policy |
| `admin:update_sharing_settings` | Admin updates sharing settings |
| `admin:update_workspace_brand_name` | Admin updates workspace brand name |
| `admin:upsert_workspace_guidance` | Admin creates or updates workspace guidance |
| `admin:upsert_workspace_logo` | Admin creates or updates workspace logo |
| `admin:upsert_workspace_notice` | Admin creates or updates workspace notice |
| `admin:upsert_workspace_personalization_blurb` | Admin creates or updates workspace personalization blurb |
#### Client matters
| Audit Log Type | Description |
| - | - |
| `admin:add_client_matters` | Admin adds client matters |
| `admin:clear_client_matter_notices` | Admin clears client matter notices |
| `admin:delete_client_matters` | Admin deletes client matters |
| `admin:fetch_client_matter_workspace_settings` | Admin fetches client matter workspace settings |
| `admin:fetch_client_matters` | Admin fetches client matters |
| `admin:manage_client_matters` | Admin manages client matters |
| `admin:set_client_matter_notices` | Admin sets client matter notices |
| `admin:update_client_matters` | Admin updates client matters |
#### Clients
| Audit Log Type | Description |
| - | - |
| `admin:create_client` | Admin creates client |
| `admin:delete_client` | Admin deletes client |
| `admin:get_client` | Admin fetches client |
| `admin:list_clients` | Admin lists clients |
| `admin:update_client` | Admin updates client |
#### Billing and usage
| Audit Log Type | Description |
| - | - |
| `admin:archive_billing_usage_alert` | Admin archives billing usage alert |
| `admin:archive_billing_usage_limit` | Admin archives billing usage limit |
| `admin:create_billing_usage_alert` | Admin creates billing usage alert |
| `admin:create_billing_usage_limit` | Admin creates billing usage limit |
| `admin:edit_billing_usage_alert` | Admin edits billing usage alert |
| `admin:edit_billing_usage_limit` | Admin edits billing usage limit |
| `admin:fetch_billing_usage_alerts` | Admin fetches billing usage alerts |
| `admin:fetch_billing_usage_by_client_matter` | Admin fetches billing usage by client matter |
| `admin:fetch_billing_usage_by_day_spend_split` | Admin fetches billing usage by day spend split |
| `admin:fetch_billing_usage_by_group` | Admin fetches billing usage by group |
| `admin:fetch_billing_usage_by_model` | Admin fetches billing usage by model |
| `admin:fetch_billing_usage_by_practice_area` | Admin fetches billing usage by practice area |
| `admin:fetch_billing_usage_by_shared_space` | Admin fetches billing usage by shared space |
| `admin:fetch_billing_usage_by_user` | Admin fetches billing usage by user |
| `admin:fetch_billing_usage_by_workflow_agent` | Admin fetches billing usage by workflow agent |
| `admin:fetch_billing_usage_by_workspace` | Admin fetches billing usage by workspace |
| `admin:fetch_billing_usage_limit_users` | Admin fetches billing usage limit users |
| `admin:fetch_billing_usage_limits` | Admin fetches billing usage limits |
| `admin:fetch_billing_usage_metadata` | Admin fetches billing usage metadata |
| `admin:fetch_billing_usage_rate_card` | Admin fetches billing usage rate card |
| `admin:fetch_billing_usage_summary` | Admin fetches billing usage summary |
#### Single sign-on
| Audit Log Type | Description |
| - | - |
| `admin:create_sso_connection` | Admin creates SSO connection |
| `admin:deactivate_sso` | Admin deactivates SSO |
| `admin:delete_sso_connection` | Admin deletes SSO connection |
| `admin:generate_sso_ticket` | Admin generates SSO ticket |
| `admin:get_sso_connection` | Admin fetches SSO connection |
| `admin:get_sso_setup_status` | Admin fetches SSO setup status |
| `admin:mark_sso_configured` | Admin marks SSO configured |
| `admin:test_sso_connection` | Admin tests SSO connection |
| `admin:update_sso_connection` | Admin updates SSO connection |
| `admin:verify_sso_connection` | Admin verifies SSO connection |
#### Ethical walls
| Audit Log Type | Description |
| - | - |
| `admin:create_ethical_wall_link_connector` | Admin creates ethical wall link connector |
| `admin:create_ethical_wall_sync_connector` | Admin creates ethical wall sync connector |
| `admin:delete_ethical_wall_connector` | Admin deletes ethical wall connector |
| `admin:disable_wall_provider` | Admin disables the ethical wall provider |
| `admin:enable_wall_provider` | Admin enables the ethical wall provider |
| `admin:get_ethical_wall_link_report` | Admin fetches ethical wall link report |
| `admin:get_ethical_wall_share_compliance_report` | Admin fetches ethical wall share compliance report |
| `admin:get_wall_provider` | Admin fetches the ethical wall provider |
| `admin:list_walls_connectors` | Admin lists ethical wall connectors |
| `admin:set_ethical_wall_provider` | Admin sets ethical wall provider |
#### Integrations and MCP servers
| Audit Log Type | Description |
| - | - |
| `admin:delete_integration_tenant` | Admin deletes integration tenant |
| `admin:delete_mcp_server` | Admin deletes MCP server |
| `admin:deregister_integration_webhook` | Admin deregisters integration webhook |
| `admin:disable_integration` | Admin disables integration |
| `admin:enable_integration` | Admin enables integration |
| `admin:get_connector_intake_config` | Admin fetches connector intake configuration |
| `admin:get_mcp_capability_policies` | Admin fetches MCP capability policies |
| `admin:list_connector_intakes` | Admin lists connector intakes |
| `admin:list_connectors` | Admin lists connectors |
| `admin:refresh_mcp_capability_policies` | Admin refreshes MCP capability policies |
| `admin:register_integration_webhook` | Admin registers integration webhook |
| `admin:register_mcp_server` | Admin registers MCP server |
| `admin:update_integration` | Admin updates integration |
| `admin:update_integration_tenant` | Admin updates integration tenant |
| `admin:update_mcp_capability_policies` | Admin updates MCP capability policies |
| `admin:update_mcp_server` | Admin updates MCP server |
| `admin:upsert_integration_tenant` | Admin creates or updates integration tenant |
#### Playbooks
| Audit Log Type | Description |
| - | - |
| `admin:publish_playbook` | Admin publishes playbook |
| `admin:unpublish_playbook` | Admin unpublishes playbook |
| `admin:update_playbook_permissions` | Admin updates playbook permissions |
#### History, exports, and retention
| Audit Log Type | Description |
| - | - |
| `admin:client_export_workspace_users` | Admin exports workspace users from client |
| `admin:client_view_workspace_history` | Admin views workspace history in client |
| `admin:client_view_workspace_history_item` | Admin views specific workspace history item in client |
| `admin:create_export_template` | Admin creates export template |
| `admin:delete_export_template` | Admin deletes export template |
| `admin:delete_workspace_history_item` | Admin deletes workspace history item |
| `admin:delete_workspace_history_items` | Admin deletes multiple workspace history items |
| `admin:download_export_template` | Admin downloads export template |
| `admin:edit_export_template` | Admin edits export template |
| `admin:export_query_usage` | Admin exports query usage data |
| `admin:export_workspace_history` | Admin exports workspace history |
| `admin:fetch_export_template` | Admin fetches export template |
| `admin:fetch_export_templates` | Admin fetches export templates |
| `admin:fetch_workspace_audit_logs` | Admin fetches workspace audit logs |
| `admin:fetch_workspace_history` | Admin fetches workspace history |
| `admin:fetch_workspace_history_item` | Admin fetches specific workspace history item |
| `admin:fetch_workspace_history_metadata` | Admin fetches workspace history metadata |
| `admin:fetch_workspace_retention` | Admin fetches workspace retention |
| `admin:generate_query_usage_download_url` | Admin generates a download URL for a query usage export |
| `admin:toggle_recycle_bin` | Admin turns the vault recycle bin on or off |
| `admin:update_vault_retention` | Admin updates vault retention |
| `admin:update_workspace_retention` | Admin updates workspace retention |
### User Operations
#### Assistant, history, and threads
| Audit Log Type | Description |
| - | - |
| `user:agent_history_event_load` | Agent loads a history event for context |
| `user:agent_history_search_surface` | Agent surfaces history search results |
| `user:assistant_cache_ping` | Client pings the Assistant prompt cache |
| `user:automation_create` | User creates automation |
| `user:automation_delete` | User deletes automation |
| `user:automation_update` | User updates automation |
| `user:cancel_history_item` | User cancels history item |
| `user:client_view_history` | User views history in client |
| `user:client_view_history_item` | User views specific history item in client |
| `user:create_assistant_chat` | Legacy type for Assistant query creation, superseded by `user:create_query` |
| `user:create_query` | User creates query |
| `user:delete_history_item` | User deletes history item |
| `user:dismiss_thread` | User dismisses thread |
| `user:export_thread` | User exports thread |
| `user:export_us_caselaw_cases` | User exports US caselaw cases |
| `user:fetch_active_events` | User fetches active events |
| `user:fetch_citation_source` | User fetches citation source |
| `user:fetch_history` | User fetches history |
| `user:fetch_history_item` | User fetches specific history item |
| `user:fetch_history_metadata` | User fetches history metadata |
| `user:fetch_query_questions` | User fetches query questions |
| `user:fetch_researched_uncited_sources` | User fetches researched uncited sources |
| `user:mark_thread_read` | User marks thread read |
| `user:move_thread` | User moves thread |
| `user:set_assistant_event_caption` | User sets Assistant event caption |
| `user:update_history_item` | User updates history item |
| `user:update_investigation_plan` | User updates investigation plan |
#### Files and documents
| Audit Log Type | Description |
| - | - |
| `user:attach_recent_event_file` | User attaches recent event file |
| `user:create_generated_document` | User creates generated document |
| `user:extract_file_text` | User extracts file text |
| `user:fetch_assistant_files` | User fetches Assistant files |
| `user:fetch_draft_revision` | User fetches draft revision |
| `user:fetch_generated_document_details` | User fetches generated document details |
| `user:generate_file_signed_urls` | User generates signed URLs for files |
| `user:parse_pst` | User parses a PST mail archive |
| `user:process_event_files` | User unlocks a presigned upload so its files are processed |
| `user:rename_draft` | User renames draft |
| `user:rename_generated_document` | User renames generated document |
| `user:resolve_assets` | User resolves asset references |
| `user:set_draft_revision_current` | User makes a draft revision the current one |
| `user:update_draft_revision` | User updates draft revision |
| `user:update_generated_document` | User updates generated document |
| `user:upload_file_init` | User initiates a two-phase file upload |
#### Vault
| Audit Log Type | Description |
| - | - |
| `user:agent_save_files_to_vault` | Agent saves files to a vault project |
| `user:clear_vault_query_errors` | User clears vault query errors |
| `user:convert_vault_to_knowledge_base` | User converts a vault project to a knowledge base |
| `user:create_vault_download` | User creates vault download |
| `user:create_vault_folder` | User creates vault folder |
| `user:create_vault_folder_sharing_permissions` | User creates vault folder sharing permissions |
| `user:delete_vault_files` | User deletes vault files |
| `user:delete_vault_folder` | User deletes vault folder |
| `user:delete_vault_folder_sharing_permissions` | User deletes vault folder sharing permissions |
| `user:duplicate_vault_files` | User duplicates vault files |
| `user:fetch_project_metadata` | User fetches project metadata |
| `user:fetch_vault_cloneable_projects` | User fetches vault cloneable projects |
| `user:fetch_vault_example_project` | User fetches vault example project |
| `user:fetch_vault_file` | User fetches vault file |
| `user:fetch_vault_files` | User fetches vault files |
| `user:fetch_vault_folder` | User fetches vault folder |
| `user:fetch_vault_folder_history_stats` | User fetches vault folder history stats |
| `user:fetch_vault_folder_path` | User fetches vault folder path |
| `user:fetch_vault_folders_by_path` | User fetches vault folders by path |
| `user:fetch_vault_history_item` | User fetches vault history item |
| `user:fetch_vault_knowledge_bases` | User fetches vault knowledge bases |
| `user:fetch_vault_projects_history_stats` | User fetches vault projects history stats |
| `user:fetch_vault_review_workflow` | User fetches vault review workflow |
| `user:fetch_vault_top_level_folders` | User fetches vault top-level folders |
| `user:generate_vault_download_url` | User generates vault download URL |
| `user:get_vault_project_user_access_level` | User fetches vault project user access level |
| `user:move_vault_files` | User moves vault files |
| `user:move_vault_folder` | User moves vault folder |
| `user:purge_vault_from_recycle_bin` | User purges a vault project from the recycle bin |
| `user:rerun_vault_review_queries` | User reruns vault review queries |
| `user:restore_vault_from_recycle_bin` | User restores a vault project from the recycle bin |
| `user:retry_vault_files` | User retries vault files |
| `user:save_workflow_output_to_vault` | User saves workflow output to vault |
| `user:search_vault_files` | User searches vault files |
| `user:semantic_search_with_vault_folder` | User performs semantic search with vault folder |
| `user:set_vault_example_project` | User sets vault example project |
| `user:transfer_vault_project_ownership` | User transfers vault project ownership |
| `user:trigger_vault_summary` | User triggers vault summary |
| `user:unset_vault_example_project` | User unsets vault example project |
| `user:update_vault_file_metadata` | User updates vault file metadata |
| `user:update_vault_folder_metadata` | User updates vault folder metadata |
| `user:update_vault_folder_sharing_permissions` | User updates vault folder sharing permissions |
| `user:upload_vault_files` | User uploads vault files |
#### Review tables
| Audit Log Type | Description |
| - | - |
| `user:create_review_cell_comment` | User creates review cell comment |
| `user:create_vault_review_query` | User creates vault review query |
| `user:delete_review_cell_comment` | User deletes review cell comment |
| `user:edit_review_cell` | User edits review cell |
| `user:edit_review_cell_comment` | User edits review cell comment |
| `user:export_vault_review_query` | User exports vault review query |
| `user:fetch_review_table_column_values` | User fetches review table column values |
| `user:fetch_review_table_rows` | User fetches review table rows |
| `user:fetch_review_table_skeleton` | User fetches review table skeleton |
| `user:fetch_vault_file_review_rows` | User fetches vault file review rows |
| `user:fetch_vault_review_query_usage` | User fetches vault review query usage |
| `user:flag_review_cell` | User flags review cell |
| `user:generate_review_table_export_url` | User generates review table export URL |
| `user:list_review_tables_home` | User lists review tables on the review tables home page |
| `user:lock_review_cell` | User locks review cell |
| `user:mark_review_event_completed` | User marks review event as completed |
| `user:open_review_files_in_assistant` | User opens review files in Assistant |
| `user:unflag_review_cell` | User clears a flag on a review cell |
| `user:unlock_review_cell` | User unlocks review cell |
#### Playbooks and playbook review
| Audit Log Type | Description |
| - | - |
| `user:check_playbook_review_access` | User checks playbook review access |
| `user:convert_playbook_document` | User converts playbook document |
| `user:count_vault_folder_playbook_reviewable_files` | User counts vault folder playbook reviewable files |
| `user:create_playbook` | User creates playbook |
| `user:create_vault_folder_playbook_config` | User creates vault folder playbook configuration |
| `user:delete_playbook` | User deletes playbook |
| `user:delete_vault_folder_playbook_config` | User deletes vault folder playbook configuration |
| `user:detect_paper_type` | User detects which party’s paper a contract is on |
| `user:duplicate_playbook` | User duplicates playbook |
| `user:export_playbook` | User exports playbook |
| `user:export_playbook_review` | User exports playbook review |
| `user:extract_playbook_parties` | User extracts playbook parties |
| `user:fetch_playbook_history` | User fetches playbook history |
| `user:fetch_playbook_permissions` | User fetches playbook permissions |
| `user:fetch_playbook_review` | User fetches playbook review |
| `user:fetch_playbook_review_daily_limit` | User fetches playbook review daily limit |
| `user:fetch_playbook_review_history` | User fetches playbook review history |
| `user:fetch_playbook_version` | User fetches playbook version |
| `user:get_playbook` | User fetches playbook |
| `user:improve_playbook_rule` | User improves playbook rule |
| `user:list_playbooks` | User lists playbooks |
| `user:list_vault_folder_playbook_configs` | User lists vault folder playbook configurations |
| `user:open_playbook_review_in_assistant` | User opens a playbook review in Assistant |
| `user:pause_vault_folder_playbook_config` | User pauses vault folder playbook configuration |
| `user:playbook_review_accept_suggestions` | User accepts playbook review suggestions |
| `user:playbook_review_assign` | User assigns a playbook review |
| `user:playbook_review_dismiss_suggestions` | User dismisses playbook review suggestions |
| `user:playbook_review_explanation_item_follow_up` | User asks a follow-up on a playbook review explanation item |
| `user:playbook_review_failed_rule_rerun` | User reruns a failed playbook review rule |
| `user:playbook_review_follow_up` | User asks a follow-up question on a playbook review |
| `user:playbook_review_patch` | User updates a playbook review |
| `user:playbook_review_position_change` | User moves a playbook review suggestion position |
| `user:playbook_review_restore_suggestions` | User restores playbook review suggestions |
| `user:playbook_review_revise_comment` | User revises a playbook review comment |
| `user:playbook_review_rule_rerun` | User reruns a playbook review rule |
| `user:playbook_review_set_status` | User sets the status of a playbook review |
| `user:prefill_run_metadata` | User prefills playbook review run metadata |
| `user:reset_playbook_review_daily_limit` | User resets playbook review daily limit |
| `user:review_playbook_document` | User reviews playbook document |
| `user:review_playbook_document_v2` | User reviews a playbook document (v2) |
| `user:trigger_vault_folder_playbook_reviews` | User triggers vault folder playbook reviews |
| `user:unpause_vault_folder_playbook_config` | User resumes vault folder playbook configuration |
| `user:update_playbook` | User updates playbook |
| `user:update_vault_folder_playbook_config` | User updates vault folder playbook configuration |
| `user:view_playbook_review_activities` | User views playbook review activities |
#### Clause library
| Audit Log Type | Description |
| - | - |
| `user:bulk_fetch_clause_versions` | User bulk fetches clause versions |
| `user:create_clause` | User creates clause |
| `user:delete_clause` | User deletes clause |
| `user:fetch_clause` | User fetches clause |
| `user:fetch_clause_access` | User fetches clause access |
| `user:fetch_clause_version` | User fetches clause version |
| `user:list_clause_versions` | User lists clause versions |
| `user:list_clauses` | User lists clauses |
| `user:revert_clause` | User reverts clause |
| `user:save_clause_from_highlight` | User saves clause from highlight |
| `user:update_clause` | User updates clause |
#### Contract review
| Audit Log Type | Description |
| - | - |
| `user:add_contract_file_to_contract_space` | User adds contract file to contract space |
| `user:assign_contract_review_requests` | User assigns contract review requests |
| `user:assign_contract_space_users` | User assigns contract space users |
| `user:bulk_redo_contract_review_requests` | User bulk redoes contract review requests |
| `user:compile_assignment_policy_condition` | User compiles an assignment policy condition |
| `user:compile_assignment_policy_rules` | User compiles assignment policy rules |
| `user:continue_contract_review_request` | User continues contract review request |
| `user:create_contract_intake_channel` | User creates contract intake channel |
| `user:create_contract_space` | User creates contract space |
| `user:create_contracting_action` | User creates contracting action |
| `user:decide_all_contract_review_suggestions` | User decides all contract review suggestions |
| `user:decide_contract_review_suggestion` | User decides contract review suggestion |
| `user:delete_assignment_policy` | User deletes assignment policy |
| `user:delete_contract_intake_channel` | User deletes contract intake channel |
| `user:delete_contract_space` | User deletes contract space |
| `user:fetch_contract_review_request` | User fetches contract review request |
| `user:get_assignment_decision` | User fetches assignment decision |
| `user:get_assignment_policy` | User fetches assignment policy |
| `user:get_contract_space_detail` | User fetches contract space details |
| `user:get_latest_contract_from_space` | User fetches latest contract from space |
| `user:list_contract_assignment_fields` | User lists contract assignment fields |
| `user:list_contract_files` | User lists contract files |
| `user:list_contract_intake_channels` | User lists contract intake channels |
| `user:list_contract_review_requests` | User lists contract review requests |
| `user:list_contract_review_suggestion_sources` | User lists contract review suggestion sources |
| `user:list_contract_review_suggestions` | User lists contract review suggestions |
| `user:list_contract_spaces` | User lists contract spaces |
| `user:list_contracting_agents` | User lists contracting agents |
| `user:save_assignment_policy` | User saves assignment policy |
| `user:set_contract_review_request_archive_status` | User sets contract review request archive status |
| `user:update_contract_intake_channel` | User updates contract intake channel |
| `user:update_contract_space_status` | User updates contract space status |
#### Legal Hub
| Audit Log Type | Description |
| - | - |
| `user:assign_legal_hub_request_reviewer` | User assigns Legal Hub request reviewer |
| `user:cancel_legal_hub_request` | User cancels Legal Hub request |
| `user:complete_legal_hub_output_review` | User completes a Legal Hub output review |
| `user:create_legal_hub_agent_roster_entry` | User creates Legal Hub agent roster entry |
| `user:create_legal_hub_intake_vault` | User creates Legal Hub intake vault |
| `user:delete_legal_hub_agent_roster_entry` | User deletes Legal Hub agent roster entry |
| `user:delete_legal_hub_intake_vault` | User deletes Legal Hub intake vault |
| `user:disable_legal_hub_agent_roster_entry` | User disables Legal Hub agent roster entry |
| `user:disable_legal_hub_intake_vault` | User disables Legal Hub intake vault |
| `user:enable_legal_hub_agent_roster_entry` | User enables Legal Hub agent roster entry |
| `user:enable_legal_hub_intake_vault` | User enables Legal Hub intake vault |
| `user:fetch_legal_hub_request` | User fetches Legal Hub request |
| `user:get_legal_hub_agent_roster_entry` | User fetches Legal Hub agent roster entry |
| `user:get_legal_hub_assignment_rules` | User fetches Legal Hub assignment rules |
| `user:get_legal_hub_intake_vault` | User fetches Legal Hub intake vault |
| `user:list_legal_hub_agent_reviewers` | User lists Legal Hub agent reviewers |
| `user:list_legal_hub_agent_roster_candidates` | User lists Legal Hub agent roster candidates |
| `user:list_legal_hub_agent_roster_entries` | User lists Legal Hub agent roster entries |
| `user:list_legal_hub_intake_vaults` | User lists Legal Hub intake vaults |
| `user:list_legal_hub_output_reviews` | User lists Legal Hub output reviews |
| `user:list_legal_hub_requests` | User lists Legal Hub requests |
| `user:list_legal_hub_reviewer_candidates` | User lists Legal Hub reviewer candidates |
| `user:override_legal_hub_request` | User overrides a Legal Hub request |
| `user:replace_legal_hub_agent_reviewers` | User replaces Legal Hub agent reviewers |
| `user:replace_legal_hub_assignment_rules` | User replaces Legal Hub assignment rules |
| `user:update_legal_hub_agent_roster_entry` | User updates Legal Hub agent roster entry |
| `user:update_legal_hub_intake_vault` | User updates Legal Hub intake vault |
#### Deals, diligence, and portfolios
| Audit Log Type | Description |
| - | - |
| `user:create_competitors_excel` | User exports a competitors table to Excel |
| `user:create_deal_attribute_definition` | User creates deal attribute definition |
| `user:create_deal_attribute_value` | User creates deal attribute value |
| `user:create_diligence_report_job` | User creates diligence report job |
| `user:create_workspace_investment_type` | User creates workspace investment type |
| `user:create_workspace_sector` | User creates workspace sector |
| `user:delete_deal_attribute_definition` | User deletes deal attribute definition |
| `user:delete_workspace_investment_type` | User deletes workspace investment type |
| `user:delete_workspace_sector` | User deletes workspace sector |
| `user:fetch_diligence_sections` | User fetches diligence sections |
| `user:get_deal` | User fetches deal |
| `user:list_company_profile_taxonomy` | User lists the company profile taxonomy |
| `user:list_deals` | User lists deals |
| `user:portfolios_create_portfolio` | User creates a portfolio |
| `user:portfolios_get_portfolio` | User fetches a portfolio |
| `user:portfolios_link_deals` | User links deals to a portfolio |
| `user:portfolios_list_portfolios` | User lists portfolios |
| `user:portfolios_unlink_deal` | User unlinks a deal from a portfolio |
| `user:portfolios_update_portfolio` | User updates a portfolio |
| `user:reject_deal_attribute_value` | User rejects deal attribute value |
| `user:start_deal_attribute_runs` | User starts deal attribute runs |
| `user:unverify_deal_attribute_value` | User unverifies deal attribute value |
| `user:update_deal_attribute_definition` | User updates deal attribute definition |
| `user:update_workspace_investment_type` | User updates workspace investment type |
| `user:update_workspace_sector` | User updates workspace sector |
| `user:verify_deal_attribute_value` | User verifies deal attribute value |
#### Facts and chronology
| Audit Log Type | Description |
| - | - |
| `user:get_chronology` | User fetches chronology |
| `user:get_chronology_event` | User fetches chronology event |
| `user:get_fact` | User fetches fact |
| `user:get_fact_database` | User fetches fact database |
| `user:get_fact_entity` | User fetches fact entity |
| `user:get_fact_issue` | User fetches fact issue |
| `user:get_master_chronology` | User fetches master chronology |
| `user:list_fact_databases` | User lists fact databases |
| `user:query_chronology_event_facts` | User queries chronology event facts |
| `user:query_chronology_event_navigation` | User queries chronology event navigation |
| `user:query_chronology_event_window` | User queries chronology event window |
| `user:query_chronology_events` | User queries chronology events |
| `user:query_fact_entities` | User queries fact entities |
| `user:query_fact_filter_values` | User queries fact filter values |
| `user:query_fact_issues` | User queries fact issues |
| `user:query_facts` | User queries facts |
#### Horizon scanning
| Audit Log Type | Description |
| - | - |
| `user:autofill_horizon_scan_parameters` | User autofills horizon scan parameters with Harvey |
| `user:create_horizon_scan` | User creates horizon scan |
| `user:delete_horizon_scan` | User deletes horizon scan |
| `user:get_horizon_scan` | User fetches horizon scan |
| `user:get_horizon_scan_revisions` | User fetches horizon scan revisions |
| `user:list_horizon_scan_taxonomy` | User lists the horizon scanning taxonomy |
| `user:list_horizon_scans` | User lists horizon scans |
| `user:update_horizon_scan` | User updates horizon scan |
#### Timekeeping
| Audit Log Type | Description |
| - | - |
| `user:create_timekeeping_time_entry` | User creates timekeeping time entry |
| `user:delete_timekeeping_auto_draft_schedule` | User deletes timekeeping auto-draft schedule |
| `user:draft_timekeeping_submission_ledger` | User drafts timekeeping submission ledger |
| `user:fetch_timekeeping_matters` | User fetches timekeeping matters |
| `user:fetch_timekeeping_submission_ledger` | User fetches timekeeping submission ledger |
| `user:fetch_timekeeping_subscriptions` | User fetches timekeeping subscriptions |
| `user:get_timekeeping_auto_draft_schedule` | User fetches timekeeping auto-draft schedule |
| `user:upsert_timekeeping_auto_draft_schedule` | User creates or updates timekeeping auto-draft schedule |
#### Invoice review
| Audit Log Type | Description |
| - | - |
| `user:invoice_review_guideline_source_download` | User downloads invoice review guideline source |
| `user:invoice_review_project_create` | User creates invoice review project |
| `user:invoice_review_project_get` | User fetches invoice review project |
#### Workflows and agents
| Audit Log Type | Description |
| - | - |
| `user:cancel_workflow_step` | User cancels workflow step |
| `user:duplicate_workflow` | User duplicates workflow |
| `user:fetch_recommended_workflows_by_query` | User fetches recommended workflows by query |
| `user:fetch_workflow_access_counts` | User fetches workflow access counts |
| `user:fetch_workflow_draft` | User fetches workflow draft |
| `user:fetch_workflow_event_outputs` | User fetches workflow event outputs |
| `user:get_workflow_run_steps` | User fetches workflow run steps |
| `user:get_workflow_step_output` | User fetches workflow step output |
| `user:list_completed_workflow_runs` | User lists completed workflow runs |
| `user:list_workflow_sharables` | User lists the targets a workflow can be shared with |
| `user:list_workflows` | User lists workflows |
| `user:record_workflow_file_download` | User downloads a file produced by a workflow |
| `user:upload_file` | User uploads a file to a workflow |
#### Workflow builder
| Audit Log Type | Description |
| - | - |
| `user:workflow_builder_bulk_delete_workflows` | User bulk deletes workflows in the workflow builder |
| `user:workflow_builder_bulk_unpublish_workflows` | User bulk unpublishes workflows in the workflow builder |
| `user:workflow_builder_cancel_submitted_workflow_version` | User cancels submitted workflow version in the workflow builder |
| `user:workflow_builder_check_thread_to_workflow_eligibility` | User checks whether an Assistant thread can become a workflow |
| `user:workflow_builder_copy_workflow` | User copies workflow in the workflow builder |
| `user:workflow_builder_create_workflow` | User creates workflow in the workflow builder |
| `user:workflow_builder_create_workflow_from_thread` | User creates workflow from thread in the workflow builder |
| `user:workflow_builder_delete_workflow` | User deletes workflow in the workflow builder |
| `user:workflow_builder_generate_diagram` | User generates diagram in the workflow builder |
| `user:workflow_builder_generate_steps` | User generates steps in the workflow builder |
| `user:workflow_builder_get_assistant_thread` | User fetches Assistant thread in the workflow builder |
| `user:workflow_builder_get_history` | User fetches history in the workflow builder |
| `user:workflow_builder_get_workflow_definition` | User fetches workflow definition in the workflow builder |
| `user:workflow_builder_import_workflow` | User imports workflow in the workflow builder |
| `user:workflow_builder_linked_agent_referenced_child_deleted` | A workflow referenced by a linked agent is deleted in the workflow builder |
| `user:workflow_builder_list_agent_runs` | User lists agent runs in the workflow builder |
| `user:workflow_builder_list_linkable_agents` | User lists linkable agents in the workflow builder |
| `user:workflow_builder_list_workflows` | User lists workflows in the workflow builder |
| `user:workflow_builder_magic_prompt` | User rewrites a workflow step prompt with Harvey in the workflow builder |
| `user:workflow_builder_publish_workflow_version` | User publishes workflow version in the workflow builder |
| `user:workflow_builder_reject_submitted_workflow_version` | User rejects submitted workflow version in the workflow builder |
| `user:workflow_builder_save_version` | User saves a workflow version in the workflow builder |
| `user:workflow_builder_share_external` | User shares a workflow outside the workspace from the workflow builder |
| `user:workflow_builder_submit_for_approval_workflow_version` | User submits a workflow version for approval in the workflow builder |
| `user:workflow_builder_unpublish_workflow` | User unpublishes workflow in the workflow builder |
| `user:workflow_builder_update_workflow_metadata` | User updates workflow metadata in the workflow builder |
| `user:workflow_builder_validate_workflow` | User validates workflow in the workflow builder |
#### Knowledge sources and library
| Audit Log Type | Description |
| - | - |
| `user:create_filter_profile` | User creates filter profile |
| `user:create_library_item` | User creates library item |
| `user:delete_filter_profile` | User deletes filter profile |
| `user:delete_library_item` | User deletes library item |
| `user:export_knowledge_source_documents` | User exports knowledge source documents |
| `user:export_library` | User exports library |
| `user:fetch_knowledge_source_policy` | User fetches knowledge source policy |
| `user:list_knowledge_source_catalog` | User lists the knowledge source catalog |
| `user:list_legal_practice_area_taxonomy` | User lists the legal practice area taxonomy |
| `user:list_library_v2_items` | User lists library items (v2) |
| `user:update_filter_profile` | User updates filter profile |
| `user:update_library_item` | User updates library item |
| `user:update_pinned_practice_areas` | User updates pinned practice areas |
| `user:view_library_item` | User views library item |
#### Structured datasets
| Audit Log Type | Description |
| - | - |
| `user:structured_dataset_create` | User creates structured dataset |
| `user:structured_dataset_finalize` | User finalizes structured dataset |
| `user:structured_dataset_get` | User fetches structured dataset |
| `user:structured_dataset_get_schema` | User fetches a structured dataset schema |
| `user:upload_structured_dataset_files` | User uploads structured dataset files |
#### Command Center and analysis
| Audit Log Type | Description |
| - | - |
| `user:billing_analysis_chat` | User chats with the billing analysis agent |
| `user:billing_analysis_query` | User queries billing analysis |
| `user:billing_analysis_view` | User views billing analysis |
| `user:panel_management_create` | User creates a panel dashboard |
| `user:panel_management_delete` | User deletes a panel dashboard |
| `user:panel_management_delete_source_file` | User deletes a panel dashboard source file |
| `user:panel_management_get` | User fetches a panel dashboard |
| `user:panel_management_pin_chart` | User pins a chart to a panel dashboard |
| `user:panel_management_unpin_chart` | User unpins a chart from a panel dashboard |
| `user:view_command_center` | User views Command Center recommended actions |
#### Tasks
| Audit Log Type | Description |
| - | - |
| `user:add_task_resource_links` | User adds task resource links |
| `user:create_task` | User creates task |
| `user:create_task_phase` | User creates task phase |
| `user:delete_task` | User deletes task |
| `user:delete_task_phase` | User deletes task phase |
| `user:export_tasks` | User exports tasks |
| `user:get_task` | User fetches task |
| `user:get_task_stats` | User fetches task statistics |
| `user:list_task_activity` | User lists task activity |
| `user:list_task_assignable_users` | User lists task assignable users |
| `user:list_task_phases` | User lists task phases |
| `user:list_task_timeline` | User lists the task timeline |
| `user:list_tasks` | User lists tasks |
| `user:preview_task` | User previews task |
| `user:remove_task_resource_links` | User removes task resource links |
| `user:reorder_task_phases` | User reorders task phases |
| `user:update_task` | User updates task |
| `user:update_task_phase` | User updates task phase |
#### Comments
| Audit Log Type | Description |
| - | - |
| `user:create_comment_message` | User creates comment message |
| `user:create_comment_thread` | User creates comment thread |
| `user:delete_comment_message` | User deletes comment message |
| `user:delete_comment_thread` | User deletes comment thread |
| `user:edit_comment_memo_formatting` | User edits comment memo formatting |
| `user:edit_comment_memo_row` | User edits comment memo row |
| `user:edit_comment_message` | User edits comment message |
| `user:list_comment_threads` | User lists comment threads |
| `user:reopen_comment_thread` | User reopens comment thread |
| `user:resolve_comment_thread` | User resolves comment thread |
| `user:rewrite_comment_memo_row` | User rewrites comment memo row |
| `user:update_comment_thread_anchor` | User updates comment thread anchor |
#### Meetings, audio, and transcription
| Audit Log Type | Description |
| - | - |
| `user:audio_stream_authenticate` | User authenticates an audio stream session |
| `user:audio_stream_complete` | User completes an audio stream |
| `user:audio_stream_start` | User starts an audio stream |
| `user:create_meeting` | User creates meeting |
| `user:delete_meeting` | User deletes meeting |
| `user:list_meetings` | User lists meetings |
| `user:mint_transcribe_token` | User mints a transcription service token |
| `user:rename_meeting` | User renames meeting |
| `user:transcribe_audio` | User transcribes audio |
#### Email and mailbox
| Audit Log Type | Description |
| - | - |
| `user:create_email_draft` | User creates email draft |
| `user:create_mailbox_draft_from_notepad` | User creates a mailbox draft from a notepad |
| `user:mailbox_create_draft` | User creates mailbox draft |
| `user:mailbox_create_folder` | User creates mailbox folder |
| `user:mailbox_find_messages` | User searches messages in the connected mailbox |
| `user:mailbox_get_attachments` | User fetches mailbox attachments |
| `user:mailbox_get_messages` | User fetches mailbox messages |
| `user:mailbox_list_folders` | User lists mailbox folders |
| `user:mailbox_move_messages` | User moves mailbox messages |
| `user:mailbox_rename_folder` | User renames mailbox folder |
| `user:mailbox_sensitive_content_skipped` | Mailbox content is skipped because of its sensitivity label |
| `user:receive_ses_inbound_email` | Harvey receives an inbound email through SES |
| `user:register_assistant_thread_email_notifications` | User subscribes to email notifications for an Assistant thread |
| `user:view_email_content` | User views email content |
#### Integrations and DMS
| Audit Log Type | Description |
| - | - |
| `user:connect_integration` | User connects integration |
| `user:create_dms_one_way_sync` | User creates DMS one-way sync |
| `user:create_integrations_dialog_token` | User creates a token for the integrations dialog |
| `user:delete_dms_one_way_sync` | User deletes DMS one-way sync |
| `user:disconnect_integration` | User disconnects integration |
| `user:dms_file_export` | User exports file to DMS |
| `user:dms_file_import` | User imports file from DMS |
| `user:dms_folder_upload` | User uploads folder via DMS |
| `user:exchange_integration_authentication` | User exchanges an integration authentication code for a token |
| `user:fetch_connected_integrations` | User fetches connected integrations |
| `user:fetch_dms_file_metadata` | User fetches DMS file metadata |
| `user:fetch_dms_folder_metadata` | User fetches DMS folder metadata |
| `user:fetch_integration_admin_enablement_urls` | User fetches integration admin enablement URLs |
| `user:fetch_integration_browse_items` | User fetches integration browse items |
| `user:fetch_integration_data_rooms` | User fetches integration data rooms |
| `user:fetch_integration_folder_contents` | User fetches integration folder contents |
| `user:fetch_integration_resource_url` | User fetches integration resource URL |
| `user:fetch_integration_tenants` | User fetches integration tenants |
| `user:fetch_integration_token` | User fetches integration token |
| `user:integrations_handoff` | User hands a task off to an integration |
| `user:integrations_handoff_discovery` | User discovers available integration handoff targets |
| `user:integrations_search` | User searches integrations |
| `user:list_connectors` | User lists connectors |
| `user:set_primary_integration_tenant` | User sets primary integration tenant |
| `user:trigger_dms_one_way_sync` | User triggers DMS one-way sync |
| `user:update_dms_one_way_sync` | User updates DMS one-way sync |
| `user:view_dms_one_way_sync` | User views DMS one-way sync |
#### MCP
| Audit Log Type | Description |
| - | - |
| `user:connect_mcp_server` | User connects MCP server |
| `user:disconnect_mcp_server` | User disconnects MCP server |
| `user:get_mcp_capability_overrides` | User fetches MCP capability overrides |
| `user:list_mcp_servers` | User lists MCP servers |
| `user:mcp_ask_about_vault` | User asks Harvey about a vault project through the MCP server |
| `user:mcp_ask_harvey` | User asks Harvey a question through the MCP server |
| `user:mcp_ask_with_knowledge_source` | User asks Harvey a question scoped to a knowledge source through the MCP server |
| `user:mcp_list_knowledge_sources` | User lists knowledge sources through the MCP server |
| `user:mcp_list_vault_projects` | User lists vault projects through the MCP server |
| `user:mcp_web_request` | User runs a web request through the MCP server |
| `user:update_mcp_capability_overrides` | User updates MCP capability overrides |
#### Sharing, groups, and resource access
| Audit Log Type | Description |
| - | - |
| `user:bulk_patch_resource_access` | User bulk patches resource access |
| `user:clone_resources` | User clones resources |
| `user:create_event_sharing_permissions` | User creates event sharing permissions |
| `user:create_own_copy` | User creates their own copy of a shared resource |
| `user:create_user_group` | User creates user group |
| `user:delete_user_group` | User deletes user group |
| `user:evaluate_dependent_resources` | User evaluates the dependent resources of a share |
| `user:fetch_resource_banner` | User fetches the sharing banner for a resource |
| `user:fetch_sharing_workspace_users` | User fetches sharing workspace users |
| `user:get_group_resources` | User fetches group resources |
| `user:get_shareable_targets` | User fetches shareable targets |
| `user:get_user_group` | User gets user group |
| `user:get_user_group_members` | User gets user group members |
| `user:list_resource_access` | User lists resource access |
| `user:list_user_groups` | User lists user groups |
| `user:notify_share_result` | Share result is reported back from an external destination |
| `user:resource_share_to_user_approval_changed` | Approval status changes on a resource shared with a user |
| `user:revoke_resource_access` | User revokes resource access |
| `user:search_shareable_targets` | User searches shareable targets |
| `user:update_event_sharing_permissions` | User updates event sharing permissions |
| `user:update_resource_matter_link` | User updates the client matter linked to a resource |
| `user:update_user_group` | User updates user group |
| `user:update_user_group_members` | User updates user group members |
| `user:view_share_config` | User views share configuration |
#### Ethical walls
| Audit Log Type | Description |
| - | - |
| `user:create_ethical_wall` | User creates ethical wall |
| `user:ethical_wall_sync_preflight` | User runs an ethical wall sync preflight check |
| `user:get_ethical_wall_members` | User fetches ethical wall members |
| `user:sync_ethical_wall_policy` | User syncs ethical wall policy |
#### Client matters
| Audit Log Type | Description |
| - | - |
| `user:add_client_matters` | User adds client matters |
| `user:delete_client_matters` | User deletes client matters |
| `user:dismiss_client_matter_notice` | User dismisses client matter notice |
| `user:fetch_client_matters` | User fetches client matters |
| `user:fetch_disallowed_client_matters` | User fetches client matters they are not allowed to use |
| `user:update_client_matters` | User updates client matters |
#### User settings and notifications
| Audit Log Type | Description |
| - | - |
| `user:accept_workspace_notice` | User accepts workspace notice |
| `user:add_favorite` | User adds favorite |
| `user:add_user_profile` | User adds user profile |
| `user:complete_campaign` | User completes an in-product campaign |
| `user:create_user_memory` | User creates user memory |
| `user:create_writing_style` | User creates writing style |
| `user:delete_user_memory` | User deletes user memory |
| `user:disable_user_feature` | User disables user feature |
| `user:disable_workspace_feature` | User disables workspace feature |
| `user:dismiss_campaign` | User dismisses an in-product campaign |
| `user:download_writing_style_file` | User downloads writing style file |
| `user:edit_user_profile` | User edits user profile |
| `user:edit_user_settings` | User edits their own settings |
| `user:enable_user_feature` | User enables user feature |
| `user:enable_workspace_feature` | User enables workspace feature |
| `user:fetch_announcement_video` | User fetches announcement video |
| `user:fetch_notification_counts` | User fetches notification counts |
| `user:fetch_notifications` | User fetches notifications |
| `user:fetch_user_memory` | User fetches user memory |
| `user:fetch_workspace_logo` | User fetches workspace logo |
| `user:fetch_workspace_permission_admin_emails` | User fetches the workspace admin emails for a permission |
| `user:get_user_features` | User fetches user features |
| `user:list_workspaces` | User lists workspaces |
| `user:list_writing_styles` | User lists writing styles |
| `user:migrate_campaign_state` | User in-product campaign state is migrated |
| `user:prefetch_user_memory` | User prefetches user memory |
| `user:remove_favorite` | User removes favorite |
| `user:rewrite_user_memory` | User rewrites user memory |
| `user:search_user_memories` | User searches user memories |
| `user:submit_feedback` | User submits feedback |
| `user:subscribe_realtime` | User subscribes to real-time channels |
| `user:update_notification_state` | User updates notification state |
| `user:update_user_feature_config` | User updates user feature configuration |
| `user:update_user_memory` | User updates user memory |
| `user:view_recommended_prompts` | User views recommended prompts |
| `user:workspace_switch` | User switches workspace |
### Microsoft add-ins
Microsoft Word, Outlook, Teams, and Copilot activity is captured as user audit log events. Filter for these events with the `log_type` query parameter, for example `log_type=user:word_add_in_docx_drafting` or `log_type=user:outlook_add_in_ask`.
#### Word add-in
| Audit Log Type | Description |
| - | - |
| `user:playbook_suggest` | User requests Playbook suggestions from the Word add-in |
| `user:word_add_in_apply_edit` | User applies a Word add-in edit |
| `user:word_add_in_apply_suggestions` | User applies Word add-in suggestions |
| `user:word_add_in_ask` | User submits a Word add-in ask request |
| `user:word_add_in_capture_word_snapshot` | User captures a Word document snapshot from the Word add-in |
| `user:word_add_in_create_word_document` | User creates a Word document session |
| `user:word_add_in_detect_language` | User detects document language from the Word add-in |
| `user:word_add_in_dismiss_suggestions` | User dismisses Word add-in suggestions |
| `user:word_add_in_docx_drafting` | User drafts or edits a Word document using the Word add-in agent |
| `user:word_add_in_extract_definitions` | User extracts definitions from the Word add-in |
| `user:word_add_in_format_ooxml` | User formats OOXML from the Word add-in |
| `user:word_add_in_get_contextual_prompts` | User fetches Word add-in contextual prompts |
| `user:word_add_in_get_export_event_summary` | User fetches Word add-in export event summary |
| `user:word_add_in_get_history` | User fetches Word add-in history |
| `user:word_add_in_get_latest_export_event` | User fetches the latest export event for a Word document |
| `user:word_add_in_get_native_workflow_favorites` | User fetches Word add-in native workflow favorites |
| `user:word_add_in_get_recent_agents` | User fetches Word add-in recent agents |
| `user:word_add_in_get_source_event_files` | User fetches Word add-in source event files |
| `user:word_add_in_get_source_projection` | User fetches the source projection for a Word add-in workflow |
| `user:word_add_in_get_word_document` | User fetches a Word document session or snapshot |
| `user:word_add_in_get_word_event_suggestions` | User fetches suggestions for Word events |
| `user:word_add_in_insert` | User inserts generated text from the Word add-in |
| `user:word_add_in_legal_qa_review` | User runs a Legal Q\&A review from the Word add-in |
| `user:word_add_in_list_block_workflows` | User lists block workflows available in the Word add-in |
| `user:word_add_in_metadata_redaction` | User redacts metadata from the Word add-in |
| `user:word_add_in_proofread_document` | User proofreads a document from the Word add-in |
| `user:word_add_in_restore_suggestions` | User restores Word add-in suggestions |
| `user:word_add_in_run_block_workflow` | User runs a block workflow from the Word add-in |
| `user:word_add_in_translation` | User translates content from the Word add-in |
| `user:word_add_in_update_suggestions` | User updates Word add-in suggestions |
| `user:word_contextual_prompts` | User requests contextual prompts from the Word add-in |
| `user:word_fill_template` | User runs Fill Template from the Word add-in |
| `user:word_redact` | User runs Redact or Convert to Template from the Word add-in |
| `user:word_suggest` | User requests Word add-in suggestions |
#### Outlook add-in
| Audit Log Type | Description |
| - | - |
| `user:create_outlook_email` | User creates an Outlook email session |
| `user:get_outlook_email` | User fetches an Outlook email session |
| `user:outlook_add_in_ask` | User submits an initial ask request from the Outlook add-in |
| `user:outlook_add_in_create_reply_draft` | User creates a reply draft from the Outlook add-in |
| `user:outlook_add_in_get_history` | User fetches Outlook add-in history |
| `user:outlook_add_in_get_recent_agents` | User fetches Outlook add-in recent agents |
| `user:outlook_add_in_resolve_native_open` | User opens a Harvey thread natively from the Outlook add-in |
#### Microsoft Teams and Copilot
| Audit Log Type | Description |
| - | - |
| `microsoft:create_query` | User creates a query from the Microsoft Teams bot |
| `microsoft:create_query_custom_engine_copilot` | User creates a query from the Microsoft Copilot custom engine agent |
### Shared Spaces
Shared Spaces and external connection audit logs capture collaboration activity: space membership, resource publishing, and external connection lifecycle. Events are scoped per workspace; each workspace sees audit events for actions its users perform or approve.
#### Space membership and lifecycle
| Audit Log Type | Description |
| - | - |
| `admin:approve_collab_request` | Admin approved a collaboration request (member or resource addition to a space) |
| `admin:approve_space_request` | Admin approved a space request |
| `admin:cancel_collab_request` | Admin cancelled a collaboration request |
| `admin:decline_collab_request` | Admin declined a collaboration request |
| `admin:decline_space_request` | Admin declined a space request |
| `user:get_collab_request` | User retrieved a collaboration request |
| `user:get_shared_space_users` | User fetches the users in a shared space |
| `user:list_collab_request_approvers` | User lists the approvers for a collaboration request |
| `user:list_collab_requests` | User listed collaboration requests |
| `user:list_space_activity_feed` | User views a shared space activity feed |
| `user:preview_collab_request` | User previews a collaboration request |
| `user:spaces_accept_welcome_modal` | User accepts the Shared Spaces welcome modal |
| `user:spaces_add_members_failed` | Adding members to a shared space failed |
| `user:spaces_add_members_to_space` | User requested one or more people to be added to a shared space |
| `user:spaces_create_space` | User created a new shared space |
| `user:spaces_delete_hero_image` | User deletes a shared space hero image |
| `user:spaces_delete_space` | User deleted a shared space |
| `user:spaces_duplicate_space` | User duplicates a shared space |
| `user:spaces_duplicate_space_preview` | User previews duplicating a shared space |
| `user:spaces_get_details_page` | User viewed a specific shared space’s details page |
| `user:spaces_get_home_page` | User viewed the Shared Spaces home page |
| `user:spaces_get_invitable_members` | User fetched invitable members for a space |
| `user:spaces_get_members` | User fetched members of a space |
| `user:spaces_leave_space` | A user left a shared space |
| `user:spaces_member_approval_changed` | A member was approved (or status changed) to be added to a shared space |
| `user:spaces_record_visit` | User visit to a shared space is recorded |
| `user:spaces_remove_member_from_space` | A member was removed from a shared space |
| `user:spaces_status_changed` | Shared space status changed |
| `user:spaces_update_hero_image` | User updates a shared space hero image |
| `user:spaces_update_member_role` | User updates a member’s role in a shared space |
| `user:spaces_update_space` | User updated shared space settings (e.g. name, color) |
#### Resource sharing in spaces
| Audit Log Type | Description |
| - | - |
| `user:generate_space_context` | User generates the context summary for a shared space |
| `user:get_publishable_connections` | User fetches the external connections a resource can be published to |
| `user:get_shared_space_files` | User fetches the files in a shared space |
| `user:get_shared_space_resources` | User fetches the resources in a shared space |
| `user:get_shared_space_threads` | User fetches the Assistant threads in a shared space |
| `user:list_resource_publish_access_rules` | User lists the access rules applied when a resource is published |
| `user:list_space_workspace_access` | User lists the workspaces with access to a space |
| `user:spaces_add_resources_to_space` | User requested to publish resources (e.g. playbooks, vaults) to a shared space |
| `user:spaces_can_publish_to_connection` | User checks whether a resource can be published to an external connection |
| `user:spaces_get_publishable_resources` | User fetched the list of resources that can be published to a space |
| `user:spaces_get_vault_file_counts` | User fetches vault file counts for a shared space |
| `user:spaces_pin_resource` | User pins a resource in a shared space |
| `user:spaces_read_denied_by_ethical_wall` | A read in a shared space is denied by an ethical wall |
| `user:spaces_resource_approval_changed` | Resource(s) were approved and added to a shared space (new access granted) |
| `user:spaces_resource_unshared` | Resource(s) were removed from a shared space |
| `user:spaces_unpin_resource` | User unpins a resource in a shared space |
#### Space templates and configuration
| Audit Log Type | Description |
| - | - |
| `user:apply_space_template` | User applies space template |
| `user:create_space_template` | User creates space template |
| `user:create_workspace_space_custom_field` | User creates workspace space custom field |
| `user:create_workspace_space_stage` | User creates workspace space stage |
| `user:delete_space_template` | User deletes space template |
| `user:delete_workspace_space_custom_field` | User deletes workspace space custom field |
| `user:delete_workspace_space_stage` | User deletes workspace space stage |
| `user:edit_space_template` | User edits space template |
| `user:list_space_templates` | User lists space templates |
| `user:preview_space_template` | User previews space template |
| `user:reorder_workspace_space_custom_fields` | User reorders workspace space custom fields |
| `user:reorder_workspace_space_stages` | User reorders workspace space stages |
| `user:spaces_clear_workspace_client_matter_config` | User clears the workspace client matter configuration for shared spaces |
| `user:spaces_get_workspace_client_matter_config` | User fetches the workspace client matter configuration for shared spaces |
| `user:spaces_get_workspace_settings` | User fetches the workspace Shared Spaces settings |
| `user:spaces_preview_workspace_client_matter_config` | User previews a workspace client matter configuration for shared spaces |
| `user:spaces_set_workspace_client_matter_config` | User sets the workspace client matter configuration for shared spaces |
| `user:spaces_update_workspace_settings` | User updates the workspace Shared Spaces settings |
| `user:update_workspace_space_custom_field` | User updates workspace space custom field |
| `user:update_workspace_space_stage` | User updates workspace space stage |
| `user:view_space_template` | User views space template |
#### External connections
| Audit Log Type | Description |
| - | - |
| `admin:add_users_to_external_connection` | Admin added users to an external connection |
| `admin:approve_external_connection_request` | Admin approved an external connection request |
| `admin:delete_external_connection` | Admin deleted an external connection |
| `admin:reject_external_connection_request` | Admin rejected an external connection request |
| `admin:remove_resource_from_external_connection` | Admin removed a resource from an external connection |
| `admin:remove_user_from_external_connection` | Admin removed a user from an external connection |
| `admin:update_external_connection_invite` | Admin updated an external connection invite |
| `admin:update_user_role_in_external_connection` | Admin updated a user’s role in an external connection |
| `user:get_external_connections` | User fetches external connections |
| `user:get_external_connections_details_page` | User viewed the external connection details page |
#### Spaces administration
| Audit Log Type | Description |
| - | - |
| `admin:get_internal_space_activity` | Admin fetches internal space activity |
| `admin:get_internal_space_details` | Admin fetches internal space details |
| `admin:get_internal_space_members` | Admin fetches internal space members |
| `admin:get_internal_space_resources` | Admin fetches internal space resources |
| `admin:list_internal_spaces` | Admin lists internal spaces |
### System Operations
| Audit Log Type | Description |
| - | - |
| `system:create_client_matters` | System creates client matters |
| `system:create_ethical_wall` | System creates ethical wall |
| `system:create_service_user` | System creates service user |
| `system:deregister_integration_webhook` | System deregisters integration webhook |
| `system:ethical_wall_sync_completed` | System completes an ethical wall sync |
| `system:ethical_wall_sync_wall_update` | System updates an ethical wall during a sync |
| `system:invalidate_integration_credential` | System invalidates integration credential |
| `system:invoice_review_guideline_activate` | System activates an invoice review guideline |
| `system:register_integration_webhook` | System registers integration webhook |
| `system:trigger_dms_one_way_sync` | System triggers DMS one-way sync |
| `system:update_client_matters` | System updates client matters |
### Automations
Automation events record actions a Harvey automation takes on a workspace’s behalf, without a user in the request.
| Audit Log Type | Description |
| - | - |
| `automation:apply_contract_review_routing_decision` | Automation applies contract review routing decision |
| `automation:event_sanitization` | Automation sanitizes a history event |
| `automation:notify_contract_review_requester` | Automation notifies the requester of a contract review |
| `automation:route_contract_review_request_from_email` | Automation routes contract review request from email |
### Retired log types
These types were removed from Harvey and are no longer emitted. They remain documented
because historical logs can still carry them. The `log_type` query parameter rejects them
with a `400`, so filter for them client-side.
| Audit Log Type | Description |
| - | - |
| `admin:create_external_connection_invite` | Admin created an external connection invite |
| `user:add_user_group_members` | User adds user group members |
| `user:get_external_connections_requests_page` | User viewed the external connection requests page |
| `user:remove_user_group_members` | User removes user group members |
***
Need help getting started? Contact your Harvey Customer Success Manager for more information.
# Authentication
Source: https://developers.harvey.ai/guides/authentication
To create and manage API tokens for your organization’s workspace, visit the “API Tokens” section in your workspace settings. If this section isn’t visible to you, or you need more help getting started, contact your Customer Success Manager.
The Harvey API uses bearer token authentication. Include the token in the Authorization header of all API requests.
```bash theme={null}
curl https://api.harvey.ai/v2/endpoint \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json"
```
# Security
Your bearer tokens grant access to sensitive data and privileged operations, so they must be kept secure. Never share tokens in public repositories, client-side code, or unsecured channels. If you need to contact Harvey support, make sure to redact your token from any example requests or screenshots.
To help you further control what can be done with your bearer tokens, each token also has a manageable permissions list which can be used to restrict what API endpoints can be used with the token. Consult the API Tokens setting page to learn more.
# HTTPS
All API requests must use HTTPS. Requests sent over HTTP or without authentication will be rejected.
> [!NOTE]
>
> If your organization is using Harvey’s EU-hosted deployment, update the request URL to point to the EU API endpoint: **[https://eu.api.harvey.ai](https://eu.api.harvey.ai)**
```bash theme={null}
curl https://eu.api.harvey.ai/v2/endpoint \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json"
```
# Client Matters
Source: https://developers.harvey.ai/guides/client_matters
Create clients and matters, update their details, and manage billing attribution
Use the Client Matters API to sync your firm's client and matter identifiers with Harvey. Create clients first, then create, update, or delete their matters. To delete a client, delete its matters first. Use the v1 endpoint to list matters.
| Action | Endpoint |
| - | - |
| Create or update clients | `POST /api/v2/clients` |
| Create or update matters | `POST /api/v2/matters` |
| Delete matters | `DELETE /api/v2/matters` |
| Delete clients | `DELETE /api/v2/clients` |
| List matters, including deleted matters | `GET /api/v1/client_matters` |
> [!NOTE]
>
> These endpoints share a rate limit that defaults to **150 requests per minute per workspace**. Each v2 request accepts **1 to 10,000 rows**. Always check the `errors` array in the v2 response, even when the request returns HTTP 200.
## Before you start
Use an [API bearer token](/api-reference/authentication) with **Client matters admin** (`write:client_matters`) to create, update, or delete records. To list matters, either this permission or **Access client matters** (`read:client_matters`) is sufficient.
**If your workspace has matters previously created using full names, you must explicitly set the workspace delimiter before using the v2 APIs.** Set it to the separator used in those names. For an existing name such as `10022421-M001`, set the delimiter to `-` and send `client_id: "10022421"` and `matter_id: "M001"`.
Harvey joins `client_id`, the workspace delimiter, and `matter_id` to form a full matter name. The examples below use `.`: client `10022421` and matter `M001` form `10022421.M001`. The v1 list API returns this full name as `name`, and the v1 delete API accepts it.
The optional `client_name` and `matter_name` fields are display labels, such as `Acme Corp` and `Acme Acquisition`.
## Create or update a client
```bash theme={null}
curl -X POST https://api.harvey.ai/api/v2/clients \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"clients": [
{"client_id": "10022421", "client_name": "Acme Corp"}
]
}'
```
A new client appears in `created`:
```json theme={null}
{
"created": [{"client_id": "10022421", "client_name": "Acme Corp"}],
"updated": [],
"errors": []
}
```
To update a client, send its `client_id` again with the fields you want to change. The response includes the client in `updated`, even if the values are unchanged. If the client was deleted, the request restores it. Restoring a client does not restore its deleted matters; restore those through `POST /api/v2/matters`.
## Create or update a matter
Create or restore the client before sending its matters. This endpoint does not create missing clients.
```bash theme={null}
curl -X POST https://api.harvey.ai/api/v2/matters \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"matters": [
{
"client_id": "10022421",
"matter_id": "M001",
"matter_name": "Acme Acquisition",
"description": "Acquisition due diligence",
"notice": "Confirm the engagement before selecting this matter."
}
]
}'
```
```json theme={null}
{
"created": [
{
"client_id": "10022421",
"matter_id": "M001",
"client_name": "Acme Corp",
"matter_name": "Acme Acquisition",
"description": "Acquisition due diligence",
"allowed": true,
"notice": "Confirm the engagement before selecting this matter.",
"harvey_id": "018d856f-0664-772c-9ed9-b2316fd881d3"
}
],
"updated": [],
"errors": []
}
```
To update a matter, send the same `client_id` and `matter_id` with the fields you want to change. Harvey first looks for that pair of identifiers. If it finds no match, it checks for a matter with the same full name, such as `10022421.M001`. This lets the request update a matter created through v1. The matched matter appears in `updated` and keeps its `harvey_id`. If it was deleted, the request restores it.
`harvey_id` is the matter's ID in Harvey.
## Update or clear fields
| Field | Omitted from an update | `null` or blank text | Limit |
| - | - | - | - |
| `client_name` | Keep the client label | Clear the label | 256 characters |
| `matter_name` | Keep the matter label | Clear the label | 256 characters |
| `description` | Keep the description | Clear the description | 200 characters |
| `notice` | Keep the selection notice | Clear the notice | 2,000 characters |
For a new record, these fields default to `null` when omitted.
`client_id` must contain 1 to 128 characters, and `matter_id` must not be empty. The full matter name (`client_id` + delimiter + `matter_id`, such as `10022421.M001`) must contain at most 128 characters and match the format configured for the workspace, if any.
For example, this request clears the notice and keeps the matter's other fields:
```json theme={null}
{
"matters": [{"client_id": "10022421", "matter_id": "M001", "notice": null}]
}
```
`allowed` follows separate rules:
* Omit it to preserve an existing value. New matters default to `true`.
* Sending it requires `use:disallowed_client_matters`, even when setting it to `true`. Without that permission, the whole request returns HTTP 403.
* Use a JSON boolean (`true` or `false`), not a string. With the required permission, `null` returns HTTP 400 with `invalid_request`.
## Handle batch results and errors
Each HTTP 200 response from `POST /api/v2/clients` or `POST /api/v2/matters` has three arrays: `created`, `updated`, and `errors`. An error in one row does not block valid rows in the same request. For example, a batch can update one matter while rejecting another whose client does not exist:
```json theme={null}
{
"created": [],
"updated": [
{
"client_id": "10022421",
"matter_id": "M001",
"client_name": "Acme Corp",
"matter_name": "Acme Acquisition",
"description": "Acquisition due diligence",
"allowed": true,
"notice": null,
"harvey_id": "018d856f-0664-772c-9ed9-b2316fd881d3"
}
],
"errors": [
{
"client_id": "UNKNOWN",
"matter_id": "M002",
"error": "client_not_found",
"detail": "No client with this identifier exists in the workspace"
}
]
}
```
Use `error` codes to handle failures in your integration. The `detail` field explains the error in plain language. Correct failed rows before retrying them.
| Row error | What to check |
| - | - |
| `invalid_client_id`, `invalid_matter_id` | IDs must not be blank; client IDs must contain at most 128 characters. |
| `duplicate_client_id`, `duplicate_pair` | A later row repeats a client ID or client and matter pair. Harvey ignores leading and trailing whitespace when comparing identifiers. Submit each client ID or pair once per batch. |
| `client_not_found` | Create or restore the parent client first. |
| `invalid_client_name`, `invalid_matter_name`, `description_too_long`, `notice_too_long` | Shorten the affected text. |
| `name_too_long`, `name_failed_workspace_regex` | Check the full matter name (`client_id` + delimiter + `matter_id`). |
| `name_collision`, `identity_conflict` | Different identifier pairs produce the same full matter name, or conflict with an existing record. Check the identifiers and delimiter. |
Errors that affect the whole request use these HTTP status codes:
| HTTP status | Meaning |
| - | - |
| 400 | `invalid_request` for an empty batch, missing field, or wrong type; `too_many_items` for more than 10,000 rows; `delimiter_required` when a matter request needs an explicit workspace delimiter. |
| 401 | Missing, invalid, or expired API token, or missing `write:client_matters` permission. |
| 403 | Sending `allowed` without `use:disallowed_client_matters` permission. |
| 429 | Shared client matter rate limit exceeded. |
| 500 | Internal server error. |
`POST /api/v2/matters` uses the delimiter from the API token's active workspace. If it is unset or empty, the endpoint uses `.` unless the workspace requires an explicit delimiter. When an explicit delimiter is required but missing, the endpoint returns HTTP 400:
```json theme={null}
{
"error": "delimiter_required",
"detail": "Set a client matter delimiter for this workspace before upserting matters"
}
```
Harvey does not create or update any matters in this batch. Set the workspace delimiter and retry. `POST /api/v2/clients` does not return this error.
## Delete matters
Send the same `client_id` and `matter_id` pairs that you use with `POST /api/v2/matters`. Do not send the full matter name, the matter label, or `harvey_id`.
```bash theme={null}
curl -X DELETE https://api.harvey.ai/api/v2/matters \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"matters": [
{"client_id": "10022421", "matter_id": "M001"},
{"client_id": "10022421", "matter_id": "M002"}
]
}'
```
Each pair appears once in the response, in `deleted`, `already_absent`, or `errors`. In this example, the request deletes `M001`, and `M002` does not exist:
```json theme={null}
{
"deleted": [{"client_id": "10022421", "matter_id": "M001"}],
"already_absent": [{"client_id": "10022421", "matter_id": "M002"}],
"errors": []
}
```
* `deleted`: the request deleted the matter.
* `already_absent`: no matter matches the pair, or the matter was already deleted. This is a successful result, so you can safely repeat a request. A pair whose client does not exist also appears here.
* `errors`: the request did not delete the matter. An error in one pair does not block the other pairs in the request.
`deleted` and `already_absent` return the identifiers without leading and trailing whitespace. Each entry in `errors` echoes the values you sent.
Harvey first looks for the pair of identifiers. If it finds no match, it checks for a matter with the same full name, such as `10022421.M001`. This lets the request delete a matter created through v1. The endpoint uses the delimiter from the API token's active workspace, or `.` if the delimiter is unset or blank. It never returns `delimiter_required`, and the workspace's name format does not apply to deletes.
| Row error | What to check |
| - | - |
| `invalid_client_id`, `invalid_matter_id` | IDs must not be blank. |
| `duplicate_pair` | A later pair repeats an earlier client and matter pair. Harvey ignores leading and trailing whitespace when comparing identifiers. It processes the first pair and rejects the repeats. Submit each pair once per batch. |
| `identity_conflict` | The stored matter does not uniquely match this pair. For example, the matter with the matching full name has a different client or matter identifier. Check the identifiers and delimiter. |
| `name_collision` | Different pairs in the batch resolve to the same matter by full name. For example, with the `.` delimiter, client `A.B` with matter `C` and client `A` with matter `B.C` both produce `A.B.C`. |
| `blocked_by_ethical_wall` | The matter is externally linked, such as a matter synced from a DMS or an ethical-wall provider, and the workspace enforces ethical walls. Harvey does not delete these matters through the API. |
A request with more than 10,000 pairs returns HTTP 400 with `too_many_items`. An empty batch, a missing field, a wrong type, or an unknown field returns HTTP 400 with `invalid_request`. In both cases, Harvey deletes no matters.
Deleting a matter prevents users from selecting it. It does not remove past queries or their links to the matter. Harvey keeps the parent client and the matter's ethical-wall configuration. A later request to `POST /api/v2/matters` with the same pair restores the matter. To delete the client after its matters, see [Delete clients](#delete-clients).
## Delete clients
Delete a client's matters with `DELETE /api/v2/matters` before you delete the client. This endpoint does not delete or change matters. A client that still has a matter fails with `client_has_matters`.
Send the `client_id` values that you use with `POST /api/v2/clients`. Do not send the client label (`client_name`) or the Harvey client UUID.
```bash theme={null}
curl -X DELETE https://api.harvey.ai/api/v2/clients \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client_ids": ["10022421", "10022422"]
}'
```
Each identifier appears once in the response, in `deleted`, `already_absent`, or `errors`. In this example, the request deletes `10022421`, and `10022422` does not exist:
```json theme={null}
{
"deleted": [{"client_id": "10022421"}],
"already_absent": [{"client_id": "10022422"}],
"errors": []
}
```
* `deleted`: the request deleted the client.
* `already_absent`: no client matches the identifier, or the client was already deleted. This is a successful result, so you can safely repeat a request.
* `errors`: the request did not delete the client. An error for one identifier does not block the other identifiers in the request.
Within each array, results keep the order of the request. `deleted` and `already_absent` return the identifiers without leading and trailing whitespace. Each entry in `errors` echoes the value you sent.
| Row error | What to check |
| - | - |
| `invalid_client_id` | The ID must not be blank. |
| `duplicate_client_id` | A later identifier repeats an earlier client ID. Harvey ignores leading and trailing whitespace when comparing identifiers. It processes the first identifier and rejects the repeats. Submit each client ID once per batch. |
| `client_has_matters` | The client has at least one matter that is not deleted. This includes matters with `allowed` set to `false`. Delete those matters with `DELETE /api/v2/matters`, then retry. A matter that fails with `blocked_by_ethical_wall` stays, so its client also stays. |
For example, this response deletes one client and rejects a client that still has a matter:
```json theme={null}
{
"deleted": [{"client_id": "10022421"}],
"already_absent": [],
"errors": [
{
"client_id": "10022422",
"error": "client_has_matters",
"detail": "Delete the client’s active matters before deleting the client"
}
]
}
```
A request with more than 10,000 client IDs returns HTTP 400 with `too_many_items`. An empty list, a missing field, a wrong type, or an unknown field returns HTTP 400 with `invalid_request`. In both cases, Harvey deletes no clients.
A later request to `POST /api/v2/clients` with the same `client_id` restores the client. Restoring a client does not restore its deleted matters. Restore those through `POST /api/v2/matters`.
## List matters
`GET /api/v1/client_matters` is the only endpoint that lists matters. The list includes deleted matters and usage statistics:
```bash theme={null}
curl https://api.harvey.ai/api/v1/client_matters \
-H "Authorization: Bearer YOUR_API_KEY"
```
The response contains a `client_matters` array. Each row uses these identifiers:
| Field | Meaning |
| - | - |
| `id` | The Harvey matter UUID, returned by v2 as `harvey_id`. |
| `matter_number` | Your firm's matter identifier. May be `null` for legacy matters. |
| `client_id` | The Harvey client UUID. May be `null` for legacy matters. |
The v2 endpoints expect your firm's client identifier in `client_id`. Do not pass the Harvey client UUID returned by this list endpoint.
## Migrate from v1 writes
`POST /api/v1/client_matters` is deprecated. To migrate to v2:
1. Explicitly set the workspace delimiter to match your existing full matter names. For example, for `cm_name: "10022421-M001"`, configure `-` and use `client_id: "10022421"` with `matter_id: "M001"`. Joining these identifiers with the delimiter must reproduce the existing name so Harvey can match the matter.
2. Create or update each client with `POST /api/v2/clients`.
3. Create or update its matters with `POST /api/v2/matters`. Map `cm_desc` to `description`. If you send `cm_allowed`, map it to the JSON boolean `allowed` and ensure the token has `use:disallowed_client_matters` permission.
4. Handle `created`, `updated`, and `errors` instead of v1's `success_count` and `failed`.
`DELETE /api/v1/client_matters` still deletes matters by full name. To delete by identifiers, send `client_id` and `matter_id` pairs to `DELETE /api/v2/matters`. Handle `deleted`, `already_absent`, and `errors` instead of `success_count` and `failed`. To delete clients, send their `client_id` values to `DELETE /api/v2/clients` after you delete their matters.
`client_name` and `matter_name` are optional labels; they do not replace the identifiers. `notice` is available through the v2 matter endpoint. Continue using `GET /api/v1/client_matters` to list matters.
# Harvey MCP
Source: https://developers.harvey.ai/guides/harvey_mcp
connect AI assistants to Harvey's legal AI capabilities through MCP.
The Harvey MCP Server gives AI assistants secure access to Harvey's legal AI capabilities through the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction), an open standard for connecting AI tools to external data and services.
## What is the Harvey MCP Server?
The Harvey MCP Server exposes some of Harvey's core features — legal Q\&A, Vault document analysis, and research knowledge sources as MCP tools. It is designed to work with MCP-compatible clients such as Claude, Google Gemini, and Microsoft 365 Copilot.
### What can you do with the Harvey MCP Server?
* **Ask general legal questions** — Get answers from Harvey's broad legal knowledge without referencing specific documents.
* **Analyze Vault documents** — Ask questions about documents in your Vault projects with source citations.
* **Discover resources** — List your Vault projects and available knowledge sources to find the right context for your questions.
* **Research with knowledge sources** — Query specialized legal research databases like UK tax law.
Harvey's MCP integration allows you to connect Harvey to third-party AI assistants like Claude, Google Gemini, and Microsoft 365 Copilot. Any data sent to or processed by those third-party services is subject to your agreements with those providers. Harvey is not responsible for how third-party services handle data once it leaves Harvey's systems.
***
## Setup guides
### Prerequisites
* A Harvey account
* An MCP-compatible AI assistant. Harvey MCP works with Anthropic's Claude, Google Gemini, and Microsoft 365 Copilot.
* Your client must support remote MCP servers over Streamable HTTP transport with OAuth authentication.
### Claude Web
1. Open and sign in to [Claude](https://claude.ai).
2. Go to **Settings**.
3. Go to **Connectors**, search for **Harvey**.
4. Connect, authenticate, and make sure the Harvey connector is toggled on when chatting.
### Claude Desktop
1. Open Claude Desktop and sign in.
2. Go to **Settings**.
3. Go to **Connectors**, search for **Harvey**.
4. Connect and authenticate with your Harvey account.
5. Once connected, Harvey tools will appear in your conversations.
### Google Gemini
1. As an admin, open the **Gemini Enterprise** page in the Google Cloud console.
2. Go to **Agents** > **Add agents**, then choose **Agents via Marketplace**.
3. Find **Harvey** in the Google Cloud Marketplace and add it to your Gemini Enterprise app.
4. In the Gemini Enterprise web app, open Harvey from the agent gallery and authenticate with your Harvey account via OAuth when prompted.
### Microsoft 365 Copilot
1. As an admin, open the **Microsoft 365 admin center** and goes to **Copilot** > **Connectors**.
2. On the **Your connections** tab, find the **Harvey** partner connector and approve and enable it for your organization.
3. In Microsoft 365 Copilot, the Harvey connector becomes available. On first use, authenticate with your Harvey account via OAuth.
4. Once connected, Harvey tools appear in your Copilot conversations.
***
## Available tools
| Tool | Description | Example prompts |
| - | - | - |
| `ask_harvey` | Ask a general legal question using Harvey's broad legal knowledge | "What are the elements of a breach of contract claim?" |
| `ask_with_knowledge_source` | Ask a question using a specific research knowledge source | "What is the HMRC guidance on capital gains for non-residents?" |
| `list_knowledge_sources` | List all available research knowledge sources | "What research databases can I search?" |
| `list_vault_projects` | List all Vault projects accessible to the authenticated user | "What Vault projects do I have access to?" |
| `ask_about_vault` | Ask a question about documents in a specific Vault project | "Summarize the indemnification clauses in this project" |
## Troubleshooting
> [accordion] Hosted MCP server is not enabled for this user
>
> Check with your Harvey admin or representative to ensure you're enrolled in this feature.
> [accordion] You do not have permission to use this tool
>
> Your Harvey account lacks the required permission for the specific tool you're trying to use. For example, `ask_about_vault` requires the `VAULT` permission. Contact your Harvey workspace administrator to check your permissions.
> [accordion] Invalid vault\_project\_id format
>
> The `vault_project_id` parameter must be a valid UUID. Use `list_vault_projects` first to get valid project IDs.
> [accordion] Unknown knowledge source type
>
> The `knowledge_source_type` value doesn't match any available knowledge source. Use `list_knowledge_sources` to see valid types for your account.
> [accordion] Authentication fails or token is rejected
>
> * Verify your Harvey account is active and you have access to the MCP feature.
> * Try re-authenticating by removing and re-adding the MCP server in your client.
> [accordion] Tools not appearing in my MCP client
>
> * Check that your MCP client supports Streamable HTTP transport (not just SSE or stdio).
> * Re-authenticate if the connection was previously established.
***
## FAQ
> [accordion] Can multiple users connect to the same MCP server?
>
> Yes. Each user authenticates individually through the browser OAuth flow. The server resolves each request to the authenticated user and enforces their specific permissions and feature gates.
> [accordion] What data does the MCP server have access to?
>
> The MCP server can only access data that the authenticated user has permission to view in Harvey. Vault project queries are scoped to projects the user can access, and knowledge source queries are limited to sources enabled for the user's account.
> [accordion] Does this support conversation history?
>
> Each tool call is stateless — the server does not maintain conversation history between requests. To build multi-turn workflows, your MCP client should manage context across tool calls.
# Intake
Source: https://developers.harvey.ai/guides/intake
Submit legal requests into Harvey from your own systems and track them
Harvey's Intake APIs let your systems raise legal requests in Harvey and follow them to completion, routed exactly as requests raised in the product are. Submit a request with the documents it concerns, store the id you get back, then read the request for its status, assignee, and attachments.
> [!NOTE]
>
> Rate limits are applied per workspace, per minute: **30** for submitting a request, **60** for reading one, **30** for updating one, **30** for listing them, and **60** for listing a request's comments.
```bash theme={null}
POST /api/v1/intake/requests
GET /api/v1/intake/requests
GET /api/v1/intake/requests/{request_id}
PATCH /api/v1/intake/requests/{request_id}
```
## Overview
A request is submitted once and worked asynchronously inside Harvey by a reviewer or by Harvey's routing agent. Submitting returns immediately with a `request_id`; everything after that is read through the request.
### Key Capabilities
* **Raise Requests From Your Own Systems**: Push work into Harvey from a ticketing system, intranet form, or service desk, with the documents it concerns attached
* **Safe to Retry**: Every submission is keyed on an idempotency key of your choosing, so a retried call never raises the same request twice
* **Track to Completion**: Read status, assignee, due date, and attachments as they change in Harvey
### Before You Start
The Intake API must be enabled for your workspace. Until it is, every endpoint returns `404` rather than an authorization error. Contact your Account Manager or reach out to us at [support@harvey.ai](mailto:support@harvey.ai) to request it.
Your token needs the `Intake API` permission and one of `Intake requests`, `Intake access`, or `Intake admin`, set in the API Tokens section of your workspace settings. Updating a request needs `Intake access` or `Intake admin`.
Intake must also be configured for your workspace, with somewhere for incoming requests to land. A workspace with the API enabled but no Intake configuration returns `404` on submission, with the message `Intake is not configured for this workspace.`
API tokens act as your workspace's service user rather than as the person who created the token, so reads return the requests that service user may see — judged exactly as the Intake product judges them.
### The Request Cycle
Submit the request, store its `request_id`, then read it when you need its progress:
```bash theme={null}
curl -X POST "https://api.harvey.ai/api/v1/intake/requests" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-F "idempotency_key=ticket-48213" \
-F "title=Review the Northwind master services agreement" \
-F "description=Counterparty sent back redlines on termination and liability." \
-F "files=@northwind-msa.pdf"
```
```json theme={null}
{
"request_id": "6b5d8f02-4c1a-4f8e-9a77-2d0c3e5b1a94",
"status": "TODO",
"harvey_url": "https://app.harvey.ai/intake/requests/6b5d8f02-4c1a-4f8e-9a77-2d0c3e5b1a94"
}
```
```bash theme={null}
curl "https://api.harvey.ai/api/v1/intake/requests/6b5d8f02-4c1a-4f8e-9a77-2d0c3e5b1a94" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"
```
Store the `request_id` it returns — it is the only handle you get on the request, and how you read it back.
## Use Cases
### Use Case 1: Raise Requests From a Ticketing System
**Challenge**: Legal work arrives as tickets, emails, and intranet form submissions, and someone has to retype each one into Harvey before it can be worked.
**Solution**: Submit the request from the system that received it, carrying your own ticket reference as the idempotency key.
```bash theme={null}
POST /api/v1/intake/requests
```
Send up to 50 files, and up to 100 MB per file for most types. If any file's type or size is not accepted, the entire request is refused and nothing is created, so a request never silently loses a document.
### Use Case 2: Retry Without Duplicating Work
**Challenge**: A network timeout leaves your integration unsure whether Harvey took the request, and retrying risks two identical requests landing in the queue.
**Solution**: Pass a stable `idempotency_key` — your own ticket id works well. The first call returns `201`; a retry carrying the same key returns `200` and names the original request without creating a second one.
Both responses have the same body, so your integration can treat them identically. If an earlier submission under that key is in a state Harvey cannot return, the call returns `409`; retrying the same key will not resolve it, so submit under a new key.
### Use Case 3: Report Progress Back to Your Own System
**Challenge**: Requesters work in the ticketing system, not in Harvey, and keep asking where their request stands.
**Solution**: Read the request and mirror what it reports — `status`, `assignee`, `due_at`, and `completed_at` — onto the ticket.
```json theme={null}
{
"request_id": "6b5d8f02-4c1a-4f8e-9a77-2d0c3e5b1a94",
"status": "IN_PROGRESS",
"title": "Review the Northwind master services agreement",
"due_at": "2026-10-16",
"completed_at": null,
"assignee": { "type": "USER", "name": "Dana Whitfield" },
"attachments": [
{ "file_id": "66fead63-460e-4426-a179-39c70b224a99", "name": "northwind-msa.pdf" }
]
}
```
`assignee.type` is `AGENT` while Harvey's routing agent holds the request and `USER` once a person does. To hand the request to someone instead, link them to `harvey_url`.
This endpoint reads any request your token's user can see, whatever submitted it — requests raised in Harvey directly or arriving by email, not only those this API created.
### Use Case 4: Keep Harvey in Step With the Ticket
**Challenge**: A requester moves the deadline in the ticketing system, and the request in Harvey falls out of date.
**Solution**: Send only the fields that changed. Fields you leave out stay as they were, and sending `null` removes a due date. The title and description of a submitted request cannot be changed, so sending either returns `422` with the `read_only` code.
```bash theme={null}
curl -X PATCH "https://api.harvey.ai/api/v1/intake/requests/6b5d8f02-4c1a-4f8e-9a77-2d0c3e5b1a94" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{"due_at": "2027-01-01"}'
```
The response is the updated request, in the same shape a read returns. The token needs `Intake access` or `Intake admin`, or it gets `401`. A request its service user cannot edit returns `404`.
### Use Case 5: Sync Open Requests in Bulk
**Challenge**: Reading requests one id at a time misses requests raised in Harvey directly, and spends the read budget.
**Solution**: List the requests your token's user can see, newest first, filtered by status or creation time.
```bash theme={null}
curl "https://api.harvey.ai/api/v1/intake/requests?status=TODO&status=IN_PROGRESS&limit=100" \
-H "Authorization: Bearer YOUR_TOKEN_HERE"
```
Each request has the same shape a read returns. While `pagination.has_more` is true, send `pagination.next_cursor` back as `cursor` with the same filters.
## Best Practices
### Poll on Terminal Status
Read `status` and stop when it is `DONE` or `CANCELLED`. Do not treat a `200` as meaning the request has finished — an open request returns `200` as well.
A `429` carries a `Retry-After` header giving the seconds to wait. Honor it rather than retrying immediately.
### Switch on Validation Codes
A submission rejected on its fields returns `422` with a `details` array naming every field at fault. Switch on `details[].code` rather than matching `message` text, which is localized and may change.
### Write Self-Contained Requests
* **Avoid**: "See attached"
* **Use**: "Review the attached MSA against our standard positions. Flag any deviation on termination, liability, or indemnity that needs partner sign-off."
Titles can be up to 255 characters and descriptions up to 10,000. Neither can be changed once the request is submitted.
## Error Handling
The Intake APIs use standard HTTP status codes. A request your workspace cannot reach returns `404` rather than `403` — one `404` covers a request that does not exist, one belonging to another workspace, one you lack access to, and a workspace without the Intake API enabled.
A token that lacks the Intake permission returns `401`, not `403`. The `403` is narrower: Intake accepted the call but refused the request while routing it, because your token's service user is not a member of your workspace's Intake space.
| Status Code | Description | Example Error Message |
| - | - | - |
| 200 | Success – Request read, listed, or updated, or submission replayed | N/A |
| 201 | Created – Request submitted | N/A |
| 400 | Bad Request – A document was rejected, too many files, an update body is not JSON, or a list cursor is invalid | `{ "error": "Upload failed. File northwind-msa.pdf exceeds maximum size of 100MB." }` |
| 401 | Unauthorized – Invalid token, or one lacking the Intake permission | `{ "error": "User does not have permission to create Intake requests" }` |
| 403 | Forbidden – Intake refused the request while routing it | `{ "error": "User does not have permission to create Intake requests" }` |
| 404 | Not Found – Request not reachable, or Intake not configured | `{ "error": "Request not found." }` |
| 409 | Conflict – An earlier submission under this key cannot be returned | `{ "error": "The original request is no longer available." }` |
| 422 | Unprocessable Content – A field is missing, empty, too long, or not accepted | `{ "error": "Invalid request", "details": [ ... ] }` |
| 429 | Too Many Requests – Rate limit exceeded | `{ "error": "Too many requests. Retry after 30 seconds." }` |
| 500 | Internal Server Error | N/A |
Submissions rejected on their form fields return one of these codes per field in `details`:
| Code | Cause |
| - | - |
| `missing` | A required field — `idempotency_key` or `title` — was not sent |
| `string_too_short` | `idempotency_key` or `title` was sent empty |
| `string_too_long` | `title` is over 255 characters, or `description` over 10,000 |
| `value_error` | `idempotency_key` was whitespace only |
***
Need help getting started? Contact your Harvey Customer Success Manager for more information.
# Introduction
Source: https://developers.harvey.ai/guides/introduction
Welcome to the Harvey API Guide.
This guide provides everything you need to start integrating with Harvey. It is designed to support secure, scalable automation across your workflows and systems.
Harvey APIs enable organizations to integrate proprietary data, streamline workflows, and enhance operational efficiency. Key benefits include:
* **Harness Your Organization’s Expertise**: Integrate your proprietary knowledge into Harvey for more precise and tailored AI-driven outputs.
* **Boost Lawyer Productivity**: Embed Harvey's AI directly into your internal applications, eliminating the need for manual tasks.
* **Effortless API Adoption**: Designed for developers, Harvey's APIs integrate seamlessly into existing platforms, reducing implementation time and engineering overhead.
* **Future-Proof Your Tech Stack**: Leverage continuously improving AI models via API, ensuring your firm stays ahead without disruptive platform changes.
Please see your Order Form or email [support@harvey.ai](mailto:support@harvey.ai) for details on which feature(s) your organization has permission to use.
# Review Tables
Source: https://developers.harvey.ai/guides/review_tables
Read results from and add rows to Vault review tables
Harvey's Review Table APIs let your systems programmatically read a review table's structure and results, and add new documents as rows without rebuilding the table in the UI. Review tables are built on top of Vault, so the documents a table reviews are uploaded and managed through the [Vault APIs](/guides/vault) first.
> [!NOTE]
>
> The current API request rate limits for Review Table API endpoints are **10 requests per minute**.
```bash theme={null}
GET /api/v1/vault/review_table/{review_table_id}
GET /api/v1/vault/get_row/{review_table_id}/{file_id}
POST /api/v1/vault/add_row/{review_table_id}
```
## Overview
A review table extracts structured answers from the documents in a Vault project — one row per document (or file group), one column per question. Use these APIs to:
* **Export Results**: Read a table's title, file list, and per-row cells, including Harvey's answers, reasoning, citations, and verification status
* **Extend a Table**: Add new documents as rows — individually or grouped — and have Harvey review them against the table's existing columns
## Use Cases
### Use Case 1: Fetch Review Table Data
**Challenge**: After a review table has been run in Vault, teams need to programmatically access the table's structure and results — for example, to export answers, check verification status, or build downstream workflows.
**Solution**: Use `review_table_ids` from Get Project Metadata to discover available review tables, then retrieve each table's metadata (title, file list) and drill into individual row results.
**Step 1** — Get the project's review table IDs from the metadata endpoint:
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/vault/get_metadata/{project_id}" \
-H "Authorization: Bearer YOUR_API_KEY"
```
The response includes a `review_table_ids` array (e.g., `[2365724, 2365725]`). An empty array means the project has no review tables.
**Step 2** — Fetch a review table's metadata by ID to get its title and file list:
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/vault/review_table/{review_table_id}" \
-H "Authorization: Bearer YOUR_API_KEY"
```
The response contains the table's `title`, `created_at` timestamp, and `file_ids` — one ID per document row in the table.
**Step 3** — Retrieve a specific row using the `review_table_id` and a `file_id` from the previous step:
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/vault/get_row/{review_table_id}/{file_id}" \
-H "Authorization: Bearer YOUR_API_KEY"
```
Each row contains an array of `cells` with the column name, Harvey's short answer (`summary`), the full reasoning behind it (`additional_context`), supporting `citations`, and verification/flag status. Files reviewed together as a file group share a single row: requesting any file in the group returns that shared row, with `file_id` echoing the file you asked for. Within each field, a user-edited value takes precedence over the AI-generated value. Inline citation markers in `summary` and `additional_context` use `[N]` bracket notation, where `N` is the 1-based index into the cell's `citations` array.
### Use Case 2: Add New Rows to an Existing Review Table
**Challenge**: Review tables are often long-lived — new documents arrive after the table was first run, and teams want them reviewed against the same columns without rebuilding the table in the UI. Sometimes a single row needs to cover several related documents, such as a master agreement and its amendments.
**Solution**: Use the add row endpoint to add files from the review table's Vault project as new rows. Harvey schedules a review run that populates each new row's cells for every existing visible column.
**Step 1** — Upload the files to the review table's Vault project (or pick existing files) and wait until each `processing_status` reaches `ready_to_query`:
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/vault/get_files?ids={file_id}" \
-H "Authorization: Bearer YOUR_API_KEY"
```
**Step 2** — Add the files to the review table. Pass a single ID in `file_ids` to add one file as its own row:
```bash theme={null}
curl -X POST "https://api.harvey.ai/api/v1/vault/add_row/{review_table_id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_ids": ["0199c5c1-50d9-7d60-93aa-cd65c3b7d5a9"]}'
```
The response confirms the run was scheduled. `review_file_group_id` is `null` because a single file becomes its own row:
```json theme={null}
{
"response": {
"event_id": 2365724,
"file_ids": ["0199c5c1-50d9-7d60-93aa-cd65c3b7d5a9"],
"review_event_run_id": "019f8d8f-fc20-79e0-8b78-980b747c5ef3",
"review_file_group_id": null,
"status": "scheduled"
}
}
```
**Step 3** — The run is asynchronous. Poll the row endpoint until its cells are populated:
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/vault/get_row/{review_table_id}/{file_id}" \
-H "Authorization: Bearer YOUR_API_KEY"
```
#### Reviewing several files together as one row
Pass two or more IDs in `file_ids` to create a **file group** — the files are reviewed together and occupy a single row in the table, so each cell answers across the whole set of documents. Use the optional `group_name` to label the group:
```bash theme={null}
curl -X POST "https://api.harvey.ai/api/v1/vault/add_row/{review_table_id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"file_ids": [
"0199c5c1-50d9-7d60-93aa-cd65c3b7d5a9",
"019f66b0-5706-7239-b7b8-9c61cbec8b7a"
],
"group_name": "Acme MSA and amendments"
}'
```
The response returns the ID of the group that was created:
```json theme={null}
{
"response": {
"event_id": 2365724,
"file_ids": [
"0199c5c1-50d9-7d60-93aa-cd65c3b7d5a9",
"019f66b0-5706-7239-b7b8-9c61cbec8b7a"
],
"review_event_run_id": "019f97bd-6d6c-7715-b63e-a0a11437f202",
"review_file_group_id": "019f97bd-6d57-7aaf-9559-58812be0e1a7",
"status": "scheduled"
}
}
```
Because the group is a single row, poll it with `get_row` using any member file ID — each member resolves to the same grouped row.
A few rules to keep in mind:
* Every file must belong to the same Vault project the review table was created from; files from other projects return `404`.
* A file that already has a row returns `409`. For a group request, a file that already belongs to a file group in the table also returns `409`. A file that is still processing returns `409` too — retry once it reaches `ready_to_query`. In each case the error message names the offending file ID.
* `group_name` defaults to the first file's name, and is ignored when only one file is sent.
* A request may carry up to 25 files by default; workspaces with a raised file-group limit may send more. Repeating the same ID in one request returns `400`.
* Adding several files at once always creates one grouped row rather than several individual rows. To add multiple independent rows, send one request per file.
* File grouping must be enabled for your workspace; multi-file requests return `422` otherwise. Adding an already-grouped file as its own row also returns `422`.
* Re-adding a file whose row was previously deleted restores the original row instead of creating a duplicate.
## Error Handling
| Status Code | Description | Example Error Message |
| - | - | - |
| 200 | Success | N/A |
| 400 | Bad Request – Missing or invalid input | `{ "error": "Duplicate file id" }` |
| 401 | Unauthorized – Invalid API key | `{ "error": "Unauthorized" }` |
| 404 | Not Found – Review table or file not found | `{ "error": "File not found" }` |
| 409 | Conflict – File already has a row or is still processing | `{ "error": "File already has a row" }` |
| 422 | Unprocessable – File grouping not enabled for workspace | `{ "error": "File grouping is not enabled" }` |
| 500 | Internal Server Error | `{ "error": "Unexpected server error" }` |
***
Need help getting started? Contact your Harvey Customer Success Manager for more information.
# History Exports
Source: https://developers.harvey.ai/guides/usage_history
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.
> [!NOTE]
>
> The current API request rate limits for History Export API endpoints are **2 requests per minute**.
```bash theme={null}
GET /api/v2/history/usage
GET /api/v2/history/query
GET /api/v1/history/usage
GET /api/v1/history/query
```
## 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
> [!NOTE]
>
> The **v2** endpoints return enriched event data with additional metadata such as `product_surface_area`, `subsurface`, `vault_project_name`, and more. We recommend using v2 for all new integrations.
> [!WARNING]
>
> These APIs include sensitive data for resource names across your entire workspace, and are not gated by any form of client-matter or ethical wall boundaries.
>
> We recommend caution when pulling this information via API and sharing API tokens carefully and selectively.
### What's new in v2
* Workflow, playbook, and vault names to identify commonly used resources
* Stable resource identifiers (`workflow_id`, `playbook_id`, `review_table_id`, `vault_project_id`, `space_id`) alongside each name field so consumers can group activity by resource across renames
* Unique usage id (uuid) for every single usage log returned by the API
* Clear distinction between creation vs. run for playbooks and workflows
* Clear distinction between starting new threads vs. asking follow-up queries
***
## Event Types
Each v2 history event includes a `product_surface_area` and `subsurface` field that identify where and how the event occurred. Below is a complete list of possible values.
### Product Surface Area
| Value | Description |
| - | - |
| `ASSISTANT` | Assistant product area |
| `VAULT` | Vault product area |
| `PLAYBOOK` | Playbook product area |
| `WORKFLOW` | Workflow product area |
| `WORD` | Word add-in |
| `OUTLOOK` | Outlook add-in |
| `DRAFT` | Draft product area |
### Subsurface
| Value | Description |
| - | - |
| `ASSISTANT_THREAD` | A new Assistant thread was started |
| `ASSISTANT_THREAD_FOLLOWUP` | A follow-up message in an existing Assistant thread |
| `REVIEW_TABLE` | A Vault review table query was created/run |
| `WORKFLOW_PUBLISHED` | A published workflow was run |
| `WORKFLOW_TEST` | A workflow was run in test mode |
***
## Usage History
### v2
```bash theme={null}
GET /api/v2/history/usage
```
Returns usage events wrapped in an `events` array. Each event includes metadata about the product area, action type, and user — without sensitive inputs or outputs.
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v2/history/usage?start_time=1711920000&end_time=1714521600" \
-H "Authorization: Bearer YOUR_API_KEY"
```
**Example response:**
```json theme={null}
{
"events": [
{
"access_point": "WEB",
"action": "CREATE",
"cm_id": "1234.56",
"parent_thread_id": 2374992,
"playbook_name": "",
"playbook_id": "",
"product_surface_area": "ASSISTANT",
"review_table_name": "",
"review_table_id": "",
"source": "Files",
"space_name": "",
"space_id": "",
"subsurface": "ASSISTANT_THREAD, ASSISTANT_THREAD_FOLLOWUP",
"utc_time": "2026-02-22 14:01:23",
"unique_usage_id": "019c85a7-a7c9-784f-bc59-0ddd5654274d",
"user": "user@example.com",
"vault_project_name": "",
"vault_project_id": "",
"workflow_name": "",
"workflow_id": "",
"metadata": {}
}
]
}
```
### v1
```bash theme={null}
GET /api/v1/history/usage
```
Returns a flat array of usage events with basic metadata.
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/history/usage?start_time=1711920000&end_time=1714521600" \
-H "Authorization: Bearer YOUR_API_KEY"
```
### Use Cases
#### 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 the `product_surface_area` field (v2) or `Task` field (v1) to break down usage by Harvey product.
#### 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. The v2 endpoint provides additional context through `subsurface` and `access_point` fields.
***
## Query History
### v2
```bash theme={null}
GET /api/v2/history/query
```
Returns query events wrapped in an `events` array. Each event includes the full query and response text alongside all usage metadata.
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v2/history/query?start_time=1711920000&end_time=1714521600" \
-H "Authorization: Bearer YOUR_API_KEY"
```
**Example response:**
```json theme={null}
{
"events": [
{
"access_point": "WEB",
"action": "CREATE",
"cm_id": "1234.56",
"feedback_comments": "",
"feedback_sentiments": "",
"link": "https://app.harvey.ai/assistant/assist/2374992",
"parent_thread_id": 2374992,
"playbook_name": "",
"playbook_id": "",
"product_surface_area": "ASSISTANT",
"query": "Can you summarize the key indemnity provisions in this contract?",
"response": "The contract contains three main indemnity provisions...",
"review_table_name": "",
"review_table_id": "",
"source": "Files",
"space_name": "",
"space_id": "",
"subsurface": "ASSISTANT_THREAD, ASSISTANT_THREAD_FOLLOWUP",
"utc_time": "2026-02-22 14:01:23",
"unique_usage_id": "019c85a7-a7c9-784f-bc59-0ddd5654274d",
"user": "user@example.com",
"vault_project_name": "",
"vault_project_id": "",
"workflow_name": "",
"workflow_id": "",
"metadata": {}
}
]
}
```
### v1
```bash theme={null}
GET /api/v1/history/query
```
Returns a flat array of query events including prompts, responses, and document references.
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/history/query?start_time=1711920000&end_time=1714521600" \
-H "Authorization: Bearer YOUR_API_KEY"
```
### Use Cases
#### 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. The v2 `link` field provides a direct URL to view the event in Harvey.
#### Reviewing Draft Quality and Sources
**Challenge**: Teams need to verify whether specific outputs were grounded in expected sources.
**Solution**: Use the `source` and `response` fields (v2) to trace how the AI formulated its answer. In v1, the `Documents` field lists specific filenames used.
***
## Best Practices
* **Limit to 1-day data pulls**: 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.
* **Align client-matter attribution**: Combine query and usage logs with client-matter metadata to analyze usage patterns and client activity. Use `cm_id` (v2) or `Client Matter #` (v1) to match events.
* **Analyze product usage**: Use `product_surface_area` and `subsurface` (v2) or `Task` (v1) to understand how different Harvey features are used.
* **Trace user activity contextually**: Use email, timestamp, and source 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.
# Vault
Source: https://developers.harvey.ai/guides/vault
Automate secure document workflows with Vault
Harvey's Vault APIs enable your systems to programmatically upload, manage, and delete documents within secure Vault projects. These endpoints support integration with DMS systems, document pipelines, and client workflows requiring consistent structure, metadata, and compliance.
> [!NOTE]
>
> The current API request rate limits for Vault API endpoints are **10 requests per minute**.
```bash theme={null}
GET /api/v1/vault/workspace/projects
GET /api/v1/vault/workspace/recycle_bin
POST /api/v1/vault/upload_files/{project_id}
GET /api/v1/vault/get_metadata/{project_id}
GET /api/v1/vault/projects/{project_id}/files
GET /api/v1/vault/get_files
DELETE /api/v1/vault/delete_file/{file_id}
DELETE /api/v1/vault/delete_project/{project_id}
```
## Overview
The Vault APIs are designed to streamline how legal teams ingest and manage large volumes of files (and other supported data formats), making them searchable and reviewable by Harvey. Use it to:
* **Automate Document Ingestion**: Upload documents in real-time from your data source of choice (e.g., Document Management System, Contract Lifecycle Management tool, File Storage platform, etc.)
* **Preserve Folder Structure**: Create a custom file library system with clear organization using nested directories
* **Track and Manage Files**: Retrieve metadata or delete obsolete files as needed automatically
> [!NOTE]
>
> Looking to read results from or add rows to a Vault review table? Those endpoints are documented in the [Review Tables guide](/guides/review_tables).
### Supported File Types
Vault supports the following formats:
* PDF
* Word (.doc, .docx)
* Excel (.xls, .xlsx)
* PowerPoint (.ppt, .pptx)
* Text (.txt)
* Markdown (.md)
* HTML (.html)
* CSV
* RTF
* XML
* Email (.eml, .msg)
* Images (.jpeg, .png, .tiff)
* Common code file types (.c, .cpp, .java, .js, .json, .php, .py, .tex, .ts, .xml, .rb, .css)
## Use Cases
### Use Case 1: List All Workspace Projects
**Challenge**: Organizations need visibility into all Vault projects within their workspace to manage content effectively.
**Solution**: Use the workspace projects endpoint to retrieve a paginated list of all projects accessible to your API token.
```bash theme={null}
curl -X GET https://api.harvey.ai/api/v1/vault/workspace/projects?page=1&per_page=20 \
-H "Authorization: Bearer YOUR_API_KEY"
```
This returns project details including IDs, names, file counts, and whether they're designated as knowledge bases.
### Use Case 2: Secure Document Storage in Vault
**Challenge**: Managing legal documents across multiple systems can lead to inefficiencies and security risks.
**Solution**: Upload files directly into Vault to ensure secure, up-to-date storage with consistent project-level organization.
```bash theme={null}
curl -X POST https://api.harvey.ai/vault/upload_files/{project_id} \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "files=@/path/to/contract.pdf" \
-F "files=@/path/to/terms.docx" \
-F "file_paths=contract.pdf" \
-F "file_paths=terms.docx"
```
### Use Case 3: Retrieve Project Storage Details
**Challenge**: Without visibility into stored files, users risk losing track of critical documents.
**Solution**: Use the metadata endpoint to retrieve file IDs, names, sizes, and other details from a Vault project.
```bash theme={null}
curl -X GET https://api.harvey.ai/vault/get_metadata/{project_id} \
-H "Authorization: Bearer YOUR_API_KEY"
```
### Use Case 4: Check File Processing Status
**Challenge**: After uploading files, organizations need to know when those files have finished processing and are ready to query.
**Solution**: Use the get files endpoint to poll the processing status of one or more files by their IDs. This is useful as a heartbeat check in upload pipelines to confirm files are ready before issuing queries against them.
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/vault/get_files?file_ids=01936a5f-8289-703a-9962-42bf196ae611&file_ids=01936a5f-82a2-708a-9df6-91d72c1cd26d" \
-H "Authorization: Bearer YOUR_API_KEY"
```
Each file in the response includes its `processing_status` (e.g., `uploaded`, `processing`, `ready_to_query`), `content_type`, and `deleted_at` timestamp. Files that are not found return an `error` field instead.
### Use Case 5: Remove Outdated or Erroneous Files
**Challenge**: Projects evolve and occasionally contain outdated or incorrectly uploaded files that must be removed.
**Solution**: Use the file deletion endpoint to remove files by ID. This is especially useful in automated pipelines or when enforcing compliance.
```bash theme={null}
curl -X DELETE https://api.harvey.ai/vault/delete_file/{file_id} \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
```
### Use Case 6: Delete Entire Vault Projects
**Challenge**: Organizations need to completely remove Vault projects that are no longer needed, ensuring complete cleanup of all associated documents and metadata.
**Solution**: Use the project deletion endpoint to remove an entire Vault project by project ID. This action cannot be undone. Deletion continues asynchronously after the API request returns.
```bash theme={null}
curl -X DELETE https://api.harvey.ai/api/v1/vault/delete_project/{project_id} \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"
```
The success response confirms that deletion is in progress:
```json theme={null}
{ "message": "Project deletion is in progress" }
```
### Use Case 7: List and Filter Files Within a Project
**Challenge**: For large Vault projects, `get_metadata` returns flat parallel ID/name arrays that don't allow filtering. Users have use cases to search and filter for specific files within their vault projects, without enumerating everything.
**Solution**: Use the list project files endpoint to retrieve files with cursor pagination, server-side filtering, and sorting. Filter by `name` (case-insensitive substring), `content_type`, `processing_status`, or `uploaded_after` / `uploaded_before`. Sort by `name`, `uploaded_at`, or `size` in either direction.
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/vault/projects/{project_id}/files?name=contract&content_type=application/pdf&processing_status=READY_TO_QUERY&sort_by=uploaded_at&sort_order=desc&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"
```
The response includes a `pagination` block with `next_cursor` — pass it back as the `cursor` query parameter to fetch the next page. Continue until `has_more` is `false`.
### Use Case 8: Review Vaults in the Recycle Bin
**Challenge**: When a Vault project is deleted it is not purged immediately — it first moves to a workspace recycle bin, where it can be reviewed (and, if needed, restored) before being permanently deleted. Administrators need visibility into which vaults are pending permanent deletion, who deleted them, and when that deletion is scheduled.
**Solution**: Use the workspace recycle-bin endpoint to list every vault currently in the recycle bin for your workspace. This endpoint is restricted to workspace vault admins (the same permission as `GET /api/v1/vault/workspace/projects`).
```bash theme={null}
curl -X GET "https://api.harvey.ai/api/v1/vault/workspace/recycle_bin?search_text=acme&client_matter_id=11111111-2222-3333-4444-555555555555" \
-H "Authorization: Bearer YOUR_API_KEY"
```
Both query parameters are optional:
* `search_text` — case-insensitive substring filter on the vault name.
* `client_matter_id` — restrict results to vaults associated with this client matter (the client matter UUID, not the human-readable matter number).
The response returns an `items` array ordered by `deleted_at` descending, plus a `total` count. Each entry describes the recycle-bin row and embeds the deleted vault under `vault_project` (the same project shape returned by `GET /api/v1/vault/workspace/projects`):
```json theme={null}
{
"items": [
{
"id": "0197a1b2-3c4d-5e6f-7a8b-9c0d1e2f3a4b",
"resource_id": "abcdef12-3456-7890-abcd-ef1234567890",
"resource_type": "vault_project",
"recycle_bin_status": "deleted",
"deleted_at": "2026-07-15T18:42:10.512000Z",
"recycle_bin_purged_scheduled_at": "2026-08-14T18:42:10.512000Z",
"delete_source": "customer_delete",
"deleted_source_id": "12345678-1234-5678-1234-567812345678",
"deleted_by_user_email": "user@example.com",
"vault_project": {
"id": "abcdef12-3456-7890-abcd-ef1234567890",
"name": "Acme Contract Repository",
"created_at": "2026-01-15T10:30:00.000000",
"creator_email": "user@example.com",
"files_count": 42,
"is_knowledge_base_project": false
}
}
],
"total": 1
}
```
Key fields on each entry:
* `recycle_bin_status` — always `deleted` for entries returned by this endpoint.
* `deleted_at` — when the vault was moved into the recycle bin.
* `delete_source` — how the delete was initiated: `customer_delete`, `admin_delete`, `retention_delete`, or `system_delete`.
* `deleted_by_user_email` — the user who deleted the vault, populated for `customer_delete` and `admin_delete`; `null` for retention/system deletes or when the actor is unknown.
* `recycle_bin_purged_scheduled_at` — when the vault is scheduled to be permanently purged from the recycle bin. `null` when no purge is scheduled.
> [!NOTE]
>
> Permanent deletion is not instantaneous at `recycle_bin_purged_scheduled_at`. The purge is carried out by a periodic background sweep, so a vault can take up to 30 minutes after `recycle_bin_purged_scheduled_at` passes to be fully purged.
## Best Practices
### Organize by Project
Use distinct `project_id` values to group documents by matter, client, or internal team structure.
### Maintain File Path Consistency
Use the `file_paths` field to define relative folder structures so that uploads reflect your organization’s hierarchy.
### Confirm Uploads and Deletions
After uploading, call `GET /vault/get_metadata/{project_id}` to confirm files are present, and use `GET /vault/get_files` to poll processing status until files reach `ready_to_query`. After deletions, check for a 200 confirmation response. When deleting entire projects, the project should no longer appear in the workspace projects list once deletion has completed.
## Error Handling
| Status Code | Description | Example Error Message |
| - | - | - |
| 201 | Success | N/A |
| 400 | Bad Request – Missing or invalid input | `{ "error": "Missing file" }` |
| 401 | Unauthorized – Invalid API key | `{ "error": "Unauthorized" }` |
| 404 | Not Found – Project or File not found | `{ "error": "File not found" }` |
| 500 | Internal Server Error | `{ "error": "Unexpected server error" }` |
***
Need help getting started? Contact your Harvey Customer Success Manager for more information.
# Get Query History
Source: https://developers.harvey.ai/history-export/queries/get-query-history
/history_export_api.json get /api/v1/history/query
Fetches the query history and metadata for a specified time range, including sensitive information such as inputs to and outputs from the AI system.
> **Warning:** These APIs include sensitive data for resource names across your entire workspace, and are not gated by any form of client-matter or ethical wall boundaries. We recommend caution when pulling this information via API and sharing API tokens carefully and selectively.
### Permissions
Requires `Access Sensitive Usage History via API` permission. If this permission is not available to select, contact [support@harvey.ai](mailto:support@harvey.ai).
# Get Query History (v2)
Source: https://developers.harvey.ai/history-export/queries/get-query-history-v2
/history_export_api.json get /api/v2/history/query
Fetches the query history and metadata for a specified time range, including sensitive information such as inputs to and outputs from the AI system. Returns enriched event data with product surface area, subsurface details, and additional metadata.
> **Warning:** These APIs include sensitive data for resource names across your entire workspace, and are not gated by any form of client-matter or ethical wall boundaries. We recommend caution when pulling this information via API and sharing API tokens carefully and selectively.
### Permissions
Requires `Access Sensitive Usage History via API` permission. If this permission is not available to select, contact [support@harvey.ai](mailto:support@harvey.ai).
# Get Usage History
Source: https://developers.harvey.ai/history-export/usage/get-usage-history
/history_export_api.json get /api/v1/history/usage
Fetches the usage history and metadata for a specified time range. Includes query events from your workspace users across Harvey product areas. The data includes basic metadata like user, timestamp and event kind.
It does **not** include sensitive information such as inputs to or outputs from the AI system.
### Permissions
Requires `Access Sensitive Usage History via API` permission. If this permission is not available to select, contact [support@harvey.ai](mailto:support@harvey.ai).
# Get Usage History (v2)
Source: https://developers.harvey.ai/history-export/usage/get-usage-history-v2
/history_export_api.json get /api/v2/history/usage
Fetches the usage history and metadata for a specified time range. Returns enriched event data with product surface area, subsurface details, and additional metadata across Harvey product areas.
> **Warning:** These APIs include sensitive data for resource names across your entire workspace, and are not gated by any form of client-matter or ethical wall boundaries. We recommend caution when pulling this information via API and sharing API tokens carefully and selectively.
### Permissions
Requires `Access Sensitive Usage History via API` permission. If this permission is not available to select, contact [support@harvey.ai](mailto:support@harvey.ai).