# SureRightStay Backend API Reference

Generated from `portalapi/routes/api.php`, Laravel route metadata, and controller method inspection.

- Total routes documented: 253
- Auth scheme: `Authorization: Bearer <JWT_TOKEN>` for `auth:api` endpoints
- Note: payload and response examples are inferred from validation rules and controller response structure, so they are reference-ready but still sample data.

## Admin

### `GET /api/admin/kyc`

- Summary: Paginated list of all KYC verifications with rich user context.
- Controller: `AdminKycController@index`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Query Params Example**

```json
{
    "status": "verified",
    "verification_type": "general",
    "user_id": 1,
    "search": "lekki",
    "role": "tenant",
    "start_date": "2026-04-07",
    "end_date": "2026-04-07",
    "sort": "sample",
    "direction": "sample",
    "per_page": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "status": "approved",
            "verification_type": "bvn"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "KYC record not found"
}
```

### `GET /api/admin/kyc/stats`

- Summary: Dashboard stat counts for the KYC admin widget.
- Controller: `AdminKycController@stats`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/admin/kyc/{id}`

- Summary: Full detail of a single KYC verification, including parsed Dojah payload.
- Controller: `AdminKycController@show`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "status": "approved",
        "verification_type": "bvn"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "KYC record not found"
}
```

### `PATCH /api/admin/kyc/{id}/status`

- Summary: Admin can manually override a KYC verification status.
- Controller: `AdminKycController@updateStatus`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "id": 1
}
```

**Request Payload Example**

```json
{
    "status": "verified",
    "admin_notes": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Request completed successfully",
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "KYC record not found"
}
```

### `GET /api/admin/leads`

- Summary: List records for this endpoint.
- Controller: `PropertyLeadController@index`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "full_name": "John Doe",
            "status": "new"
        }
    ],
    "summary": "sample"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized"
}
```

### `GET /api/admin/leads/stats`

- Summary: Get aggregate statistics for this endpoint.
- Controller: `PropertyLeadController@stats`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized"
}
```

### `GET /api/admin/leads/{id}`

- Summary: Get a single record by identifier.
- Controller: `PropertyLeadController@show`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "full_name": "John Doe",
        "status": "new"
    },
    "can_edit": true,
    "is_admin": "sample",
    "is_owner": "sample"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/admin/leads/{id}/note`

- Summary: Add a note to this resource.
- Controller: `PropertyLeadController@addNote`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "id": 1
}
```

**Query Params Example**

```json
{
    "note": "sample"
}
```

**Request Payload Example**

```json
{
    "note": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "full_name": "John Doe",
        "status": "new"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `PATCH /api/admin/leads/{id}/status`

- Summary: Update status information for this resource.
- Controller: `PropertyLeadController@updateStatus`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "id": 1
}
```

**Query Params Example**

```json
{
    "status": "' . implode('",
    "scheduled_visit_at": "2026-04-07T10:00:00Z",
    "discussed_price": 1500000,
    "assigned_to": 1,
    "admin_notes": "sample",
    "note": "sample"
}
```

**Request Payload Example**

```json
{
    "status": "' . implode('",
    "note": "sample",
    "scheduled_visit_at": "2026-04-07T10:00:00Z",
    "discussed_price": 1500000,
    "assigned_to": 1,
    "admin_notes": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Agency

### `POST /api/agency/agents`

- Summary: Add agent to agency.
- Controller: `AgencyAgentController@addAgent`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "agency_id": 1,
    "user_id": 1,
    "agent_name": "Sample Name",
    "agent_email": "user@example.com",
    "agent_phone": "+2348012345678"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Agent added successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Agent already exists for this agency"
}
```

### `DELETE /api/agency/agents/{agencyAgent}`

- Summary: Remove agent from agency.
- Controller: `AgencyAgentController@removeAgent`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "agencyAgent": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Agent removed successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/agency/agents/{agencyAgent}`

- Summary: Update agent details.
- Controller: `AgencyAgentController@updateAgent`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "agencyAgent": 1
}
```

**Request Payload Example**

```json
{
    "agent_name": "Sample Name",
    "agent_email": "user@example.com",
    "agent_phone": "+2348012345678",
    "is_active": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Agent updated successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/agency/agents/{agencyAgent}/activate`

- Summary: Activate agent.
- Controller: `AgencyAgentController@activateAgent`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "agencyAgent": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Agent activated successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/agency/agents/{agencyAgent}/deactivate`

- Summary: Deactivate agent.
- Controller: `AgencyAgentController@deactivateAgent`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "agencyAgent": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Agent deactivated successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/agency/agents/{agentId}/properties`

- Summary: Get agent's assigned properties.
- Controller: `AgencyAgentController@getAgentProperties`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "agentId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/agency/agents/{agentId}/stats`

- Summary: Get agent performance stats.
- Controller: `AgencyAgentController@getAgentStats`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "agentId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/agency/{agencyId}/agents`

- Summary: List agents by agency.
- Controller: `AgencyAgentController@listByAgency`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "agencyId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Agency Data

### `GET /api/agency-data`

- Summary: List records for this endpoint.
- Controller: `AgencyDataController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Agency data list",
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/agency-data`

- Summary: Create a new record for this endpoint.
- Controller: `AgencyDataController@store`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "owner_user_id": 1,
    "agency_name": "Sample Name",
    "phone": "+2348012345678",
    "email": "user@example.com",
    "is_verified": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Agency created successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/agency-data/{agencyData}`

- Summary: Delete a record for this endpoint.
- Controller: `AgencyDataController@destroy`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "agencyData": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Agency deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/agency-data/{agencyData}`

- Summary: Get a single record by identifier.
- Controller: `AgencyDataController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "agencyData": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/agency-data/{agencyData}`

- Summary: Update an existing record for this endpoint.
- Controller: `AgencyDataController@update`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "agencyData": 1
}
```

**Request Payload Example**

```json
{
    "agency_name": "Sample Name",
    "phone": "+2348012345678",
    "email": "user@example.com",
    "is_verified": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Agency updated successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Areas

### `GET /api/areas`

- Summary: Display a listing of the areas.
- Controller: `AreaController@index`
- Middleware: `api`
- Auth required: No

**Query Params Example**

```json
{
    "stateId": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Areas fetched successfully",
    "data": [
        {
            "id": 1,
            "name": "Lagos"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/areas`

- Summary: Store a newly created area in storage.
- Controller: `AreaController@store`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Request Payload Example**

```json
{
    "state_id": 1,
    "name": "Sample Name"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Area created successfully",
    "data": {
        "id": 1,
        "name": "Lagos"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/areas/{area}`

- Summary: Remove the specified area from storage.
- Controller: `AreaController@destroy`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "area": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Area deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/areas/{area}`

- Summary: Display the specified area.
- Controller: `AreaController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "area": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Lagos"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/areas/{area}`

- Summary: Update the specified area in storage.
- Controller: `AreaController@update`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "area": 1
}
```

**Request Payload Example**

```json
{
    "state_id": 1,
    "name": "Sample Name"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Area updated successfully",
    "data": {
        "id": 1,
        "name": "Lagos"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Audit Logs

### `GET /api/audit-logs/admin-actions`

- Summary: Get admin action logs.
- Controller: `AuditLogController@getAdminActions`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "action": "sample",
    "entity_type": "general",
    "user_id": 1,
    "start_date": "2026-04-07",
    "end_date": "2026-04-07",
    "per_page": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/audit-logs/api-activity`

- Summary: Get API activity logs.
- Controller: `AuditLogController@getAPIActivityLogs`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "endpoint": "sample",
    "method": "sample",
    "status_code": "123456",
    "user_id": 1,
    "start_date": "2026-04-07",
    "end_date": "2026-04-07",
    "per_page": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/audit-logs/export`

- Summary: Export audit logs.
- Controller: `AuditLogController@exportLogs`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "log_type": "admin_actions",
    "start_date": "2026-04-07",
    "end_date": "2026-04-07"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Log export data ready",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/audit-logs/payment`

- Summary: Get payment audit logs.
- Controller: `AuditLogController@getPaymentLogs`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "status": "active",
    "gateway": "sample",
    "start_date": "2026-04-07",
    "end_date": "2026-04-07",
    "per_page": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "reference": "PAY-REF-1001",
        "status": "successful",
        "amount": 1500000
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/audit-logs/verification`

- Summary: Get verification audit logs.
- Controller: `AuditLogController@getVerificationLogs`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "status": "active",
    "start_date": "2026-04-07",
    "end_date": "2026-04-07",
    "per_page": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Auth

### `POST /api/auth/email/verification-notification`

- Summary: Send verification email for /api/auth/email/verification-notification.
- Controller: `AuthController@sendVerificationEmail`
- Middleware: `api, auth:api, throttle:3,1`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "message": "Verification email has been sent to your email address."
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/auth/email/verify/{id}/{hash}`

- Summary: Verify email for /api/auth/email/verify/{id}/{hash}.
- Controller: `AuthController@verifyEmail`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "id": 1,
    "hash": "sample-verification-hash"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Email verified successfully.",
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Email already verified."
}
```

### `POST /api/auth/forgot-password`

- Summary: Forgot password for /api/auth/forgot-password.
- Controller: `AuthController@forgotPassword`
- Middleware: `api, throttle:3,1`
- Auth required: No

**Request Payload Example**

```json
{
    "email": "user@example.com"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Password reset link has been sent to your email address."
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unable to send password reset link. Please try again later."
}
```

### `POST /api/auth/login`

- Summary: Login for /api/auth/login.
- Controller: `AuthController@login`
- Middleware: `api, throttle:5,1`
- Auth required: No

**Request Payload Example**

```json
{
    "email": "user@example.com",
    "password": "Secret123!"
}
```

**Success Response Example**

```json
{
    "success": true,
    "access_token": "jwt-token",
    "token_type": "bearer",
    "expires_in": 3600,
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Invalid credentials"
}
```

### `POST /api/auth/logout`

- Summary: Logout for /api/auth/logout.
- Controller: `AuthController@logout`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "message": "Successfully logged out"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/auth/me`

- Summary: Me for /api/auth/me.
- Controller: `AuthController@me`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/auth/password/reset-with-code`

- Summary: Reset password using verified code.
- Controller: `AuthController@resetPasswordWithCode`
- Middleware: `api, throttle:3,1`
- Auth required: No

**Query Params Example**

```json
{
    "email": "user@example.com"
}
```

**Request Payload Example**

```json
{
    "email": "user@example.com",
    "code": "123456",
    "password": "Secret123!"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Password has been reset successfully."
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Invalid or unverified code. Please verify the code first."
}
```

### `POST /api/auth/password/send-code`

- Summary: Send password reset code to user's email.
- Controller: `AuthController@sendPasswordResetCode`
- Middleware: `api, throttle:3,1`
- Auth required: No

**Query Params Example**

```json
{
    "email": "user@example.com"
}
```

**Request Payload Example**

```json
{
    "email": "user@example.com"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Password reset code has been sent to your email address."
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "We could not find a user with that email address."
}
```

### `POST /api/auth/password/verify-code`

- Summary: Verify the password reset code.
- Controller: `AuthController@verifyPasswordResetCode`
- Middleware: `api, throttle:3,1`
- Auth required: No

**Query Params Example**

```json
{
    "email": "user@example.com"
}
```

**Request Payload Example**

```json
{
    "email": "user@example.com",
    "code": "123456"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Verification code is valid. You can now reset your password."
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Invalid or expired verification code."
}
```

### `POST /api/auth/refresh`

- Summary: Refresh for /api/auth/refresh.
- Controller: `AuthController@refresh`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "access_token": "jwt-token",
    "token_type": "bearer",
    "expires_in": 3600,
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Invalid credentials"
}
```

### `POST /api/auth/register`

- Summary: Register for /api/auth/register.
- Controller: `AuthController@register`
- Middleware: `api, throttle:5,1`
- Auth required: No

**Request Payload Example**

```json
{
    "name": "Sample Name",
    "email": "user@example.com",
    "password": "Secret123!",
    "full_name": "John Doe",
    "phone": "+2348012345678",
    "country": "Nigeria",
    "role_id": 3
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "User registered successfully. Please check your email to verify your account.",
    "access_token": "jwt-token",
    "token_type": "bearer",
    "user": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Validation failed. Please check your input.",
    "errors": {
        "field": [
            "Validation error"
        ]
    }
}
```

### `POST /api/auth/reset-password`

- Summary: Reset password for /api/auth/reset-password.
- Controller: `AuthController@resetPassword`
- Middleware: `api, throttle:3,1`
- Auth required: No

**Request Payload Example**

```json
{
    "email": "user@example.com",
    "token": "sample-token",
    "password": "Secret123!"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Password has been reset successfully."
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Invalid or expired reset token."
}
```

### `POST /api/auth/verify-token`

- Summary: Verify a JWT token.
- Controller: `AuthController@verifyToken`
- Middleware: `api, throttle:10,1`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    },
    "message": "Request completed successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Cms

### `GET /api/cms/help`

- Summary: Get help center articles.
- Controller: `CMSController@getHelpArticles`
- Middleware: `api`
- Auth required: No

**Query Params Example**

```json
{
    "category": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/cms/maintenance-mode`

- Summary: Get maintenance mode status.
- Controller: `CMSController@getMaintenanceMode`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/cms/maintenance-mode`

- Summary: Set maintenance mode (Admin only).
- Controller: `CMSController@setMaintenanceMode`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "enabled": true,
    "message": "Sample message"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Maintenance mode updated",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/cms/pages`

- Summary: Get CMS pages (About, FAQ, Policies, etc.).
- Controller: `CMSController@getPages`
- Middleware: `api`
- Auth required: No

**Query Params Example**

```json
{
    "type": "general"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/cms/pages`

- Summary: Create/Update CMS page (Admin only).
- Controller: `CMSController@createOrUpdatePage`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "title": "Sample Title",
    "slug": "sample-slug",
    "content": "sample",
    "type": "about",
    "is_published": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Page saved successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/cms/pages/{slug}`

- Summary: Get page by slug.
- Controller: `CMSController@getPageBySlug`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "slug": "sample-slug"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Page not found"
}
```

## Conversations

### `GET /api/conversations`

- Summary: List conversations for the authenticated user.
- Controller: `ConversationController@index`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "subject": "Property enquiry",
            "status": "open"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/conversations`

- Summary: Start a conversation (linked to a tenant property request).
- Controller: `ConversationController@store`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "tenant_property_request_id": 1,
    "subject": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Conversation already exists",
    "data": {
        "id": 1,
        "subject": "Property enquiry",
        "status": "open"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/conversations/{conversation}`

- Summary: Show a single conversation (only if user is participant).
- Controller: `ConversationController@show`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "conversation": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "subject": "Property enquiry",
        "status": "open"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/conversations/{conversation}/messages`

- Summary: List messages in a conversation (paginated).
- Controller: `MessageController@index`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "conversation": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "subject": "Property enquiry",
            "status": "open"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/conversations/{conversation}/messages`

- Summary: Send a message in a conversation.
- Controller: `MessageController@store`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "conversation": 1
}
```

**Request Payload Example**

```json
{
    "body": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Message sent",
    "data": {
        "id": 1,
        "subject": "Property enquiry",
        "status": "open"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Dashboard

### `GET /api/dashboard/admin`

- Summary: Get admin dashboard overview.
- Controller: `DashboardController@adminDashboard`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/dashboard/counts`

- Summary: Get counts based on role.
- Controller: `DashboardController@getCountsByRole`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "role": "tenant"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/dashboard/property-stats`

- Summary: Get property statistics.
- Controller: `DashboardController@propertyStats`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "start_date": "2026-04-07",
    "end_date": "2026-04-07"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/dashboard/user`

- Summary: Get user dashboard stats.
- Controller: `DashboardController@userDashboard`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/dashboard/user-activity`

- Summary: Get user activity tracking.
- Controller: `DashboardController@userActivity`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Document Master

### `GET /api/document-master`

- Summary: List records for this endpoint.
- Controller: `DocumentMasterController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Document master list retrieved successfully",
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/document-master`

- Summary: Create a new record for this endpoint.
- Controller: `DocumentMasterController@store`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Request Payload Example**

```json
{
    "doc_name": "Sample Name",
    "is_active": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Document created successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/document-master/{documentMaster}`

- Summary: Delete a record for this endpoint.
- Controller: `DocumentMasterController@destroy`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "documentMaster": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Document deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/document-master/{documentMaster}`

- Summary: Get a single record by identifier.
- Controller: `DocumentMasterController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "documentMaster": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/document-master/{documentMaster}`

- Summary: Update an existing record for this endpoint.
- Controller: `DocumentMasterController@update`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "documentMaster": "@/path/to/file.jpg"
}
```

**Request Payload Example**

```json
{
    "doc_name": "Sample Name",
    "is_active": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Document updated successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Dojah

### `POST /api/dojah/webhook`

- Summary: Handle incoming Dojah webhook events.
- Controller: `DojahWebhookController@handle`
- Middleware: `api, throttle:30,1`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Webhook processed"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Kyc

### `POST /api/kyc/initiate`

- Summary: Get Dojah widget config for the frontend.
- Controller: `KycController@initiate`
- Middleware: `api, auth:api, throttle:10,1`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "message": "KYC already verified",
    "data": {
        "id": 1,
        "status": "approved",
        "verification_type": "bvn"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/kyc/status`

- Summary: Get current user's KYC verification status.
- Controller: `KycController@status`
- Middleware: `api, auth:api, throttle:10,1`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/kyc/verify`

- Summary: Verify identity after widget completion or via direct API call.
- Controller: `KycController@verify`
- Middleware: `api, auth:api, throttle:10,1`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "status": "approved",
        "verification_type": "bvn"
    },
    "message": "Request completed successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Matching

### `GET /api/matching/properties/{propertyId}/price-suggestions`

- Summary: Get price suggestions for a property.
- Controller: `MatchingController@getPriceSuggestions`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/matching/properties/{propertyId}/similar`

- Summary: Get similar properties.
- Controller: `MatchingController@getSimilarProperties`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "propertyId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/matching/recommendations`

- Summary: Get property recommendations for user.
- Controller: `MatchingController@getRecommendations`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/matching/request/{requestId}/properties`

- Summary: Match tenant requests to properties.
- Controller: `MatchingController@matchRequestToProperties`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "requestId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Me

### `GET /api/me`

- Summary: Me for /api/me.
- Controller: `AuthController@me`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## My

### `GET /api/my/leads`

- Summary: My leads for /api/my/leads.
- Controller: `PropertyLeadController@myLeads`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "full_name": "John Doe",
        "status": "new"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/my/property-leads`

- Summary: Owner leads for /api/my/property-leads.
- Controller: `PropertyLeadController@ownerLeads`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    },
    "summary": "sample"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/my/property-leads/{id}`

- Summary: Get a single record by identifier.
- Controller: `PropertyLeadController@show`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    },
    "can_edit": true,
    "is_admin": "sample",
    "is_owner": "sample"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/my/property-leads/{id}/note`

- Summary: Add a note to this resource.
- Controller: `PropertyLeadController@addNote`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "id": 1
}
```

**Query Params Example**

```json
{
    "note": "sample"
}
```

**Request Payload Example**

```json
{
    "note": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `PATCH /api/my/property-leads/{id}/status`

- Summary: Update status information for this resource.
- Controller: `PropertyLeadController@updateStatus`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "id": 1
}
```

**Query Params Example**

```json
{
    "status": "' . implode('",
    "scheduled_visit_at": "2026-04-07T10:00:00Z",
    "discussed_price": 1500000,
    "assigned_to": 1,
    "admin_notes": "sample",
    "note": "sample"
}
```

**Request Payload Example**

```json
{
    "status": "' . implode('",
    "note": "sample",
    "scheduled_visit_at": "2026-04-07T10:00:00Z",
    "discussed_price": 1500000,
    "assigned_to": 1,
    "admin_notes": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Notifications

### `GET /api/notifications`

- Summary: Get user notifications.
- Controller: `NotificationController@index`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "read": "sample",
    "type": "general",
    "per_page": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": "b83f9f2a-1234-4f7f-9a2b-1d8aab89d5ff",
            "title": "System Notification",
            "is_read": false
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/notifications/preferences`

- Summary: Get notification preferences (placeholder - can be extended with a preferences table).
- Controller: `NotificationController@getPreferences`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": "b83f9f2a-1234-4f7f-9a2b-1d8aab89d5ff",
            "title": "System Notification",
            "is_read": false
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `PUT /api/notifications/preferences`

- Summary: Update notification preferences.
- Controller: `NotificationController@updatePreferences`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "email_notifications": "user@example.com",
    "push_notifications": true,
    "property_updates": "2026-04-07",
    "verification_updates": "2026-04-07",
    "payment_updates": "2026-04-07"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Notification preferences updated",
    "data": [
        {
            "id": "b83f9f2a-1234-4f7f-9a2b-1d8aab89d5ff",
            "title": "System Notification",
            "is_read": false
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/notifications/read-all`

- Summary: Mark all notifications as read.
- Controller: `NotificationController@markAllAsRead`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "message": "All notifications marked as read"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/notifications/unread-count`

- Summary: Get unread notifications count.
- Controller: `NotificationController@unreadCount`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": "b83f9f2a-1234-4f7f-9a2b-1d8aab89d5ff",
            "title": "System Notification",
            "is_read": false
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `DELETE /api/notifications/{notificationId}`

- Summary: Delete notification.
- Controller: `NotificationController@destroy`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "notificationId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Notification deleted"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/notifications/{notificationId}/read`

- Summary: Mark notification as read.
- Controller: `NotificationController@markAsRead`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "notificationId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Notification marked as read",
    "data": [
        {
            "id": "b83f9f2a-1234-4f7f-9a2b-1d8aab89d5ff",
            "title": "System Notification",
            "is_read": false
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Payments

### `GET /api/payments`

- Summary: List payments with filters.
- Controller: `PaymentController@index`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "status": "active",
    "gateway": "sample",
    "start_date": "2026-04-07",
    "end_date": "2026-04-07",
    "per_page": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "reference": "PAY-REF-1001",
            "status": "successful",
            "amount": 1500000
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/payments`

- Summary: Create payment.
- Controller: `PaymentController@create`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "subscription_id": 1,
    "property_id": 1,
    "amount": 1500000,
    "currency": "NGN",
    "gateway": "stripe"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Payment created successfully",
    "data": {
        "id": 1,
        "reference": "PAY-REF-1001",
        "status": "successful",
        "amount": 1500000
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/payments/history`

- Summary: Get user payment history.
- Controller: `PaymentController@getHistory`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "reference": "PAY-REF-1001",
            "status": "successful",
            "amount": 1500000
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/payments/initiate`

- Summary: Create payment.
- Controller: `PaymentController@create`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "subscription_id": 1,
    "property_id": 1,
    "amount": 1500000,
    "currency": "NGN",
    "gateway": "stripe"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Payment created successfully",
    "data": {
        "id": 1,
        "reference": "PAY-REF-1001",
        "status": "successful",
        "amount": 1500000
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/payments/stats`

- Summary: Get payment statistics.
- Controller: `PaymentController@getStats`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/payments/webhook`

- Summary: Payment webhook handler for Paystack.
- Controller: `PaymentController@webhook`
- Middleware: `api, throttle:30,1`
- Auth required: No

**Query Params Example**

```json
{
    "event": "sample",
    "data": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Event ignored"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Webhook configuration error"
}
```

### `GET /api/payments/{payment}`

- Summary: Get payment details.
- Controller: `PaymentController@show`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "payment": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "reference": "PAY-REF-1001",
        "status": "successful",
        "amount": 1500000
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized"
}
```

### `PUT /api/payments/{payment}/status`

- Summary: Update payment status.
- Controller: `PaymentController@updateStatus`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "payment": 1
}
```

**Request Payload Example**

```json
{
    "status": "pending",
    "gateway_transaction_id": 1,
    "transaction_reference": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Payment status updated successfully",
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized - Admin access required"
}
```

## Profile

### `GET /api/profile`

- Summary: Get authenticated user's profile.
- Controller: `UserProfileController@getProfile`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `PUT /api/profile`

- Summary: Update user profile.
- Controller: `UserProfileController@updateProfile`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "name": "Sample Name",
    "email": "user@example.com",
    "full_name": "John Doe",
    "phone": "+2348012345678",
    "country": "Nigeria"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Profile updated successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/profile/activity-log`

- Summary: Get user activity log.
- Controller: `UserProfileController@getActivityLog`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/profile/change-password`

- Summary: Change user password.
- Controller: `UserProfileController@changePassword`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "current_password": "Secret123!",
    "password": "Secret123!"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Password changed successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `DELETE /api/profile/picture`

- Summary: Delete profile picture.
- Controller: `UserProfileController@deleteProfilePicture`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "message": "Profile picture deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/profile/upload-picture`

- Summary: Upload profile picture.
- Controller: `UserProfileController@uploadProfilePicture`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "profile_picture": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Profile picture uploaded successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Properties

### `POST /api/properties/compare`

- Summary: Compare properties.
- Controller: `EnhancedPropertyController@compareProperties`
- Middleware: `api`
- Auth required: No

**Request Payload Example**

```json
{
    "property_ids": [
        1,
        2
    ]
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/properties/featured`

- Summary: Get featured/popular properties.
- Controller: `EnhancedPropertyController@getFeatured`
- Middleware: `api`
- Auth required: No

**Query Params Example**

```json
{
    "limit": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/properties/inquiry`

- Summary: Send property inquiry/contact.
- Controller: `EnhancedPropertyController@sendInquiry`
- Middleware: `api`
- Auth required: No

**Request Payload Example**

```json
{
    "property_id": 1,
    "name": "Sample Name",
    "email": "user@example.com",
    "phone": "+2348012345678",
    "message": "Sample message"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Inquiry sent successfully. Property owner will contact you soon."
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/properties/popular`

- Summary: Get popular properties (based on views or requests).
- Controller: `EnhancedPropertyController@getPopular`
- Middleware: `api`
- Auth required: No

**Query Params Example**

```json
{
    "limit": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/properties/recommendations`

- Summary: Get property recommendations for user.
- Controller: `EnhancedPropertyController@getRecommendations`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/properties/saved`

- Summary: Get user's saved/favorite properties.
- Controller: `EnhancedPropertyController@getSavedProperties`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/properties/{propertyId}/save`

- Summary: Save/favorite a property.
- Controller: `EnhancedPropertyController@saveProperty`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "propertyId": 1
}
```

**Request Payload Example**

```json
{
    "property_id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property saved to favorites"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `DELETE /api/properties/{propertyId}/unsave`

- Summary: Remove property from favorites.
- Controller: `EnhancedPropertyController@unsaveProperty`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "propertyId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property removed from favorites"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/properties/{property_id}/lead`

- Summary: Create a new record for this endpoint.
- Controller: `PropertyLeadController@store`
- Middleware: `api, throttle:10,1`
- Auth required: No

**Path Params**

```json
{
    "property_id": 1
}
```

**Request Payload Example**

```json
{
    "full_name": "John Doe",
    "email": "user@example.com",
    "phone": "+2348012345678",
    "interest_type": "rent",
    "budget_range": 1500000,
    "move_in_date": "2026-04-07",
    "message": "Sample message",
    "utm_source": "sample",
    "utm_medium": "sample",
    "utm_campaign": "sample",
    "utm_content": "sample",
    "ref_user_id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Thank you! Your interest has been recorded. We will contact you shortly."
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Property not found or not available."
}
```

### `GET /api/properties/{property_id}/leads`

- Summary: Property leads for /api/properties/{property_id}/leads.
- Controller: `PropertyLeadController@propertyLeads`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "property_id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    },
    "property": "sample",
    "summary": "sample"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Property Categories

### `GET /api/property-categories`

- Summary: List records for this endpoint.
- Controller: `PropertyCategoryController@index`
- Middleware: `api`
- Auth required: No

**Query Params Example**

```json
{
    "propertyTypeId": "general"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property categories fetched successfully",
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/property-categories`

- Summary: Create a new record for this endpoint.
- Controller: `PropertyCategoryController@store`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Request Payload Example**

```json
{
    "type_id": "general",
    "category_name": "Sample Name",
    "is_active": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property category created successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/property-categories/{propertyCategory}`

- Summary: Delete a record for this endpoint.
- Controller: `PropertyCategoryController@destroy`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "propertyCategory": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property category deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/property-categories/{propertyCategory}`

- Summary: Get a single record by identifier.
- Controller: `PropertyCategoryController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyCategory": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/property-categories/{propertyCategory}`

- Summary: Update an existing record for this endpoint.
- Controller: `PropertyCategoryController@update`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "propertyCategory": 1
}
```

**Request Payload Example**

```json
{
    "type_id": "general",
    "category_name": "Sample Name",
    "is_active": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property category updated successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Property Data

### `GET /api/property-data`

- Summary: List all properties with brief related data.
- Controller: `PropertyDataController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Property listings",
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/property-data`

- Summary: Store a new property.
- Controller: `PropertyDataController@store`
- Middleware: `api, auth:api, document.verified`
- Auth required: Yes

**Query Params Example**

```json
{
    "prop_address": "12 Admiralty Way, Lekki, Lagos",
    "prop_bedrooms": "sample",
    "prop_bathrooms": "sample",
    "prop_toilets": "sample",
    "prop_parking": "sample",
    "prop_areaSize": "sample",
    "prop_areaType": "general",
    "prop_desc": "sample",
    "prop_denomination": "sample",
    "amenities": [
        1,
        2
    ],
    "rule_ids": [
        1,
        2
    ]
}
```

**Request Payload Example**

```json
{
    "created_by": "sample",
    "title": "Sample Title",
    "purpose": "rent",
    "state_id": 1,
    "area_id": 1,
    "address": "12 Admiralty Way, Lekki, Lagos",
    "property_type_id": "general",
    "property_category_id": 1,
    "price": 1500000,
    "currency": "NGN",
    "bedrooms": 1,
    "bathrooms": 1,
    "toilets": 1,
    "parking": 1,
    "area_size": 1,
    "area_type": "sqft",
    "description": "Sample description",
    "denomination": "yearly",
    "listing_status": "draft",
    "amenities": [
        1,
        2
    ],
    "rule_ids": [
        1,
        2
    ]
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property created successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/property-data/agent/{agentId?}`

- Summary: Get properties by agent.
- Controller: `PropertyDataController@getByAgent`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "agentId": 1
}
```

**Query Params Example**

```json
{
    "agent_id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Agent properties retrieved successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Agent ID is required"
}
```

### `PUT /api/property-data/approve/{propertyData}`

- Summary: Approve for /api/property-data/approve/{propertyData}.
- Controller: `PropertyDataController@approve`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "propertyData": 1
}
```

**Request Payload Example**

```json
{
    "note": "Reviewed by admin"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property approved successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized to approve properties"
}
```

### `GET /api/property-data/owner/{userId?}`

- Summary: Get properties by owner.
- Controller: `PropertyDataController@getByOwner`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "userId": 1
}
```

**Query Params Example**

```json
{
    "user_id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Properties retrieved successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "User ID is required"
}
```

### `PUT /api/property-data/reject/{propertyData}`

- Summary: Reject a property listing.
- Controller: `PropertyDataController@reject`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "propertyData": 1
}
```

**Request Payload Example**

```json
{
    "note": "Reviewed by admin"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property rejected successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Property is already suspended"
}
```

### `DELETE /api/property-data/{propertyData}`

- Summary: Delete a property.
- Controller: `PropertyDataController@destroy`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "propertyData": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property deleted"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/property-data/{propertyData}`

- Summary: Show a single property.
- Controller: `PropertyDataController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyData": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/property-data/{propertyData}`

- Summary: Update an existing property.
- Controller: `PropertyDataController@update`
- Middleware: `api, auth:api, document.verified`
- Auth required: Yes

**Path Params**

```json
{
    "propertyData": 1
}
```

**Query Params Example**

```json
{
    "prop_address": "12 Admiralty Way, Lekki, Lagos",
    "prop_bedrooms": "sample",
    "prop_bathrooms": "sample",
    "prop_toilets": "sample",
    "prop_parking": "sample",
    "prop_areaSize": "sample",
    "prop_areaType": "general",
    "prop_desc": "sample",
    "prop_denomination": "sample",
    "amenities": [
        1,
        2
    ],
    "rule_ids": [
        1,
        2
    ]
}
```

**Request Payload Example**

```json
{
    "title": "Sample Title",
    "purpose": "rent",
    "state_id": 1,
    "area_id": 1,
    "address": "12 Admiralty Way, Lekki, Lagos",
    "property_type_id": "general",
    "property_category_id": 1,
    "price": 1500000,
    "currency": "NGN",
    "bedrooms": 1,
    "bathrooms": 1,
    "toilets": 1,
    "parking": 1,
    "area_size": 1,
    "area_type": "sqft",
    "description": "Sample description",
    "denomination": "yearly",
    "listing_status": "draft",
    "is_verified": true,
    "amenities": [
        1,
        2
    ],
    "rule_ids": [
        1,
        2
    ]
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property updated successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Property Features

### `GET /api/property-features`

- Summary: List records for this endpoint.
- Controller: `PropertyFeatureController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Property features list retrieved successfully",
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/property-features`

- Summary: Create a new record for this endpoint.
- Controller: `PropertyFeatureController@store`
- Middleware: `api`
- Auth required: No

**Request Payload Example**

```json
{
    "property_id": 1,
    "feature_id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property feature created successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Feature already assigned to property",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

### `DELETE /api/property-features/{propertyFeature}`

- Summary: Delete a record for this endpoint.
- Controller: `PropertyFeatureController@destroy`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyFeature": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property feature deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/property-features/{propertyFeature}`

- Summary: Get a single record by identifier.
- Controller: `PropertyFeatureController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyFeature": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/property-features/{propertyFeature}`

- Summary: Update an existing record for this endpoint.
- Controller: `PropertyFeatureController@update`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyFeature": 1
}
```

**Request Payload Example**

```json
{
    "property_id": 1,
    "feature_id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property feature updated successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Feature already assigned to property",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

## Property Features Master

### `GET /api/property-features-master`

- Summary: List records for this endpoint.
- Controller: `PropertyFeatureMasterController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Property features master list retrieved successfully",
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/property-features-master`

- Summary: Create a new record for this endpoint.
- Controller: `PropertyFeatureMasterController@store`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Request Payload Example**

```json
{
    "feature_name": "Sample Name",
    "feature_slug": "sample-slug",
    "is_active": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Feature master created successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/property-features-master/{propertyFeatureMaster}`

- Summary: Delete a record for this endpoint.
- Controller: `PropertyFeatureMasterController@destroy`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "propertyFeatureMaster": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Feature master deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/property-features-master/{propertyFeatureMaster}`

- Summary: Get a single record by identifier.
- Controller: `PropertyFeatureMasterController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyFeatureMaster": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/property-features-master/{propertyFeatureMaster}`

- Summary: Update an existing record for this endpoint.
- Controller: `PropertyFeatureMasterController@update`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "propertyFeatureMaster": 1
}
```

**Request Payload Example**

```json
{
    "feature_name": "Sample Name",
    "feature_slug": "sample-slug",
    "is_active": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Feature master updated successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Property Images

### `GET /api/property-images`

- Summary: Display a listing of the property images.
- Controller: `PropertyImageController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Property images list retrieved successfully",
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/property-images`

- Summary: Store a newly created property image in storage.
- Controller: `PropertyImageController@store`
- Middleware: `api`
- Auth required: No

**Request Payload Example**

```json
{
    "property_id": 1,
    "images": "@/path/to/file.jpg",
    "image": "@/path/to/file.jpg",
    "image_path": "@/path/to/file.jpg",
    "image_type": "@/path/to/file.jpg",
    "sort_order": "sample",
    "is_active": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property images created successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/property-images/{propertyImage}`

- Summary: Remove the specified property image from storage.
- Controller: `PropertyImageController@destroy`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyImage": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property image deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/property-images/{propertyImage}`

- Summary: Display the specified property image.
- Controller: `PropertyImageController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyImage": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/property-images/{propertyImage}`

- Summary: Update the specified property image in storage.
- Controller: `PropertyImageController@update`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyImage": "@/path/to/file.jpg"
}
```

**Request Payload Example**

```json
{
    "property_id": 1,
    "image": "@/path/to/file.jpg",
    "image_path": "@/path/to/file.jpg",
    "image_type": "@/path/to/file.jpg",
    "sort_order": 1,
    "is_active": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property image updated successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Property Meta

### `GET /api/property-meta`

- Summary: Display a listing of the property metas.
- Controller: `PropertyMetaController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Property meta list retrieved successfully",
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/property-meta`

- Summary: Store a newly created property meta in storage.
- Controller: `PropertyMetaController@store`
- Middleware: `api`
- Auth required: No

**Request Payload Example**

```json
{
    "property_id": 1,
    "meta_key": "sample",
    "meta_value": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property meta created successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/property-meta/{propertyMeta}`

- Summary: Remove the specified property meta from storage.
- Controller: `PropertyMetaController@destroy`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyMeta": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property meta deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/property-meta/{propertyMeta}`

- Summary: Display the specified property meta.
- Controller: `PropertyMetaController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyMeta": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/property-meta/{propertyMeta}`

- Summary: Update the specified property meta in storage.
- Controller: `PropertyMetaController@update`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyMeta": 1
}
```

**Request Payload Example**

```json
{
    "property_id": 1,
    "meta_key": "sample",
    "meta_value": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property meta updated successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Property Requests

### `GET /api/property-requests`

- Summary: Display a listing of property requests.
- Controller: `TenantPropertyRequestController@index`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "request_type": "general",
    "status": "active",
    "state_id": 1,
    "area_id": 1,
    "budget_min": 1500000,
    "budget_max": 1500000,
    "property_id": 1,
    "search": "lekki"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property requests retrieved successfully",
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/property-requests`

- Summary: Store a newly created property request.
- Controller: `TenantPropertyRequestController@store`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "property_id": 1,
    "request_type": "rent",
    "state_id": 1,
    "area_id": 1,
    "budget_min": 1500000,
    "budget_max": 1500000,
    "move_in_date": "2026-04-07",
    "move_out_date": "2026-04-07",
    "notes": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property request created successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated user"
}
```

### `DELETE /api/property-requests/{tenantPropertyRequest}`

- Summary: Remove the specified property request (cancel it).
- Controller: `TenantPropertyRequestController@destroy`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "tenantPropertyRequest": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property request cancelled successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized to cancel this request"
}
```

### `GET /api/property-requests/{tenantPropertyRequest}`

- Summary: Display the specified property request.
- Controller: `TenantPropertyRequestController@show`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "tenantPropertyRequest": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized to view this request"
}
```

### `PUT /api/property-requests/{tenantPropertyRequest}`

- Summary: Update the specified property request.
- Controller: `TenantPropertyRequestController@update`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "tenantPropertyRequest": 1
}
```

**Request Payload Example**

```json
{
    "property_id": 1,
    "request_type": "rent",
    "state_id": 1,
    "area_id": 1,
    "budget_min": 1500000,
    "budget_max": 1500000,
    "move_in_date": "2026-04-07",
    "move_out_date": "2026-04-07",
    "notes": "sample",
    "status": "new"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property request updated successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized to update this request"
}
```

### `PUT /api/property-requests/{tenantPropertyRequest}/match`

- Summary: Match a property request with a specific property.
- Controller: `TenantPropertyRequestController@matchProperty`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "tenantPropertyRequest": 1
}
```

**Request Payload Example**

```json
{
    "property_id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property matched successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized to match properties"
}
```

### `PUT /api/property-requests/{tenantPropertyRequest}/status`

- Summary: Update the status of a property request.
- Controller: `TenantPropertyRequestController@updateStatus`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "tenantPropertyRequest": 1
}
```

**Request Payload Example**

```json
{
    "status": "new",
    "notes": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Request status updated successfully",
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized to update request status"
}
```

## Property Rules

### `GET /api/property-rules`

- Summary: Display a listing of the property rules.
- Controller: `PropertyRuleController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Property rules retrieved successfully",
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/property-rules`

- Summary: Store a newly created property rule in storage.
- Controller: `PropertyRuleController@store`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Request Payload Example**

```json
{
    "rule_name": "Sample Name",
    "rule_description": "Sample description",
    "rule_icon": "sample",
    "is_active": true,
    "created_by": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property rule created successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/property-rules/{propertyRule}`

- Summary: Remove the specified property rule from storage.
- Controller: `PropertyRuleController@destroy`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "propertyRule": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property rule deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/property-rules/{propertyRule}`

- Summary: Display the specified property rule.
- Controller: `PropertyRuleController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyRule": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/property-rules/{propertyRule}`

- Summary: Update the specified property rule in storage.
- Controller: `PropertyRuleController@update`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "propertyRule": 1
}
```

**Request Payload Example**

```json
{
    "rule_name": "Sample Name",
    "rule_description": "Sample description",
    "rule_icon": "sample",
    "is_active": true,
    "updated_by": "2026-04-07"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property rule updated successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Property Search

### `GET /api/property-search`

- Summary: Search records exposed by this endpoint.
- Controller: `PropertyDataController@search`
- Middleware: `api`
- Auth required: No

**Query Params Example**

```json
{
    "purpose": "rent",
    "q": "sample",
    "min_price": 1500000,
    "max_price": 1500000
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property search results",
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Property Types

### `GET /api/property-types`

- Summary: List records for this endpoint.
- Controller: `PropertyTypeController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Property types retrieved successfully",
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/property-types`

- Summary: Create a new record for this endpoint.
- Controller: `PropertyTypeController@store`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Request Payload Example**

```json
{
    "type_name": "Sample Name",
    "icon_name": "Sample Name",
    "is_active": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property type created successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/property-types/{propertyType}`

- Summary: Delete a record for this endpoint.
- Controller: `PropertyTypeController@destroy`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "propertyType": "general"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property type deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/property-types/{propertyType}`

- Summary: Get a single record by identifier.
- Controller: `PropertyTypeController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "propertyType": "general"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/property-types/{propertyType}`

- Summary: Update an existing record for this endpoint.
- Controller: `PropertyTypeController@update`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "propertyType": "general"
}
```

**Request Payload Example**

```json
{
    "type_name": "Sample Name",
    "icon_name": "Sample Name",
    "is_active": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property type updated successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Property Verification

### `GET /api/property-verification`

- Summary: List verification requests.
- Controller: `PropertyVerificationController@index`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "status": "active",
    "property_id": 1,
    "landlord_id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/property-verification/property/{propertyId}/history`

- Summary: Get verification history for a property.
- Controller: `PropertyVerificationController@getPropertyHistory`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "propertyId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/property-verification/request`

- Summary: Create a verification request.
- Controller: `PropertyVerificationController@createRequest`
- Middleware: `api, auth:api, document.verified`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    },
    "message": "Request completed successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/property-verification/{propertyVerificationRequest}`

- Summary: Get verification request details.
- Controller: `PropertyVerificationController@show`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "propertyVerificationRequest": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/property-verification/{propertyVerificationRequest}/approve`

- Summary: Approve verification request.
- Controller: `PropertyVerificationController@approve`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "propertyVerificationRequest": 1
}
```

**Query Params Example**

```json
{
    "remarks": "sample"
}
```

**Request Payload Example**

```json
{
    "note": "Reviewed by admin"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Verification request approved successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/property-verification/{propertyVerificationRequest}/reject`

- Summary: Reject verification request.
- Controller: `PropertyVerificationController@reject`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "propertyVerificationRequest": 1
}
```

**Request Payload Example**

```json
{
    "remarks": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Verification request rejected",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `PUT /api/property-verification/{propertyVerificationRequest}/status`

- Summary: Update verification request status.
- Controller: `PropertyVerificationController@updateStatus`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "propertyVerificationRequest": 1
}
```

**Request Payload Example**

```json
{
    "status": "pending",
    "remarks": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Verification status updated successfully",
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Required Documents

### `GET /api/required-documents`

- Summary: Display a listing of required documents.
- Controller: `RequiredDocumentController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/required-documents`

- Summary: Store a newly created required document.
- Controller: `RequiredDocumentController@store`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "role": "tenant",
    "document_type": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Required document created successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/required-documents/{requiredDocument}`

- Summary: Remove the specified required document.
- Controller: `RequiredDocumentController@destroy`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "requiredDocument": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Required document deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/required-documents/{requiredDocument}`

- Summary: Display the specified required document.
- Controller: `RequiredDocumentController@show`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "requiredDocument": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/required-documents/{requiredDocument}`

- Summary: Update the specified required document.
- Controller: `RequiredDocumentController@update`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "requiredDocument": "@/path/to/file.jpg"
}
```

**Request Payload Example**

```json
{
    "role": "tenant",
    "document_type": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Required document updated successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Revenue

### `GET /api/revenue`

- Summary: Get revenue ledger entries.
- Controller: `RevenueLedgerController@index`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "type": "general",
    "start_date": "2026-04-07",
    "end_date": "2026-04-07",
    "per_page": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/revenue/export`

- Summary: Export revenue data (CSV format).
- Controller: `RevenueLedgerController@export`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "start_date": "2026-04-07",
    "end_date": "2026-04-07"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Export data ready",
    "data": {
        "id": 1,
        "name": "Sample Item"
    },
    "format": "csv"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/revenue/platform-summary`

- Summary: Get platform revenue summary.
- Controller: `RevenueLedgerController@getPlatformSummary`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "start_date": "2026-04-07",
    "end_date": "2026-04-07"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/revenue/reports/daily`

- Summary: Get daily revenue report.
- Controller: `RevenueLedgerController@getDailyReport`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "start_date": "2026-04-07",
    "end_date": "2026-04-07"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/revenue/reports/monthly`

- Summary: Get monthly revenue report.
- Controller: `RevenueLedgerController@getMonthlyReport`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "start_date": "2026-04-07",
    "end_date": "2026-04-07"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/revenue/reports/yearly`

- Summary: Get yearly revenue report.
- Controller: `RevenueLedgerController@getYearlyReport`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "start_year": "sample",
    "end_year": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/revenue/user/{userId}`

- Summary: Get revenue by user.
- Controller: `RevenueLedgerController@getByUser`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "userId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Roles

### `GET /api/roles`

- Summary: Display a listing of the roles.
- Controller: `RoleController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Roles retrieved successfully",
    "data": [
        {
            "id": 3,
            "name": "Tenant"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/roles`

- Summary: Store a newly created role in storage.
- Controller: `RoleController@store`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Request Payload Example**

```json
{
    "name": "Sample Name",
    "description": "Sample description"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Role created successfully",
    "data": {
        "id": 3,
        "name": "Tenant"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/roles/assign`

- Summary: Assign role to user.
- Controller: `RolePermissionController@assignRole`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "user_id": 1,
    "role_id": 3
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Role assigned successfully",
    "data": {
        "id": 3,
        "name": "Tenant"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "User already has this role"
}
```

### `POST /api/roles/check`

- Summary: Check if user has specific role.
- Controller: `RolePermissionController@checkRole`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "user_id": 1,
    "role_id": 3
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 3,
        "name": "Tenant"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/roles/remove`

- Summary: Remove role from user.
- Controller: `RolePermissionController@removeRole`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "user_id": 1,
    "role_id": 3
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Role removed successfully",
    "data": {
        "id": 3,
        "name": "Tenant"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "User does not have this role"
}
```

### `PUT /api/roles/update-user-roles`

- Summary: Update user roles (replace all roles).
- Controller: `RolePermissionController@updateUserRoles`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "user_id": 1,
    "role_ids": 3
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "User roles updated successfully",
    "data": {
        "id": 3,
        "name": "Tenant"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/roles/user/{userId}`

- Summary: Get user roles.
- Controller: `RolePermissionController@getUserRoles`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "userId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 3,
        "name": "Tenant"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/roles/{roleId}/users`

- Summary: Get users by role.
- Controller: `RolePermissionController@getUsersByRole`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "roleId": "tenant"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 3,
        "name": "Tenant"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/roles/{role}`

- Summary: Remove the specified role from storage.
- Controller: `RoleController@destroy`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "role": "tenant"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Role deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/roles/{role}`

- Summary: Display the specified role.
- Controller: `RoleController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "role": "tenant"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 3,
        "name": "Tenant"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/roles/{role}`

- Summary: Update the specified role in storage.
- Controller: `RoleController@update`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "role": "tenant"
}
```

**Request Payload Example**

```json
{
    "name": "Sample Name",
    "description": "Sample description",
    "is_active": true
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Role updated successfully",
    "data": {
        "id": 3,
        "name": "Tenant"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Search

### `GET /api/search/advanced`

- Summary: Advanced multi-filter property search.
- Controller: `AdvancedSearchController@search`
- Middleware: `api`
- Auth required: No

**Query Params Example**

```json
{
    "purpose": "rent",
    "property_type_id": "general",
    "property_category_id": 1,
    "state_id": 1,
    "city_id": 1,
    "area_id": 1,
    "location": "sample",
    "keyword": "sample",
    "bedrooms": "sample",
    "bathrooms": "sample",
    "min_price": 1500000,
    "max_price": 1500000,
    "advanced_price_min": 1500000,
    "advanced_price_max": 1500000,
    "min_area": "sample",
    "max_area": "sample",
    "currency": "NGN",
    "amenities": "sample",
    "meta_filters": "sample",
    "sort_by": "sample",
    "sort_order": "sample",
    "per_page": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/search/location`

- Summary: Location-based search (radius search).
- Controller: `AdvancedSearchController@locationSearch`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/search/save`

- Summary: Save search criteria.
- Controller: `AdvancedSearchController@saveSearch`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "search_name": "Sample Name",
    "search_criteria": "lekki"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Search saved successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/search/saved`

- Summary: Get saved searches.
- Controller: `AdvancedSearchController@getSavedSearches`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "Sample Item"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `DELETE /api/search/saved/{searchId}`

- Summary: Delete saved search.
- Controller: `AdvancedSearchController@deleteSavedSearch`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "searchId": "lekki"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Saved search deleted"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Settings

### `GET /api/settings`

- Summary: Get platform settings.
- Controller: `SettingsController@getSettings`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/settings`

- Summary: Update platform settings (Admin only).
- Controller: `SettingsController@updateSettings`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "platform_fee_percentage": 1500000,
    "platform_fee_fixed": 1500000,
    "currency": "NGN",
    "max_properties_per_user": 1,
    "max_images_per_property": "@/path/to/file.jpg",
    "verification_required": true,
    "auto_approve_properties": true,
    "features": [
        1,
        2
    ]
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Settings updated successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/settings/feature-toggles`

- Summary: Get feature toggles.
- Controller: `SettingsController@getFeatureToggles`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/settings/feature-toggles`

- Summary: Update feature toggles (Admin only).
- Controller: `SettingsController@updateFeatureToggles`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "features": [
        1,
        2
    ]
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Feature toggles updated successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/settings/limits`

- Summary: Get limits and rules.
- Controller: `SettingsController@getLimitsAndRules`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/settings/limits`

- Summary: Update limits and rules (Admin only).
- Controller: `SettingsController@updateLimitsAndRules`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "limits": [
        1,
        2
    ]
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Limits and rules updated successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/settings/platform-fees`

- Summary: Get platform fees configuration.
- Controller: `SettingsController@getPlatformFees`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/settings/platform-fees`

- Summary: Update platform fees (Admin only).
- Controller: `SettingsController@updatePlatformFees`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "platform_fee_percentage": 1500000,
    "platform_fee_fixed": 1500000,
    "fee_structure": [
        1,
        2
    ]
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Platform fees updated successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## States

### `GET /api/states`

- Summary: Display a listing of the states.
- Controller: `StateController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "States retrieved successfully",
    "data": [
        {
            "id": 1,
            "name": "Lagos"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/states`

- Summary: Store a newly created state in storage.
- Controller: `StateController@store`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Request Payload Example**

```json
{
    "name": "Sample Name"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "State created successfully",
    "data": {
        "id": 1,
        "name": "Lagos"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/states/{state}`

- Summary: Remove the specified state from storage.
- Controller: `StateController@destroy`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "state": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "State deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/states/{state}`

- Summary: Display the specified state.
- Controller: `StateController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "state": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Lagos"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/states/{state}`

- Summary: Update the specified state in storage.
- Controller: `StateController@update`
- Middleware: `api, auth:api, role:admin,super_admin`
- Auth required: Yes

**Path Params**

```json
{
    "state": 1
}
```

**Request Payload Example**

```json
{
    "name": "Sample Name"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "State updated successfully",
    "data": {
        "id": 1,
        "name": "Lagos"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Subscriptions

### `GET /api/subscriptions/active`

- Summary: Get user's active subscription.
- Controller: `SubscriptionController@getActiveSubscription`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "status": "active",
        "plan_name": "Premium Plan"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/subscriptions/history`

- Summary: Get subscription history.
- Controller: `SubscriptionController@getHistory`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "status": "active",
            "plan_name": "Premium Plan"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/subscriptions/plans`

- Summary: List all pricing plans.
- Controller: `SubscriptionController@listPlans`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "status": "active",
            "plan_name": "Premium Plan"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/subscriptions/plans/{pricingPlan}`

- Summary: Get plan details.
- Controller: `SubscriptionController@getPlan`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "pricingPlan": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "status": "active",
            "plan_name": "Premium Plan"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/subscriptions/status`

- Summary: Check subscription status.
- Controller: `SubscriptionController@checkStatus`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/subscriptions/subscribe`

- Summary: Subscribe to a plan.
- Controller: `SubscriptionController@subscribe`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "plan_id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Subscription created. Please complete payment to activate.",
    "data": {
        "id": 1,
        "status": "active",
        "plan_name": "Premium Plan"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/subscriptions/{subscriptionId}/cancel`

- Summary: Cancel subscription.
- Controller: `SubscriptionController@cancel`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "subscriptionId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Subscription cancelled successfully",
    "data": {
        "id": 1,
        "status": "active",
        "plan_name": "Premium Plan"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/subscriptions/{subscriptionId}/renew`

- Summary: Renew subscription.
- Controller: `SubscriptionController@renew`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "subscriptionId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Subscription renewed. Please complete payment to activate.",
    "data": {
        "id": 1,
        "status": "active",
        "plan_name": "Premium Plan"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Tenant

### `GET /api/tenant/dashboard-stats/{userId}`

- Summary: Get dashboard enquiry counts for the authenticated tenant.
- Controller: `Closure`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "userId": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "totalEnquiries": 12,
        "pendingEnquiries": 4,
        "activeEnquiries": 3
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized"
}
```

### `GET /api/tenant/enquiries`

- Summary: List tenant enquiries for the authenticated user.
- Controller: `Closure`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "status": "new",
    "limit": 20
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "status": "new",
            "budget_min": 500000,
            "budget_max": 1200000
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/tenant/notifications`

- Summary: List tenant notifications for the authenticated user.
- Controller: `Closure`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "limit": 20
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": "b83f9f2a-1234-4f7f-9a2b-1d8aab89d5ff",
            "title": "Lead Update",
            "message": "Your property lead has been contacted.",
            "type": "system_alert",
            "is_read": false,
            "created_at": "2026-04-07T10:30:00Z"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

## Tenant Property Requests

### `GET /api/tenant-property-requests`

- Summary: Display a listing of property requests.
- Controller: `TenantPropertyRequestController@index`
- Middleware: `api, auth:api`
- Auth required: Yes

**Query Params Example**

```json
{
    "request_type": "general",
    "status": "active",
    "state_id": 1,
    "area_id": 1,
    "budget_min": 1500000,
    "budget_max": 1500000,
    "property_id": 1,
    "search": "lekki"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property requests retrieved successfully",
    "data": [
        {
            "id": 1,
            "title": "3 Bedroom Apartment",
            "status": "published"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/tenant-property-requests`

- Summary: Store a newly created property request.
- Controller: `TenantPropertyRequestController@store`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "property_id": 1,
    "request_type": "rent",
    "state_id": 1,
    "area_id": 1,
    "budget_min": 1500000,
    "budget_max": 1500000,
    "move_in_date": "2026-04-07",
    "move_out_date": "2026-04-07",
    "notes": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property request created successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated user"
}
```

### `DELETE /api/tenant-property-requests/{tenantPropertyRequest}`

- Summary: Remove the specified property request (cancel it).
- Controller: `TenantPropertyRequestController@destroy`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "tenantPropertyRequest": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property request cancelled successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized to cancel this request"
}
```

### `GET /api/tenant-property-requests/{tenantPropertyRequest}`

- Summary: Display the specified property request.
- Controller: `TenantPropertyRequestController@show`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "tenantPropertyRequest": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized to view this request"
}
```

### `PUT /api/tenant-property-requests/{tenantPropertyRequest}`

- Summary: Update the specified property request.
- Controller: `TenantPropertyRequestController@update`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "tenantPropertyRequest": 1
}
```

**Request Payload Example**

```json
{
    "property_id": 1,
    "request_type": "rent",
    "state_id": 1,
    "area_id": 1,
    "budget_min": 1500000,
    "budget_max": 1500000,
    "move_in_date": "2026-04-07",
    "move_out_date": "2026-04-07",
    "notes": "sample",
    "status": "new"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property request updated successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized to update this request"
}
```

### `POST /api/tenant-property-requests/{tenantPropertyRequest}/match`

- Summary: Match a property request with a specific property.
- Controller: `TenantPropertyRequestController@matchProperty`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "tenantPropertyRequest": 1
}
```

**Request Payload Example**

```json
{
    "property_id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property matched successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized to match properties"
}
```

### `POST /api/tenant-property-requests/{tenantPropertyRequest}/status`

- Summary: Update the status of a property request.
- Controller: `TenantPropertyRequestController@updateStatus`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "tenantPropertyRequest": 1
}
```

**Request Payload Example**

```json
{
    "status": "new",
    "notes": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Request status updated successfully",
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthorized to update request status"
}
```

## Upload

### `POST /api/upload/document`

- Summary: Upload documents (for verification, etc.).
- Controller: `FileUploadController@uploadDocument`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "document_type": "@/path/to/file.jpg",
    "file": "@/path/to/file.jpg",
    "// 10MB max\r\n            'related_id": 1,
    "etc.\r\n            'description": "Sample description"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Document uploaded successfully",
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `DELETE /api/upload/file`

- Summary: Delete a file.
- Controller: `FileUploadController@deleteFile`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "message": "Request completed successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/upload/file-url`

- Summary: Get file URL.
- Controller: `FileUploadController@getFileUrl`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "Sample Item"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "File not found"
}
```

### `POST /api/upload/property-image`

- Summary: Upload property images.
- Controller: `FileUploadController@uploadPropertyImage`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "property_id": 1,
    "image": "@/path/to/file.jpg",
    "// 5MB max\r\n            'image_type": "@/path/to/file.jpg",
    "sort_order": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Property image uploaded successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/upload/property-images`

- Summary: Upload multiple property images.
- Controller: `FileUploadController@uploadMultiplePropertyImages`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "property_id": 1,
    "images": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Request completed successfully",
    "data": {
        "id": 1,
        "title": "3 Bedroom Apartment",
        "status": "published"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## User Documents

### `GET /api/user-documents`

- Summary: Get all documents for the authenticated user.
- Controller: `UserDocumentController@index`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": [
        {
            "id": 1,
            "name": "John Doe",
            "email": "user@example.com"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/user-documents/upload`

- Summary: Upload a document for the authenticated user.
- Controller: `UserDocumentController@upload`
- Middleware: `api, auth:api`
- Auth required: Yes

**Request Payload Example**

```json
{
    "document_type": "@/path/to/file.jpg",
    "document_number": "@/path/to/file.jpg",
    "file": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Document uploaded successfully",
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/user-documents/verification/status`

- Summary: Get verification status for the authenticated user.
- Controller: `UserDocumentController@verificationStatus`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "total": 10,
        "active": 7,
        "pending": 2,
        "failed": 1
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `DELETE /api/user-documents/{userDocument}`

- Summary: Delete a document.
- Controller: `UserDocumentController@destroy`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "userDocument": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Document deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `GET /api/user-documents/{userDocument}`

- Summary: Get a specific document.
- Controller: `UserDocumentController@show`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "userDocument": "@/path/to/file.jpg"
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Unauthenticated"
}
```

### `POST /api/user-documents/{userDocument}/approve`

- Summary: Admin: Approve a document.
- Controller: `UserDocumentController@approve`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "userDocument": "@/path/to/file.jpg"
}
```

**Request Payload Example**

```json
{
    "remarks": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Document approved successfully",
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/user-documents/{userDocument}/reject`

- Summary: Admin: Reject a document.
- Controller: `UserDocumentController@reject`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "userDocument": "@/path/to/file.jpg"
}
```

**Request Payload Example**

```json
{
    "remarks": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Document rejected successfully",
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Userdata

### `GET /api/userdata/userid/{id}`

- Summary: Store a newly created user data in storage.
- Controller: `UserDataController@getByUserId`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "id": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "User data retrieved successfully",
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "User data not found for the given user ID",
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

## Users Data

### `GET /api/users-data`

- Summary: Display a listing of the users data.
- Controller: `UserDataController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Users data retrieved successfully",
    "data": [
        {
            "id": 1,
            "name": "John Doe",
            "email": "user@example.com"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "No users data available",
    "data": [
        {
            "id": 1,
            "name": "John Doe",
            "email": "user@example.com"
        }
    ]
}
```

### `POST /api/users-data`

- Summary: Store
- Controller: `UserDataController@store`
- Middleware: `api, auth:api`
- Auth required: Yes

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    },
    "message": "Request completed successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/users-data/role/{roleId}`

- Summary: Display users by role id.
- Controller: `UserDataController@byRole`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "roleId": "tenant"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "Users for role retrieved successfully",
    "data": {
        "id": 3,
        "name": "Tenant"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "No users for this role",
    "data": {
        "id": 3,
        "name": "Tenant"
    }
}
```

### `DELETE /api/users-data/{userData}`

- Summary: Remove the specified user data from storage.
- Controller: `UserDataController@destroy`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "userData": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "User data deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/users-data/{userData}`

- Summary: Display the specified user data.
- Controller: `UserDataController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "userData": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/users-data/{userData}`

- Summary: Update the specified user data in storage.
- Controller: `UserDataController@update`
- Middleware: `api, auth:api`
- Auth required: Yes

**Path Params**

```json
{
    "userData": 1
}
```

**Request Payload Example**

```json
{
    "full_name": "John Doe",
    "email": "user@example.com",
    "phone": "+2348012345678",
    "country": "Nigeria",
    "role_id": 3,
    "status": "active",
    "password": "Secret123!"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "User data updated successfully",
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

## Users Meta

### `GET /api/users-meta`

- Summary: Display a listing of the users meta.
- Controller: `UserMetaController@index`
- Middleware: `api`
- Auth required: No

**Success Response Example**

```json
{
    "success": true,
    "message": "Users meta data retrieved successfully",
    "data": [
        {
            "id": 1,
            "name": "John Doe",
            "email": "user@example.com"
        }
    ]
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `POST /api/users-meta`

- Summary: Store a newly created user meta in storage.
- Controller: `UserMetaController@store`
- Middleware: `api`
- Auth required: No

**Request Payload Example**

```json
{
    "user_id": 1,
    "meta_key": "sample",
    "meta_value": "sample",
    "meta_group": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "User meta created successfully",
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    },
    "message": "Meta key already exists for this user and group."
}
```

### `DELETE /api/users-meta/{userMeta}`

- Summary: Remove the specified user meta from storage.
- Controller: `UserMetaController@destroy`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "userMeta": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "User meta deleted successfully"
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `GET /api/users-meta/{userMeta}`

- Summary: Display the specified user meta.
- Controller: `UserMetaController@show`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "userMeta": 1
}
```

**Success Response Example**

```json
{
    "success": true,
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

### `PUT /api/users-meta/{userMeta}`

- Summary: Update the specified user meta in storage.
- Controller: `UserMetaController@update`
- Middleware: `api`
- Auth required: No

**Path Params**

```json
{
    "userMeta": 1
}
```

**Request Payload Example**

```json
{
    "user_id": 1,
    "meta_key": "sample",
    "meta_value": "sample",
    "meta_group": "sample"
}
```

**Success Response Example**

```json
{
    "success": true,
    "message": "User meta updated successfully",
    "data": {
        "id": 1,
        "name": "John Doe",
        "email": "user@example.com"
    }
}
```

**Error Response Example**

```json
{
    "success": false,
    "message": "Request failed"
}
```

