{ "created": [ { "client_id": "10022421", "matter_id": "M001", "matter_name": "Acme Acquisition", "description": "Acquisition due diligence", "notice": "Confirm the engagement before selecting this matter.", "client_name": "Acme Corp", "allowed": true, "harvey_id": "018d856f-0664-772c-9ed9-b2316fd881d3" } ], "updated": [], "errors": []}
Upsert
Upsert 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.
POST
/
api
/
v2
/
matters
Upsert Matters
curl --request POST \ --url https://api.harvey.ai/api/v2/matters \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "matters": [ { "client_id": "10022421", "matter_id": "M001", "matter_name": "Acme Acquisition", "description": "Acquisition due diligence", "notice": "Confirm the engagement before selecting this matter." } ]}'
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.
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.
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 for examples, field update rules, and migration steps.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Harvey","colors":{"primary":"#000000","light":"#FFFFFF","dark":"#000000"},"logo":{"light":"https://mintcdn.com/counselai/MseNlCOSIs-6XLeD/logo/Harvey_Logo_Ink.svg?fit=max\u0026auto=format\u0026n=MseNlCOSIs-6XLeD\u0026q=85\u0026s=749bc9fa610e1b9ba2b7ffce7dd5f04a","dark":"https://mintcdn.com/counselai/MseNlCOSIs-6XLeD/logo/Harvey_Logo_Ivory.svg?fit=max\u0026auto=format\u0026n=MseNlCOSIs-6XLeD\u0026q=85\u0026s=d8d9762153d411d19bcd8a8e17d4d5d3"},"favicon":"https://mintcdn.com/counselai/MseNlCOSIs-6XLeD/Harvey_Glyph.svg?fit=max\u0026auto=format\u0026n=MseNlCOSIs-6XLeD\u0026q=85\u0026s=0b2b40a43d7c86d305d6d3fc2501444c","api":{"playground":{"display":"simple"}},"navbar":{"links":[{"href":"mailto:support@harvey.ai","label":"Contact Support"}],"primary":{"type":"button","label":"app.harvey.ai","href":"https://app.harvey.ai"}},"footer":{"socials":{"linkedin":"https://linkedin.com/company/harvey-ai","twitter":"https://x.com/harvey_ai"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"counselai","hasAudioNarration":false,"actualSubdomain":"counselai","customDomains":["developers.harvey.ai"],"gitSource":{"type":"github","owner":"harveyai","repo":"public-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aee594cb616b538027e966e","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"API Reference","count":39},{"language":"default","tag":"Vault","count":32},{"language":"default","tag":"Guides","count":11},{"language":"default","tag":"Intake","count":10},{"language":"default","tag":"Endpoint Overview","count":8},{"language":"default","tag":"Client Matters","count":7},{"language":"default","tag":"Getting Started","count":4},{"language":"default","tag":"Audit Logs","count":4},{"language":"default","tag":"History Export","count":4},{"language":"default","tag":"Delete","count":3}],"searchSettings":{"showContentSnippets":true,"isFiltersEnabled":false}},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":false}},"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/upsert/upsert-matters","slug":"/api-reference/upsert/upsert-matters","pageMetadata":{"title":"Upsert Matters","description":"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.","deprecated":null,"version":null,"openapi":"/client_matters_api.json post /api/v2/matters","href":"/api-reference/upsert/upsert-matters","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"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 \", _jsx(_components.code, {\n children: \".\"\n }), \" when none is configured. If the workspace requires an explicit delimiter and none is configured, the whole request returns HTTP 400 with delimiter_required.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Heading}=_components;if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`permissions`,children:`Permissions`}),`\n`,_jsxs(_components.p,{children:[`Requires `,_jsx(_components.strong,{children:`Client matters admin`}),` (`,_jsx(_components.code,{children:`write:client_matters`}),`). Sending `,_jsx(_components.code,{children:`allowed`}),` also requires `,_jsx(_components.code,{children:`use:disallowed_client_matters`}),`, even when the value is `,_jsx(_components.code,{children:`true`}),`; otherwise the whole request returns HTTP 403.`]}),`\n`,_jsx(Heading,{level:`3`,id:`before-you-start`,children:`Before you start`}),`\n`,_jsxs(_components.p,{children:[`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 `,_jsx(_components.code,{children:`10022421-M001`}),`, configure `,_jsx(_components.code,{children:`-`}),` and send `,_jsx(_components.code,{children:`client_id: \"10022421\"`}),` with `,_jsx(_components.code,{children:`matter_id: \"M001\"`}),`. The API uses the delimiter configured for the token’s active workspace. If it is unset or empty, it uses `,_jsx(_components.code,{children:`.`}),` unless the workspace requires an explicit delimiter. In that case, the whole request returns HTTP 400 with `,_jsx(_components.code,{children:`delimiter_required`}),`; configure a delimiter before retrying. Neither path changes workspace settings.`]}),`\n`,_jsx(Heading,{level:`3`,id:`matching-and-results`,children:`Matching and results`}),`\n`,_jsxs(_components.p,{children:[`The stored name is `,_jsx(_components.code,{children:`client_id`}),` + the effective delimiter + `,_jsx(_components.code,{children:`matter_id`}),`. For client `,_jsx(_components.code,{children:`10022421`}),` and matter `,_jsx(_components.code,{children:`M001`}),`, the default produces `,_jsx(_components.code,{children:`10022421.M001`}),`; a configured `,_jsx(_components.code,{children:`-`}),` produces `,_jsx(_components.code,{children:`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.`]}),`\n`,_jsxs(_components.p,{children:[`New matters appear in `,_jsx(_components.code,{children:`created`}),`. Matched matters appear in `,_jsx(_components.code,{children:`updated`}),`, including when their fields do not change. HTTP 200 can include row failures in `,_jsx(_components.code,{children:`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.`]}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`/guides/client_matters`,children:`Client Matters guide`}),` for examples, field update rules, and migration steps.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Upsert Matters","description":"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.","deprecated":null,"version":null,"openapi":"/client_matters_api.json post /api/v2/matters","href":"/api-reference/upsert/upsert-matters","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Permissions","slug":"permissions","depth":3,"children":[]},{"title":"Before you start","slug":"before-you-start","depth":3,"children":[]},{"title":"Matching and results","slug":"matching-and-results","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Upsert Matters","description":"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.","operationId":"upsertMatters","tags":["Upsert"],"requestBody":"9d9f6987-8d76-433b-82e3-dbf80ff71630","responses":{"200":"c7998f8d-c56e-47f7-8f41-548a4797d56f","400":"af8b3573-79c1-4e6c-b8d4-e78ec8e5c1ed","401":"842a254b-fa16-4ba5-9a11-00f069897401","403":"629e47de-1112-4923-9ea6-ef6bd9375509","429":"80a6d2bb-a382-45e0-832e-df7bcc55faf0","500":"95118a3e-7f73-4fe4-9408-60e4df3e1066"},"security":["2f47c4cb-745d-453f-bf30-b98aa9953e0c"],"x-mint":{"content":"### Permissions\nRequires **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.\n\n### Before you start\nCreate 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.\n\n### Matching and results\nThe 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.\n\nNew 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.\n\nSee the [Client Matters guide](/guides/client_matters) for examples, field update rules, and migration steps."},"method":"post","type":"path","servers":["f8d2a04c-d892-4674-ae84-73ebeba47e6e"],"path":"/api/v2/matters","baseUrlOptions":["https://api.harvey.ai"],"title":"Upsert Matters","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["matters"],"properties":{"matters":{"type":"array","minItems":1,"maxItems":10000,"items":{"type":"object","description":"One matter keyed on the firm's client and matter identifiers. Omit `matter_name`, `description`, or `notice` to leave the stored value unchanged. Send null or a blank string to clear it. Values are stripped.","required":["client_id","matter_id"],"properties":{"client_id":{"type":"string","description":"The firm's client identifier as sent to `POST /api/v2/clients`. Not the Harvey client UUID that `GET /api/v1/client_matters` returns in its own `client_id` field. Must resolve to a live client; this endpoint never creates clients. Empty after stripping fails per row with `invalid_client_id`; an unknown client fails per row with `client_not_found`.","isRequired":true,"uniqueKey":"matters.items.[INDEX].client_id","typeLabel":"string"},"matter_id":{"type":"string","description":"The firm's matter identifier. `GET /api/v1/client_matters` returns this value as `matter_number`. Empty after stripping fails per row with `invalid_matter_id`.","isRequired":true,"uniqueKey":"matters.items.[INDEX].matter_id","typeLabel":"string"},"matter_name":{"oneOf":[{"type":"string","description":"Matter label. Over 256 characters fails per row with `invalid_matter_name`.","uniqueKey":"matters.items.[INDEX].matter_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"Matter label. Over 256 characters fails per row with `invalid_matter_name`.","uniqueKey":"matters.items.[INDEX].matter_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"matters.items.[INDEX].matter_name","typeLabel":"string | null"},"description":{"oneOf":[{"type":"string","description":"Matter description. More than 200 characters after trimming whitespace fails per row with description_too_long.","uniqueKey":"matters.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Matter description. More than 200 characters after trimming whitespace fails per row with description_too_long.","uniqueKey":"matters.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"uniqueKey":"matters.items.[INDEX].description","typeLabel":"string | null"},"allowed":{"type":"boolean","description":"Whether users can select the matter. Omit to leave the stored value unchanged; a new matter defaults to true. Sending `allowed` requires the disallowed-matters permission; without it the whole batch is 403. Must be a JSON boolean; null fails the whole request with `invalid_request`.","uniqueKey":"matters.items.[INDEX].allowed","typeLabel":"boolean"},"notice":{"oneOf":[{"type":"string","description":"Selection notice shown to users when they pick the matter, at most 2000 characters after stripping. A longer value fails per row with `notice_too_long`. Omit to leave the stored notice unchanged. Send null or a blank string to clear it. A whitespace-only value clears and never fails. Requires the same client matters write permission as the route.","uniqueKey":"matters.items.[INDEX].notice.oneOf.0","typeLabel":"string"},{"type":"null","description":"Selection notice shown to users when they pick the matter, at most 2000 characters after stripping. A longer value fails per row with `notice_too_long`. Omit to leave the stored notice unchanged. Send null or a blank string to clear it. A whitespace-only value clears and never fails. Requires the same client matters write permission as the route.","uniqueKey":"matters.items.[INDEX].notice.oneOf.1","typeLabel":"null"}],"uniqueKey":"matters.items.[INDEX].notice","typeLabel":"string | null"}},"uniqueKey":"matters.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"matters","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"matters":[{"client_id":"10022421","matter_id":"M001","matter_name":"Acme Acquisition","description":"Acquisition due diligence","notice":"Confirm the engagement before selecting this matter."}]},"examples":{"Example":{"title":"Example","value":{"matters":[{"client_id":"10022421","matter_id":"M001","matter_name":"Acme Acquisition","description":"Acquisition due diligence","notice":"Confirm the engagement before selecting this matter."}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"c7998f8d-c56e-47f7-8f41-548a4797d56f":{"description":"Per-row results for the submitted matters.","content":{"application/json":{"schema":{"type":"object","required":["created","updated","errors"],"properties":{"created":{"type":"array","items":{"type":"object","required":["client_id","matter_id","client_name","matter_name","description","allowed","notice","harvey_id"],"properties":{"client_id":{"type":"string","description":"The stored, stripped firm client identifier. Not a Harvey UUID; see `harvey_id`.","isRequired":true,"uniqueKey":"created.items.[INDEX].client_id","typeLabel":"string"},"matter_id":{"type":"string","description":"The stored, stripped firm matter identifier.","isRequired":true,"uniqueKey":"created.items.[INDEX].matter_id","typeLabel":"string"},"client_name":{"oneOf":[{"type":"string","description":"The parent client's label.","isRequired":true,"uniqueKey":"created.items.[INDEX].client_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The parent client's label.","isRequired":true,"uniqueKey":"created.items.[INDEX].client_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"created.items.[INDEX].client_name","typeLabel":"string | null"},"matter_name":{"oneOf":[{"type":"string","description":"The matter label. Not the stored client matter name, which this endpoint does not return; `GET /api/v1/client_matters` returns it as `name` and `DELETE /api/v1/client_matters` accepts it.","isRequired":true,"uniqueKey":"created.items.[INDEX].matter_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The matter label. Not the stored client matter name, which this endpoint does not return; `GET /api/v1/client_matters` returns it as `name` and `DELETE /api/v1/client_matters` accepts it.","isRequired":true,"uniqueKey":"created.items.[INDEX].matter_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"created.items.[INDEX].matter_name","typeLabel":"string | null"},"description":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"created.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"created.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"created.items.[INDEX].description","typeLabel":"string | null"},"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"created.items.[INDEX].allowed","typeLabel":"boolean"},"notice":{"oneOf":[{"type":"string","description":"The body of the matter's live notice after the write; null when the matter has none.","isRequired":true,"uniqueKey":"created.items.[INDEX].notice.oneOf.0","typeLabel":"string"},{"type":"null","description":"The body of the matter's live notice after the write; null when the matter has none.","isRequired":true,"uniqueKey":"created.items.[INDEX].notice.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"created.items.[INDEX].notice","typeLabel":"string | null"},"harvey_id":{"type":"string","format":"uuid","description":"The Harvey matter UUID, stable for the life of the matter. For example, pass this value as the client_matter_id form field in POST /api/v2/completion to associate an Assistant completion with the matter. GET /api/v1/client_matters returns the same value as id. DELETE /api/v1/client_matters accepts the stored matter name instead. Use your client_id and matter_id for later upserts.","isRequired":true,"uniqueKey":"created.items.[INDEX].harvey_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"created.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"created","typeLabel":"object[]"},"updated":{"type":"array","description":"Includes restored matters and matched matters whose fields did not change.","items":{"type":"object","required":["client_id","matter_id","client_name","matter_name","description","allowed","notice","harvey_id"],"properties":{"client_id":{"type":"string","description":"The stored, stripped firm client identifier. Not a Harvey UUID; see `harvey_id`.","isRequired":true,"uniqueKey":"updated.items.[INDEX].client_id","typeLabel":"string"},"matter_id":{"type":"string","description":"The stored, stripped firm matter identifier.","isRequired":true,"uniqueKey":"updated.items.[INDEX].matter_id","typeLabel":"string"},"client_name":{"oneOf":[{"type":"string","description":"The parent client's label.","isRequired":true,"uniqueKey":"updated.items.[INDEX].client_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The parent client's label.","isRequired":true,"uniqueKey":"updated.items.[INDEX].client_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"updated.items.[INDEX].client_name","typeLabel":"string | null"},"matter_name":{"oneOf":[{"type":"string","description":"The matter label. Not the stored client matter name, which this endpoint does not return; `GET /api/v1/client_matters` returns it as `name` and `DELETE /api/v1/client_matters` accepts it.","isRequired":true,"uniqueKey":"updated.items.[INDEX].matter_name.oneOf.0","typeLabel":"string"},{"type":"null","description":"The matter label. Not the stored client matter name, which this endpoint does not return; `GET /api/v1/client_matters` returns it as `name` and `DELETE /api/v1/client_matters` accepts it.","isRequired":true,"uniqueKey":"updated.items.[INDEX].matter_name.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"updated.items.[INDEX].matter_name","typeLabel":"string | null"},"description":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"updated.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"updated.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"updated.items.[INDEX].description","typeLabel":"string | null"},"allowed":{"type":"boolean","isRequired":true,"uniqueKey":"updated.items.[INDEX].allowed","typeLabel":"boolean"},"notice":{"oneOf":[{"type":"string","description":"The body of the matter's live notice after the write; null when the matter has none.","isRequired":true,"uniqueKey":"updated.items.[INDEX].notice.oneOf.0","typeLabel":"string"},{"type":"null","description":"The body of the matter's live notice after the write; null when the matter has none.","isRequired":true,"uniqueKey":"updated.items.[INDEX].notice.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"updated.items.[INDEX].notice","typeLabel":"string | null"},"harvey_id":{"type":"string","format":"uuid","description":"The Harvey matter UUID, stable for the life of the matter. For example, pass this value as the client_matter_id form field in POST /api/v2/completion to associate an Assistant completion with the matter. GET /api/v1/client_matters returns the same value as id. DELETE /api/v1/client_matters accepts the stored matter name instead. Use your client_id and matter_id for later upserts.","isRequired":true,"uniqueKey":"updated.items.[INDEX].harvey_id","typeLabel":"string\u003cuuid>"}},"uniqueKey":"updated.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"updated","typeLabel":"object[]"},"errors":{"type":"array","items":{"type":"object","required":["client_id","matter_id","error","detail"],"properties":{"client_id":{"type":"string","description":"Echoes the raw request value.","isRequired":true,"uniqueKey":"errors.items.[INDEX].client_id","typeLabel":"string"},"matter_id":{"type":"string","description":"Echoes the raw request value.","isRequired":true,"uniqueKey":"errors.items.[INDEX].matter_id","typeLabel":"string"},"error":{"type":"string","description":"Stable code for a matter row that was not stored. Errors cover empty identifiers, labels over 256 characters, descriptions over 200 characters, notices over 2000 characters, missing clients, and conflicts between identifiers. name_too_long means the derived client matter name exceeds 128 characters. name_failed_workspace_regex means that name does not match the workspace format. duplicate_pair means the client and matter identifiers repeat an earlier pair in the batch. name_collision means different pairs produce the same derived name. identity_conflict means an existing matter with that name belongs to a different pair. These name checks apply to the derived name, not the matter_name label. Each failed row reports one error.","enum":["invalid_client_id","invalid_matter_id","invalid_matter_name","description_too_long","client_not_found","name_too_long","name_failed_workspace_regex","identity_conflict","duplicate_pair","name_collision","invalid_notice","notice_too_long"],"isRequired":true,"uniqueKey":"errors.items.[INDEX].error","typeLabel":"enum\u003cstring>"},"detail":{"type":"string","description":"Human-readable explanation.","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"created":{"title":"created","value":{"created":[{"client_id":"10022421","matter_id":"M001","matter_name":"Acme Acquisition","description":"Acquisition due diligence","notice":"Confirm the engagement before selecting this matter.","client_name":"Acme Corp","allowed":true,"harvey_id":"018d856f-0664-772c-9ed9-b2316fd881d3"}],"updated":[],"errors":[]}},"updated":{"title":"updated","value":{"created":[],"updated":[{"client_id":"10022421","matter_id":"M001","matter_name":"Acme Acquisition","description":"Acquisition due diligence","notice":"Confirm the engagement before selecting this matter.","client_name":"Acme Corp","allowed":true,"harvey_id":"018d856f-0664-772c-9ed9-b2316fd881d3"}],"errors":[]}},"partialSuccess":{"title":"partialSuccess","value":{"created":[{"client_id":"10022421","matter_id":"M001","matter_name":"Acme Acquisition","description":"Acquisition due diligence","notice":"Confirm the engagement before selecting this matter.","client_name":"Acme Corp","allowed":true,"harvey_id":"018d856f-0664-772c-9ed9-b2316fd881d3"}],"updated":[],"errors":[{"client_id":"UNKNOWN","matter_id":"M002","error":"client_not_found","detail":"No client with this identifier exists in the workspace"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"af8b3573-79c1-4e6c-b8d4-e78ec8e5c1ed":{"description":"The request was rejected as a whole: invalid_request, too_many_items, or delimiter_required when the workspace requires an explicit delimiter but none is configured.","content":{"application/json":{"schema":{"type":"object","description":"Body of a 400 response from `/api/v2/clients` and `/api/v2/matters`.","required":["error","detail"],"properties":{"error":{"type":"string","description":"Stable code for a rejected request. too_many_items: more than 10,000 rows. invalid_request: invalid request shape, empty batch, missing required field, wrong type, allowed set to null, or a token user that cannot be found. delimiter_required: POST /api/v2/matters requires an explicit delimiter for the active workspace, but none is configured. Other workspaces use `.` when no delimiter is configured. POST /api/v2/clients, DELETE /api/v2/clients, and DELETE /api/v2/matters do not emit delimiter_required. Duplicate identifiers and length limits on text fields produce per-row errors instead.","enum":["too_many_items","invalid_request","delimiter_required"],"isRequired":true,"uniqueKey":"error","typeLabel":"enum\u003cstring>"},"detail":{"type":"string","description":"Human-readable explanation.","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"validation_errors":{"type":"array","description":"Present for `invalid_request`. Field values are never echoed.","items":{"type":"object","required":["loc","type"],"properties":{"loc":{"type":"array","description":"Path to the offending field. Each entry is a string naming a field or an integer indexing an array.","items":{"oneOf":[{}],"uniqueKey":"validation_errors.items.[INDEX].loc.items.[INDEX]","typeLabel":"any"},"isRequired":true,"uniqueKey":"validation_errors.items.[INDEX].loc","typeLabel":"any[]"},"type":{"type":"string","description":"The validation failure kind, for example `missing` or `string_type`.","isRequired":true,"uniqueKey":"validation_errors.items.[INDEX].type","typeLabel":"string"}},"uniqueKey":"validation_errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"validation_errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"invalidRequest":{"title":"invalidRequest","value":{"error":"invalid_request","detail":"Invalid request body","validation_errors":[{"loc":["matters"],"type":"too_short"}]}},"delimiterRequired":{"title":"delimiterRequired","value":{"error":"delimiter_required","detail":"Set a client matter delimiter for this workspace before upserting matters"}}},"exampleType":"examples"}},"exampleType":"examples"},"842a254b-fa16-4ba5-9a11-00f069897401":{"description":"Missing, invalid, or expired API token, or missing write:client_matters permission.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"629e47de-1112-4923-9ea6-ef6bd9375509":{"description":"The request sends allowed without use:disallowed_client_matters permission. The whole batch is rejected.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"80a6d2bb-a382-45e0-832e-df7bcc55faf0":{"description":"Rate limit exceeded. These endpoints share the client matter rate limit, which defaults to 150 requests per minute per workspace.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"95118a3e-7f73-4fe4-9408-60e4df3e1066":{"description":"Internal server error.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"2f47c4cb-745d-453f-bf30-b98aa9953e0c":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Token","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"f8d2a04c-d892-4674-ae84-73ebeba47e6e":{"url":"https://api.harvey.ai","description":"Harvey API server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"Token","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"client_matters_api.json"},"subdomain":"counselai","siteName":"Harvey","title":"Upsert Matters - Harvey","relatedPagesConfig":{"enabled":true,"limit":3,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-28T23:06:24.233Z","originalFileLocation":"api-reference/upsert/upsert-matters.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates or updates matters under existing clients using your firm\u0026#x27;s client and matter identifiers. Submit 1 to 10,000 matters per request. Uses the delimiter configured for the API token\u0026#x27;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.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Harvey\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/svg+xml\" sizes=\"180x180\" href=\"https://mintcdn.com/counselai/MseNlCOSIs-6XLeD/Harvey_Glyph.svg?fit=max\u0026amp;auto=format\u0026amp;n=MseNlCOSIs-6XLeD\u0026amp;q=85\u0026amp;s=0b2b40a43d7c86d305d6d3fc2501444c\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"32x32\" href=\"https://mintcdn.com/counselai/MseNlCOSIs-6XLeD/Harvey_Glyph.svg?fit=max\u0026amp;auto=format\u0026amp;n=MseNlCOSIs-6XLeD\u0026amp;q=85\u0026amp;s=0b2b40a43d7c86d305d6d3fc2501444c\">\u003clink data-mint-head rel=\"icon\" type=\"image/svg+xml\" sizes=\"16x16\" href=\"https://mintcdn.com/counselai/MseNlCOSIs-6XLeD/Harvey_Glyph.svg?fit=max\u0026amp;auto=format\u0026amp;n=MseNlCOSIs-6XLeD\u0026amp;q=85\u0026amp;s=0b2b40a43d7c86d305d6d3fc2501444c\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/svg+xml\" href=\"https://mintcdn.com/counselai/MseNlCOSIs-6XLeD/Harvey_Glyph.svg?fit=max\u0026amp;auto=format\u0026amp;n=MseNlCOSIs-6XLeD\u0026amp;q=85\u0026amp;s=0b2b40a43d7c86d305d6d3fc2501444c\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upsert Matters - Harvey\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates or updates matters under existing clients using your firm\u0026#x27;s client and matter identifiers. Submit 1 to 10,000 matters per request. Uses the delimiter configured for the API token\u0026#x27;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.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Harvey\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.harvey.ai/api-reference/upsert/upsert-matters\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://counselai.mintlify.site/_mintlify/api/og/v2?division=Upsert\u0026amp;title=Upsert+Matters\u0026amp;description=Creates+or+updates+matters+under+existing+clients+using+your+firm%27s+client+and+matter+identifiers.+Submit+1+to+10%2C000+matters+per+request.+Uses+the+delimiter+co\u0026amp;theme=ca09a866a969d63910536c2f\u0026amp;signature=5abc45ad4595539221fe28737c56d9e0d4a8b8d9e71a71b95027c4fd954a9d93\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Upsert Matters - Harvey\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates or updates matters under existing clients using your firm\u0026#x27;s client and matter identifiers. Submit 1 to 10,000 matters per request. Uses the delimiter configured for the API token\u0026#x27;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.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://counselai.mintlify.site/_mintlify/api/og/v2?division=Upsert\u0026amp;title=Upsert+Matters\u0026amp;description=Creates+or+updates+matters+under+existing+clients+using+your+firm%27s+client+and+matter+identifiers.+Submit+1+to+10%2C000+matters+per+request.+Uses+the+delimiter+co\u0026amp;theme=ca09a866a969d63910536c2f\u0026amp;signature=5abc45ad4595539221fe28737c56d9e0d4a8b8d9e71a71b95027c4fd954a9d93\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/counselai/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Harvey\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.harvey.ai/api-reference/upsert/upsert-matters\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/upsert/upsert-matters.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.harvey.ai/#organization\",\"name\":\"Harvey\",\"url\":\"https://developers.harvey.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/counselai/MseNlCOSIs-6XLeD/logo/Harvey_Logo_Ink.svg?fit=max\u0026auto=format\u0026n=MseNlCOSIs-6XLeD\u0026q=85\u0026s=749bc9fa610e1b9ba2b7ffce7dd5f04a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.harvey.ai#website\",\"name\":\"Harvey\",\"url\":\"https://developers.harvey.ai\",\"publisher\":{\"@id\":\"https://developers.harvey.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.harvey.ai/api-reference/upsert/upsert-matters#webpage\",\"url\":\"https://developers.harvey.ai/api-reference/upsert/upsert-matters\",\"name\":\"Upsert Matters\",\"description\":\"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.\",\"dateModified\":\"2026-10-28T23:06:24.233Z\",\"isPartOf\":{\"@id\":\"https://developers.harvey.ai#website\"},\"breadcrumb\":{\"@id\":\"https://developers.harvey.ai/api-reference/upsert/upsert-matters#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.harvey.ai/api-reference/upsert/upsert-matters#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Client Matters\",\"item\":\"https://developers.harvey.ai/api-reference/retrieve/get-client-matters\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upsert\",\"item\":\"https://developers.harvey.ai/api-reference/upsert/upsert-clients\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Upsert Matters\",\"item\":\"https://developers.harvey.ai/api-reference/upsert/upsert-matters\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developers.harvey.ai/api-reference/upsert/upsert-matters#apireference\",\"headline\":\"Upsert Matters\",\"name\":\"Upsert Matters\",\"description\":\"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.\",\"url\":\"https://developers.harvey.ai/api-reference/upsert/upsert-matters\",\"mainEntityOfPage\":{\"@id\":\"https://developers.harvey.ai/api-reference/upsert/upsert-matters#webpage\"},\"dateModified\":\"2026-10-28T23:06:24.233Z\",\"publisher\":{\"@id\":\"https://developers.harvey.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.harvey.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Harvey\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Harvey","nav":{"global":null,"tabs":[{"tab":"API Reference","groups":[{"group":"Getting Started","pages":[{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Rate Limits","href":"/api-reference/ratelimits"}]},{"group":"Assistant","pages":[{"group":"Completion","pages":[{"title":"Completion","deprecated":null,"version":null,"openapi":"/v2_completion_api.json post /api/v2/completion","href":"/api-reference/completion/completion"}]}]},{"group":"Vault","pages":[{"group":"Vault","pages":[{"title":"List Vault Projects and Knowledge Bases","deprecated":null,"version":null,"openapi":"/vault_api.json get /api/v1/vault/workspace/projects","href":"/api-reference/vault/list-vault-projects-and-knowledge-bases"},{"title":"List Vaults in the Recycle Bin","deprecated":null,"version":null,"openapi":"/vault_api.json get /api/v1/vault/workspace/recycle_bin","href":"/api-reference/vault/list-vaults-in-the-recycle-bin"},{"title":"Get Vault Project Metadata","deprecated":null,"version":null,"openapi":"/vault_api.json get /api/v1/vault/get_metadata/{project_id}","href":"/api-reference/vault/get-vault-project-metadata"},{"title":"Get Review Table Metadata","deprecated":null,"version":null,"openapi":"/vault_api.json get /api/v1/vault/review_table/{review_table_id}","href":"/api-reference/vault/get-review-table-metadata"},{"title":"Get File Details","deprecated":null,"version":null,"openapi":"/vault_api.json get /api/v1/vault/get_files","href":"/api-reference/vault/get-file-details"},{"title":"Get Review Table Row Details","deprecated":null,"version":null,"openapi":"/vault_api.json get /api/v1/vault/get_row/{review_table_id}/{file_id}","href":"/api-reference/vault/get-review-table-row-details"},{"title":"Add Row to Review Table","deprecated":null,"version":null,"openapi":"/vault_api.json post /api/v1/vault/add_row/{review_table_id}","href":"/api-reference/vault/add-row-to-review-table"},{"title":"List Files in a Vault Project","deprecated":null,"version":null,"openapi":"/vault_api.json get /api/v1/vault/projects/{project_id}/files","href":"/api-reference/vault/list-files-in-a-vault-project"},{"title":"List Project Users","deprecated":null,"version":null,"openapi":"/vault_api.json get /api/v1/vault/projects/{project_id}/users","href":"/api-reference/vault/list-project-users"},{"title":"Update Project Users","deprecated":null,"version":null,"openapi":"/vault_api.json post /api/v1/vault/projects/{project_id}/users","href":"/api-reference/vault/update-project-users"},{"title":"Remove Project Users","deprecated":null,"version":null,"openapi":"/vault_api.json delete /api/v1/vault/projects/{project_id}/users","href":"/api-reference/vault/remove-project-users"},{"title":"Create a new Vault project","deprecated":null,"version":null,"openapi":"/vault_api.json post /api/v1/vault/create_project","href":"/api-reference/vault/create-a-new-vault-project"},{"title":"Upload Files to Project","deprecated":null,"version":null,"openapi":"/vault_api.json post /api/v1/vault/upload_files/{project_id}","href":"/api-reference/vault/upload-files-to-project"},{"title":"Semantic search over a vault project","deprecated":null,"version":null,"openapi":"/vault_api.json post /api/v1/vault/semantic_search","href":"/api-reference/vault/semantic-search-over-a-vault-project"},{"title":"Delete a file from a Vault project","deprecated":null,"version":null,"openapi":"/vault_api.json delete /api/v1/vault/delete_file/{file_id}","href":"/api-reference/vault/delete-a-file-from-a-vault-project"},{"title":"Delete an entire vault project and all its contents","deprecated":null,"version":null,"openapi":"/vault_api.json delete /api/v1/vault/delete_project/{project_id}","href":"/api-reference/vault/delete-an-entire-vault-project-and-all-its-contents"}]}]},{"group":"History Export","pages":[{"group":"Usage","pages":[{"title":"Get Usage History","deprecated":null,"version":null,"openapi":"/history_export_api.json get /api/v1/history/usage","href":"/history-export/usage/get-usage-history"},{"title":"Get Usage History (v2)","deprecated":null,"version":null,"openapi":"/history_export_api.json get /api/v2/history/usage","href":"/history-export/usage/get-usage-history-v2"}]},{"group":"Queries","pages":[{"title":"Get Query History","deprecated":null,"version":null,"openapi":"/history_export_api.json get /api/v1/history/query","href":"/history-export/queries/get-query-history"},{"title":"Get Query History (v2)","deprecated":null,"version":null,"openapi":"/history_export_api.json get /api/v2/history/query","href":"/history-export/queries/get-query-history-v2"}]}]},{"group":"Audit Logs","pages":[{"group":"Search","pages":[{"title":"Search Audit Logs","deprecated":null,"version":null,"openapi":"/audit_logs_api.json get /api/v1/logs/audit/search/","href":"/api-reference/search/search-audit-logs"}]},{"group":"Retrieve","pages":[{"title":"Retrieve Earliest Audit Log","deprecated":null,"version":null,"openapi":"/audit_logs_api.json get /api/v1/logs/audit/earliest","href":"/api-reference/retrieve/retrieve-earliest-audit-log"},{"title":"Retrieve Latest Audit Log","deprecated":null,"version":null,"openapi":"/audit_logs_api.json get /api/v1/logs/audit/latest","href":"/api-reference/retrieve/retrieve-latest-audit-log"}]},{"group":"Query","pages":[{"title":"Query Audit Logs","deprecated":null,"version":null,"openapi":"/audit_logs_api.json get /api/v1/logs/audit","href":"/api-reference/query/query-audit-logs"}]}]},{"group":"Client Matters","pages":[{"group":"Retrieve","pages":[{"title":"Get Client Matters","deprecated":null,"version":null,"openapi":"/client_matters_api.json get /api/v1/client_matters","href":"/api-reference/retrieve/get-client-matters"}]},{"group":"Add","pages":[{"title":"Add Client Matters","deprecated":true,"version":null,"openapi":"/client_matters_api.json post /api/v1/client_matters","href":"/api-reference/add/add-client-matters"}]},{"group":"Delete","pages":[{"title":"Delete Client Matters","deprecated":null,"version":null,"openapi":"/client_matters_api.json delete /api/v1/client_matters","href":"/api-reference/delete/delete-client-matters"},{"title":"Delete Clients","deprecated":null,"version":null,"openapi":"/client_matters_api.json delete /api/v2/clients","href":"/api-reference/delete/delete-clients"},{"title":"Delete Matters","deprecated":null,"version":null,"openapi":"/client_matters_api.json delete /api/v2/matters","href":"/api-reference/delete/delete-matters"}]},{"group":"Upsert","pages":[{"title":"Upsert Clients","description":"Creates or updates clients using your firm's client identifiers. Submit 1 to 10,000 clients per request.","deprecated":null,"version":null,"openapi":"/client_matters_api.json post /api/v2/clients","href":"/api-reference/upsert/upsert-clients"},{"title":"Upsert Matters","deprecated":null,"version":null,"openapi":"/client_matters_api.json post /api/v2/matters","href":"/api-reference/upsert/upsert-matters"}]}]},{"group":"Intake","pages":[{"group":"Intake","pages":[{"title":"List Requests","description":"Lists the intake requests your token's user can see, newest first. Follow `pagination.next_cursor` until `pagination.has_more` is false.","deprecated":null,"version":null,"openapi":"/intake_api.json get /api/v1/intake/requests","href":"/api-reference/intake/list-requests"},{"title":"Create Request","deprecated":null,"version":null,"openapi":"/intake_api.json post /api/v1/intake/requests","href":"/api-reference/intake/create-request"},{"title":"Get Request","deprecated":null,"version":null,"openapi":"/intake_api.json get /api/v1/intake/requests/{request_id}","href":"/api-reference/intake/get-request"},{"title":"Update Request","deprecated":null,"version":null,"openapi":"/intake_api.json patch /api/v1/intake/requests/{request_id}","href":"/api-reference/intake/update-request"},{"title":"List Comments","deprecated":null,"version":null,"openapi":"/intake_api.json get /api/v1/intake/requests/{request_id}/comments","href":"/api-reference/intake/list-comments"}]}]}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/introduction"}]}]},"basePath":"","title":"Upsert Matters - Harvey","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-5FCzAcfS.js","utils-SLtAG4EZ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-2DZi8ZMu.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D7J3nkzE.js","snippetPresets-D0Alv0AH.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BI4qNJ2c.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BD3uyr8j.js","shallow-D8iEBr5z.js","getApiPlaygroundDisplay-CgNP4lzR.js","CodeSnippet-CX-QHuMs.js","CodeSnippets-VlXE-ZUf.js","Page-D9ithiIZ.js","getPastedJson-DYNQkZ1M.js","icon-CzacdwOi.js","MethodPill-2JVqoYKi.js","DuplicateIcon-_xVXs-U8.js","createIcon-BRHrweLo.js","DynamicMarkdown-mQG_iQiE.js","SectionHeading-DMpJzv8f.js","axios-vUo_bRtp.js","Markdown-5FGIym-8.js","clsx-D-TRO5q5.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CdrJecqK.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CHlcWBLM.js"]}