PATCH /v1/documents/:id lets you update the metadata of a document you own. All body fields are optional; you only need to include the fields you want to change. Successfully updating a document triggers a document.updated event in your activity feed.
This endpoint updates document metadata only. To attach or modify the associated loan, use the create endpoint with a new document, or contact support for loan record changes.
Request headers
Bearer token obtained from your Clerk session. Example:
Bearer eyJhbGc...Must be
application/json.Path parameters
The unique identifier of the document to update. The document must be owned by your account; the API returns
404 for documents that do not exist or belong to another account.Request body
All fields are optional. The API only modifies the fields you include in the request body.New display name for the document. Minimum 1 character, maximum 200 characters.
New description. Maximum 2000 characters. Pass
null explicitly to clear an existing description.New chattel type classification ID. Must be one of the valid chattel type IDs. Returns
400 if the value is not recognized.Response
Returns200 OK with the updated document.
The full updated document object.
Example
Error cases
| Status | Error message | Cause |
|---|---|---|
400 | Invalid body. | A field value fails schema validation, for example title exceeds 200 characters. |
400 | Invalid chattelType. | The chattelType value is not a recognized chattel type ID. |
401 | Missing Authorization Bearer token. | No Authorization header was sent. |
401 | Invalid or expired token. | The Bearer token is malformed or has expired. |
404 | Not found. | No document with the given id exists, or it belongs to a different account. |
