Send documents to the reviewing lawyer
Access: Bearer token required. Roles: AGENT, ADMIN, LANDLORD. Also requires: Caller assigned the lawyer, or is the property's agent or landlord, or is an admin; Assignment status is assigned, accepted, in_review or changes_requested.
The lister uploads supporting documents for an open legal review. Send multipart/form-data with one or more files under the field name documents and an optional text field note. Up to 10 files per request, 10 MB each; allowed extensions are jpg, jpeg, png, gif, pdf, doc, docx, xls, xlsx, ppt, pptx, txt. Files are uploaded to Cloudinary by the upload middleware before the handler validates anything, so a request rejected afterwards has still stored its files. The caller must be the user who assigned the lawyer, the property's agent or landlord, or an admin. The batch is appended to documentSubmissions (each file as url, name, mimeType, size). If the assignment was changes_requested, this is the answer to that request: the assignment returns to in_review and the property's legalStatus to under_legal_review; in assigned, accepted or in_review the documents are simply added. A documents_submitted audit entry is written and the lawyer is notified (event lawyer_documents_submitted, title "New Documents to Review": in-app + notifications:new socket event, push, and email "New Documents to Review on HomeLink Hub"). data is the updated assignment with unpopulated ids. Upload-middleware failures are not converted to 4xx: they reach the error handler as 500s.
bearerAuthAuthorizationBearer <JWT>Access token returned by sign-in. Send it as Authorization: Bearer <token>.
assignmentId*stringObjectId of the legal assignment the documents are for.
multipart/form-data- body
documents*unknownOne to ten files (repeat the field for each file). 10 MB per file; jpg, jpeg, png, gif, pdf, doc, docx, xls, xlsx, ppt, pptx or txt.
note?stringOptional message to the lawyer. Trimmed; max 2000 characters (model limit).
Documents stored and the lawyer notified
application/json- response
status*integersuccess*booleanmessage*stringdata*curl -X POST 'http://localhost:4000/api/v1/legal/assignments/string/documents'{ "status": 201, "success": true, "message": "Documents sent to the lawyer", "data": { "_id": "6660a7d49b1d4a0012ab3501", "propertyId": "665f1c2e9b1d4a0012ab34cd", "lawyerId": "665f1c2e9b1d4a0012ab34c3", "assignedBy": "665f1c2e9b1d4a0012ab34c1", "mediaSnapshot": { "images": [ { "url": "https://res.cloudinary.com/example/image/upload/v1717500000/homelinkhub/media/living-room.jpg", "metadata": { "address": "14 Admiralty Way, Lekki Phase 1, Lagos", "coordinates": [ 3.4723, 6.4474 ] }, "_id": "6660a7d49b1d4a0012ab3570" } ], "videos": [] }, "status": "in_review", "dueDate": "2026-06-12T17:00:00.000Z", "notes": "Please confirm the C of O and survey plan.", "decision": { "checklist": [] }, "documentSubmissions": [ { "_id": "6660a7d49b1d4a0012ab3505", "documents": [ { "url": "https://res.cloudinary.com/example/raw/upload/v1717600000/homelinkhub/media/certificate-of-occupancy.pdf", "name": "certificate-of-occupancy.pdf", "mimeType": "application/pdf", "size": 482113 } ], "note": "C of O attached as requested.", "submittedBy": "665f1c2e9b1d4a0012ab34c1", "submittedAt": "2026-06-05T14:02:10.107Z" } ], "createdAt": "2026-06-04T09:15:22.481Z", "updatedAt": "2026-06-05T14:02:10.107Z", "__v": 1 }}Get a property's legal assignment history GET
Every legal assignment ever opened for the property (including reassigned ones), newest first, with lawyerId and assignedBy populated (firstName, lastName, avatar, role) and eac...
List my legal assignments GET
The calling lawyer's assignments, newest first, with propertyId populated (title, location, pricing) and assignedBy populated (firstName, lastName).
HomeLink Hub