Skip to Content
HomeLink Hub
Legal Verification

Reassign a legal review to another lawyer

PATCH
/api/v1/legal/assignments/{assignmentId}/reassign

Access: Bearer token required. Roles: AGENT, ADMIN, LANDLORD. Also requires: Caller is the property's agent or landlord, or an admin.

Closes an existing assignment and opens a new one for a different lawyer on the same property. The old assignment's status becomes reassigned; a new assignment is created with status assigned, a fresh mediaSnapshot of the property's current media, and the caller as assignedBy. The property's activeLegalAssignmentId is moved to the new assignment, a lawyer_reassigned audit entry is written, and the new lawyer gets the same lawyer_assigned notification (in-app + notifications:new socket event, push, email) as a first assignment. Things this handler does not do, unlike assign: it does not require a contracted partnership with the new lawyer; it does not check that the old assignment is still open (a verified or rejected assignment can be reassigned and is overwritten to reassigned); it does not copy the old notes, dueDate or submitted documents; it does not change the property's legalStatus; and it does not notify the previous lawyer. data is the new assignment with unpopulated ids. A malformed lawyerId surfaces as a 500. Any unexpected error inside the legal service (including a Mongoose cast or validation failure) is re-thrown as a 500 carrying the underlying error's message plus an errorData field holding the serialized underlying error.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Path Parameters

assignmentId*string

ObjectId of the assignment to replace.

Request Body

application/json
  1. body
lawyerId*string

ObjectId of the lawyer taking over. Must be a user with role LAWYER.

Response Body

New assignment created; the old one is now reassigned

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X PATCH 'http://localhost:4000/api/v1/legal/assignments/string/reassign' \  -H 'Content-Type: application/json' \  -d '{  "lawyerId": "665f1c2e9b1d4a0012ab34c5"}'
Example Response
{  "status": 200,  "success": true,  "message": "Lawyer reassigned successfully",  "data": {    "_id": "6660a7d49b1d4a0012ab3502",    "propertyId": "665f1c2e9b1d4a0012ab34cd",    "lawyerId": "665f1c2e9b1d4a0012ab34c5",    "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": "assigned",    "decision": {      "checklist": []    },    "documentSubmissions": [],    "createdAt": "2026-06-05T14:02:10.107Z",    "updatedAt": "2026-06-05T14:02:10.107Z",    "__v": 0  }}