Customer KYC API
Base URL: http://localhost:8000/api/v1
Prefix: /accounts/customers
Auth: Bearer token required
Headers: Content-Type: application/json
1. Submit KYC
Submit complete identity information and the required KYC documents for admin review.
/accounts/customers/kyc/Auth: Required
Headers
Authorization: Bearer {{access_token}}
Content-Type: application/jsonRequest Body
{
"full_name": "James Wilson",
"date_of_birth": "1995-04-12",
"address": {
"line_1": "112 Example Lane",
"line_2": "Downtown",
"city": "Austin",
"postal_code": "78701",
"country": "United States"
},
"nationality": "United Statesi",
"phone_number": "+15125550102",
"identity_document_type": "driving_license",
"identity_front_upload_id": "dc99095f-a854-4a00-b398-232108749938",
"identity_back_upload_id": "a12d6c3a-20cc-49d1-b8e3-728c9b1054e1",
"selfie_upload_id": "bc23e7d4-31dd-50e2-c9f4-839d0c2165f2"
}Success Example
{
"success": true,
"message": "KYC submitted successfully.",
"data": {
"kyc": {
"id": "4d6b39f2-8c72-4e9a-95b2-66d879a2c111",
"type": "kyc",
"status": "pending",
"ui_status": "under_review",
"rejection_reason": "",
"submitted_data": {
"full_name": "James Wilson",
"date_of_birth": "1995-04-12",
"address": {
"line_1": "112 Example Lane",
"line_2": "Downtown",
"city": "Austin",
"postal_code": "78701",
"country": "United States"
},
"nationality": "United Statesi",
"phone_number": "+15125550102",
"identity_document_type": "driving_license"
},
"documents": [
{
"id": "7f6c3c2d-5c25-4f6d-b455-1a46c0f7a111",
"document_type": "identity_front",
"upload_id": "dc99095f-a854-4a00-b398-232108749938",
"file_url": "https://api.example.com/uploads/dc99095f-a854-4a00-b398-232108749938/content/?token=SIGNED_TOKEN",
"status": "pending",
"rejection_reason": "",
"created_at": "2026-09-27T10:30:00Z",
"updated_at": "2026-09-27T10:30:00Z"
},
{
"id": "13911961-d704-4baa-b57e-cf582179b222",
"document_type": "identity_back",
"upload_id": "a12d6c3a-20cc-49d1-b8e3-728c9b1054e1",
"file_url": "https://api.example.com/uploads/a12d6c3a-20cc-49d1-b8e3-728c9b1054e1/content/?token=SIGNED_TOKEN",
"status": "pending",
"rejection_reason": "",
"created_at": "2026-09-27T10:30:00Z",
"updated_at": "2026-09-27T10:30:00Z"
},
{
"id": "fb62eeba-fb0c-4528-899f-35d8490f5333",
"document_type": "selfie",
"upload_id": "bc23e7d4-31dd-50e2-c9f4-839d0c2165f2",
"file_url": "https://api.example.com/uploads/bc23e7d4-31dd-50e2-c9f4-839d0c2165f2/content/?token=SIGNED_TOKEN",
"status": "pending",
"rejection_reason": "",
"created_at": "2026-09-27T10:30:00Z",
"updated_at": "2026-09-27T10:30:00Z"
}
],
"reviewed_by": null,
"reviewed_at": null,
"created_at": "2026-09-27T10:30:00Z",
"updated_at": "2026-09-27T10:30:00Z"
}
}
}Notes
-
Returns HTTP
201 Created. -
All identity fields and all three upload ID fields are required.
-
Uploads must be prepared and completed through the separate Upload API first.
-
Each upload must have purpose
kyc. -
Supported identity document types are
nid,passport, anddriving_license. -
Required document types are
identity_front,identity_back, andselfie. -
KYC documents are private and returned through temporary signed URLs.
-
Submission is permitted only when the current status is
not_submitted,rejected, orexpired. -
Submitting while the status is
pendingorapprovedreturns HTTP400 Bad Request. -
The authenticated user must have a customer role:
buyer,renter, orinvestor. -
Legacy nested
file_urlvalues remain supported for backward compatibility.
2. View My KYC
Retrieve the authenticated customer’s current KYC information, documents, and status.
/accounts/customers/kyc/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "KYC retrieved successfully.",
"data": {
"kyc": {
"id": "4d6b39f2-8c72-4e9a-95b2-66d879a2c111",
"type": "kyc",
"status": "pending",
"ui_status": "under_review",
"rejection_reason": "",
"submitted_data": {
"full_name": "James Wilson",
"date_of_birth": "1995-04-12",
"address": {
"line_1": "112 Example Lane",
"line_2": "Downtown",
"city": "Austin",
"postal_code": "78701",
"country": "United States"
},
"nationality": "United Statesi",
"phone_number": "+15125550102",
"identity_document_type": "driving_license"
},
"documents": [
{
"id": "7f6c3c2d-5c25-4f6d-b455-1a46c0f7a111",
"document_type": "identity_front",
"upload_id": "dc99095f-a854-4a00-b398-232108749938",
"file_url": "https://api.example.com/uploads/dc99095f-a854-4a00-b398-232108749938/content/?token=SIGNED_TOKEN",
"status": "pending",
"rejection_reason": "",
"created_at": "2026-09-27T10:30:00Z",
"updated_at": "2026-09-27T10:30:00Z"
}
],
"reviewed_by": null,
"reviewed_at": null,
"created_at": "2026-09-27T10:30:00Z",
"updated_at": "2026-09-27T10:30:00Z"
}
}
}Notes
-
Returns only the authenticated customer’s KYC record.
-
When no KYC record exists, the endpoint returns HTTP
200 OK. -
An unsubmitted response contains:
-
id: null -
status: "not_submitted" -
ui_status: "action_required" -
Empty
submitted_data -
Empty
documents
-
-
Possible KYC statuses are
not_submitted,pending,approved,rejected, andexpired. -
Possible UI statuses are
action_required,under_review,verified, andrejected. -
Document URLs are temporary protected URLs.
3. Update My KYC
Save partial KYC information or replace individual documents before submission or resubmission.
/accounts/customers/kyc/Auth: Required
Headers
Authorization: Bearer {{access_token}}
Content-Type: application/jsonRequest Body
{
"address": {
"line_1": "122 Example Lane",
"city": "Austin",
"postal_code": "78701",
"country": "United States"
},
"phone_number": "+15125550101",
"identity_back_upload_id": "NEW_UPLOAD_UUID"
}Success Example
{
"success": true,
"message": "KYC updated successfully.",
"data": {
"kyc": {
"id": "4d6b39f2-8c72-4e9a-95b2-66d879a2c111",
"type": "kyc",
"status": "not_submitted",
"ui_status": "action_required",
"rejection_reason": "",
"submitted_data": {
"address": {
"line_1": "122 Example Lane",
"city": "Austin",
"postal_code": "78701",
"country": "United States"
},
"phone_number": "+15125550101"
},
"documents": [
{
"id": "13911961-d704-4baa-b57e-cf582179b222",
"document_type": "identity_back",
"upload_id": "NEW_UPLOAD_UUID",
"file_url": "https://api.example.com/uploads/NEW_UPLOAD_UUID/content/?token=SIGNED_TOKEN",
"status": "pending",
"rejection_reason": "",
"created_at": "2026-09-27T11:15:00Z",
"updated_at": "2026-09-27T11:15:00Z"
}
],
"reviewed_by": null,
"reviewed_at": null,
"created_at": "2026-09-27T10:30:00Z",
"updated_at": "2026-09-27T11:15:00Z"
}
}
}Notes
-
All request fields are optional.
-
Supported identity fields are:
-
full_name -
date_of_birth -
address -
nationality -
phone_number -
identity_document_type
-
-
Supported document fields are:
-
identity_front_upload_id -
identity_back_upload_id -
selfie_upload_id
-
-
PATCH saves a draft and does not change the KYC status to
pending. -
Existing identity data is merged with the supplied fields.
-
Supplying a new upload ID replaces the existing document of the same type.
-
Uploads must have purpose
kyc. -
Updates are permitted only when the status is
not_submitted,rejected, orexpired. -
Updates while the status is
pendingorapprovedreturn HTTP400 Bad Request. -
Use
POST /accounts/customers/kyc/with the complete payload to submit or resubmit KYC.
4. View KYC Requirements
Retrieve the required identity fields, supported document types, file restrictions, and status labels.
/accounts/customers/kyc/requirements/Auth: Required
Headers
Authorization: Bearer {{access_token}}Success Example
{
"success": true,
"message": "KYC requirements retrieved successfully.",
"data": {
"requirements": {
"identity_information": [
"full_name",
"date_of_birth",
"address",
"nationality",
"phone_number"
],
"identity_document_types": [
"nid",
"passport",
"driving_license"
],
"required_documents": [
{
"key": "identity_front",
"label": "Identity document front",
"required": true
},
{
"key": "identity_back",
"label": "Identity document back",
"required": true
},
{
"key": "selfie",
"label": "Selfie",
"required": true
}
],
"allowed_file_types": [
"jpg",
"jpeg",
"png",
"pdf"
],
"max_file_size_mb": 10,
"editable_statuses": [
"expired",
"not_submitted",
"rejected"
],
"status_labels": {
"not_submitted": "Action Required",
"pending": "Under Review",
"approved": "Verified",
"rejected": "Rejected",
"expired": "Action Required"
}
}
}
}Notes
-
Use this endpoint before submitting KYC.
-
Upload files through the separate Upload API.
-
Submit the completed upload IDs in the KYC request.
-
Files are not uploaded as multipart form data directly to the KYC endpoint.
Common Success Format
{
"success": true,
"message": "Operation completed successfully.",
"data": {}
}Common Error Format
{
"success": false,
"detail": "Validation failed.",
"errors": {
"identity_front_upload_id": [
"This field is required."
]
}
}