Skip to Content
HomeLink Hub
Legal Verification

Assign a lawyer to a property

POST
/api/v1/legal/properties/{propertyId}/assign-lawyer

Access: Bearer token required. Roles: AGENT, ADMIN, LANDLORD. Also requires: Caller is the property's agent or landlord, or an admin; Caller has a contracted partnership with the lawyer; Property has no active legal assignment.

Opens a legal verification assignment for a property. The caller must be the property's agent or landlord, or an admin, and must have a contracted partnership with the lawyer; that partnership check applies to admins too. A property can have only one active assignment (assigned, accepted, in_review, changes_requested); use the reassign endpoint to change lawyer. On success the assignment is created with status assigned, a mediaSnapshot freezing the property's current images and videos is stored on it, the property's legalStatus becomes under_legal_review and its activeLegalAssignmentId points at the new assignment, and a lawyer_assigned entry is written to the legal audit log. The lawyer is notified through the notification service (event lawyer_assigned, title "New Legal Assignment"): a stored in-app notification with a notifications:new socket event to their personal room, a push notification, and an email ("New Legal Assignment on HomeLink Hub"), each subject to their lawyerVerificationUpdates preferences. data is the new assignment with unpopulated ids.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

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

Path Parameters

propertyId*string

ObjectId of the property to verify.

Request Body

application/json
  1. body
lawyerId*string

ObjectId of a user with role LAWYER who has accepted the caller's partnership invite.

notes?string

Instructions for the lawyer. Max 5000 characters (model limit).

dueDate?string

Date the review is due, in any format JavaScript new Date() parses (ISO 8601 recommended).

Response Body

Assignment created

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X POST 'http://localhost:4000/api/v1/legal/properties/string/assign-lawyer' \  -H 'Content-Type: application/json' \  -d '{  "lawyerId": "665f1c2e9b1d4a0012ab34c3",  "notes": "Please confirm the C of O and survey plan.",  "dueDate": "2026-06-12T17:00:00.000Z"}'
Example Response
{  "status": 201,  "success": true,  "message": "Lawyer assigned successfully",  "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": "assigned",    "dueDate": "2026-06-12T17:00:00.000Z",    "notes": "Please confirm the C of O and survey plan.",    "decision": {      "checklist": []    },    "documentSubmissions": [],    "createdAt": "2026-06-04T09:15:22.481Z",    "updatedAt": "2026-06-04T09:15:22.481Z",    "__v": 0  }}