Overview
This endpoint allows parent accounts to retrieve a list of their child accounts with advanced filtering, search, and pagination capabilities.
Authentication
Query Parameters
Search in username and email fields
Start date for filtering (YYYY-MM-DD, ISO 8601, or timestamp)
End date for filtering (YYYY-MM-DD, ISO 8601, or timestamp)
Pagination token from previous response
Try It Out
Test the API by providing your parameters:
GET /auth/child-accounts?startDate=1704067200000&endDate=1706745600000
Code Examples
curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
https://api.authiqa.com/auth/child-accounts
{
"success": true,
"data": {
"data": {
"stats": {
"total": 55,
"active": 10
},
"accounts": [
{
"username": "childuser1",
"email": "[email protected]",
"lastSeen": "2024-01-29T15:48:38.609Z",
"registered": "2024-01-15T15:48:38.609Z"
}
],
"pagination": {
"limit": 50,
"hasMore": true,
"nextPageToken": "base64_encoded_token"
}
}
}
}
Error Responses
{
"success": false,
"error": {
"code": "INVALID_DATE_FORMAT",
"message": "Start date must be a valid timestamp"
}
}
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Only parent accounts can access this data"
}
}
Error Codes
INVALID_DATE_FORMAT - Invalid date format provided
INVALID_LIMIT - Limit must be between 1 and 100
INVALID_PAGINATION_TOKEN - Invalid pagination token
UNAUTHORIZED - Missing/invalid token
UNAUTHORIZED_ACCESS - Non-parent account access attempt
Pagination Rules
- Default limit: 50 items per page
- Maximum limit: 100 items per page
nextPageToken provided when more results exist
- Use
lastKey parameter with nextPageToken for next page
Notes
Active accounts are those with login activity in the last 30 days.
This endpoint is only accessible to parent accounts. Child accounts will receive an unauthorized error.