List Sub Tenants
GET/api/sub_account
List all sub-tenants for the current tenant with pagination. Only the parent tenant can view their sub-tenants.
Search logic:
- If keyword is a UUID: searches leads.tenant_id, leads.permitted_tenant_id, and leads.id (owner user ID)
- If keyword contains '@': searches owner email only
- Otherwise: searches owner email, phone, first name, last name, and the sub-account's own name/company name. If keyword has a space, also matches when first_name matches word 1 AND last_name matches the rest (e.g. "mee yang"). Phone is in the OR so digit-only keywords match both phone numbers and numeric-prefix emails (e.g. QQ-style
2316348163@qq.com).
Pagination:
- Default page_size: 10
- Max page_size: 100
- Returns total count and total pages
Request
Responses
- 200
- 404
- 422
Successful Response
Not found
Validation Error