EstateHub

Administrator KYC Management API

Base URL: http://localhost:8000/api/v1
Prefix: /accounts/admins
Auth: Required admin bearer token
Headers: Content-Type: application/json


1. List KYC Submissions

List all KYC submissions for admin review.

GET/accounts/admins/kyc/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

JSON
{
  "success": true,
  "message": "",
  "data": {
    "kyc_submissions": [
      {
        "id": "7c2a4d7e-9f4d-4e54-92f4-0f3b9b5f8a21",
        "type": "kyc",
        "status": "pending",
        "user": {
          "id": "e1b4f622-0e5c-4a79-9ef1-68d98b3d6d91",
          "full_name": "James Wilson",
          "email": "james@example.com",
          "phone": "+15125550102",
          "roles": [
            "buyer",
            "renter"
          ],
          "status": "active"
        },
        "submitted_data": {
          "full_name": "James Wilson",
          "date_of_birth": "1995-04-12",
          "address": {
            "line_1": "112 Example Lane",
            "city": "Austin",
            "postal_code": "78701",
            "country": "United States"
          },
          "nationality": "United Statesi",
          "phone_number": "+15125550102",
          "identity_document_type": "driving_license"
        },
        "documents": [],
        "rejection_reason": "",
        "reviewed_by": null,
        "reviewed_at": null,
        "created_at": "2026-08-05T10:30:00Z",
        "updated_at": "2026-08-05T10:30:00Z"
      }
    ]
  }
}

Notes

  • Only admin users can access this endpoint.

  • Only verification records with type kyc are returned.


2. KYC Details

Retrieve details for a single KYC submission.

GET/accounts/admins/kyc/{verification_id}/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

JSON
{
  "success": true,
  "message": "",
  "data": {
    "kyc": {
      "id": "7c2a4d7e-9f4d-4e54-92f4-0f3b9b5f8a21",
      "type": "kyc",
      "status": "pending",
      "user": {
        "id": "e1b4f622-0e5c-4a79-9ef1-68d98b3d6d91",
        "full_name": "James Wilson",
        "email": "james@example.com",
        "phone": "+15125550102",
        "roles": [
          "buyer",
          "renter"
        ],
        "status": "active"
      },
      "submitted_data": {
        "full_name": "James Wilson",
        "date_of_birth": "1995-04-12",
        "nationality": "United Statesi",
        "identity_document_type": "driving_license"
      },
      "documents": [
        {
          "id": "24e593d9-92d7-4c7d-a327-61d0c88f7f44",
          "document_type": "identity_front",
          "file_url": "https://cdn.example.com/kyc/nid-front.jpg",
          "status": "pending",
          "rejection_reason": "",
          "reviewed_by": null,
          "reviewed_at": null,
          "created_at": "2026-08-05T10:30:00Z",
          "updated_at": "2026-08-05T10:30:00Z"
        }
      ],
      "rejection_reason": "",
      "reviewed_by": null,
      "reviewed_at": null,
      "created_at": "2026-08-05T10:30:00Z",
      "updated_at": "2026-08-05T10:30:00Z"
    }
  }
}

Notes

  • {id} must be a KYC verification UUID.

  • A KYB verification id will return not found on this endpoint.


3. Approve KYC

Approve a KYC submission.

POST/accounts/admins/kyc/{verification_id}/approve/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

JSON
{
  "success": true,
  "message": "KYC approved successfully.",
  "data": {
    "kyc": {
      "id": "7c2a4d7e-9f4d-4e54-92f4-0f3b9b5f8a21",
      "type": "kyc",
      "status": "approved",
      "user": {
        "id": "e1b4f622-0e5c-4a79-9ef1-68d98b3d6d91",
        "full_name": "James Wilson",
        "email": "james@example.com",
        "phone": "+15125550102",
        "roles": [
          "buyer",
          "renter"
        ],
        "status": "active"
      },
      "submitted_data": {},
      "documents": [],
      "rejection_reason": "",
      "reviewed_by": {
        "id": "1c4434f3-c6ef-41e2-9168-4a65a2de5c88",
        "full_name": "Admin User",
        "email": "admin@example.com",
        "phone": null,
        "roles": [
          "admin"
        ],
        "status": "active"
      },
      "reviewed_at": "2026-08-05T11:00:00Z",
      "created_at": "2026-08-05T10:30:00Z",
      "updated_at": "2026-08-05T11:00:00Z"
    }
  }
}

Notes

  • No request body is required.

  • Approval clears any previous rejection reason.

  • The authenticated admin is stored as reviewed_by.


4. Reject KYC

Reject a KYC submission with a reason.

POST/accounts/admins/kyc/{verification_id}/reject/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Request Body

JSON
{
  "rejection_reason": "Identity document is not readable."
}

Success Example

JSON
{
  "success": true,
  "message": "KYC rejected successfully.",
  "data": {
    "kyc": {
      "id": "7c2a4d7e-9f4d-4e54-92f4-0f3b9b5f8a21",
      "type": "kyc",
      "status": "rejected",
      "user": {
        "id": "e1b4f622-0e5c-4a79-9ef1-68d98b3d6d91",
        "full_name": "James Wilson",
        "email": "james@example.com",
        "phone": "+15125550102",
        "roles": [
          "buyer",
          "renter"
        ],
        "status": "active"
      },
      "submitted_data": {},
      "documents": [],
      "rejection_reason": "Identity document is not readable.",
      "reviewed_by": {
        "id": "1c4434f3-c6ef-41e2-9168-4a65a2de5c88",
        "full_name": "Admin User",
        "email": "admin@example.com",
        "phone": null,
        "roles": [
          "admin"
        ],
        "status": "active"
      },
      "reviewed_at": "2026-08-05T11:05:00Z",
      "created_at": "2026-08-05T10:30:00Z",
      "updated_at": "2026-08-05T11:05:00Z"
    }
  }
}

Notes

  • rejection_reason is required.

  • The authenticated admin is stored as reviewed_by.


Common Success Format

JSON
{
  "success": true,
  "message": "Operation completed successfully.",
  "data": {}
}

Common Error Format

JSON
{
  "success": false,
  "message": "Validation failed.",
  "errors": {
    "field_name": [
      "Error message."
    ]
  }
}