GET
/
auth
/
child-accounts
Get Child Accounts
curl --request GET \
  --url https://api.authiqa.com/auth/child-accounts \
  --header 'Authorization: <authorization>'

Overview

This endpoint allows parent accounts to retrieve a list of their child accounts with advanced filtering, search, and pagination capabilities.

Authentication

Authorization
string
required
Bearer YOUR_JWT_TOKEN

Query Parameters

Search in username and email fields
startDate
string
Start date for filtering (YYYY-MM-DD, ISO 8601, or timestamp)
endDate
string
End date for filtering (YYYY-MM-DD, ISO 8601, or timestamp)
limit
number
default:"50"
Items per page (1-100)
lastKey
string
Pagination token from previous response

Try It Out

Test the API by providing your parameters:

search
Search term
startDate
Start date
endDate
End date
limit
Results per page

Date Format Support

GET /auth/child-accounts?startDate=1704067200000&endDate=1706745600000

Code Examples

curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
     https://api.authiqa.com/auth/child-accounts

Response Format

200: Success
{
  "success": true,
  "data": {
    "data": {
      "stats": {
        "total": 55,
        "active": 10
      },
      "accounts": [
        {
          "username": "childuser1",
          "email": "child1@example.com",
          "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

400: Invalid Request
{
  "success": false,
  "error": {
    "code": "INVALID_DATE_FORMAT",
    "message": "Start date must be a valid timestamp"
  }
}
401: Unauthorized
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Only parent accounts can access this data"
  }
}

Error Codes

400 Bad Request
  • INVALID_DATE_FORMAT - Invalid date format provided
  • INVALID_LIMIT - Limit must be between 1 and 100
  • INVALID_PAGINATION_TOKEN - Invalid pagination token
401 Unauthorized
  • UNAUTHORIZED - Missing/invalid token
  • UNAUTHORIZED_ACCESS - Non-parent account access attempt

Pagination

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.