Skip to content

Getting Students

Endpoint Overview

Fetch students belonging to your organization. Supports query parameters for product-based filtering and pagination.

  • HTTP Method: GET
  • Endpoint URL: https://api.trywhiteowl.com/api/v1/students
  • Authentication: Bearer Token (API Key)
  • Required Permission: students:read (Ensure your API key has Read permission under Students)

Parameter Type Required Default Description
productId Number No N/A Filter students who purchased a specific product ID.
page Number No 1 Page number for paginated results.
limit Number No 50 Number of records to return per page.

Header Type Required Description
Authorization String Yes Bearer token format: Bearer YOUR_API_KEY
Content-Type String Yes application/json

cURL

Terminal window
curl -X GET "https://api.trywhiteowl.com/api/v1/students?productId=101&page=1&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"

JavaScript (Fetch)

const options = {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
fetch('https://api.trywhiteowl.com/api/v1/students?productId=101&page=1&limit=50', options)
.then(response => response.json())
.then(data => console.log(data))
.catch(err => console.error(err));

Python (Requests)

import requests
url = "https://api.trywhiteowl.com/api/v1/students"
params = {"productId": 101, "page": 1, "limit": 50}
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())

Success Response (200 OK)

{
"success": true,
"data": [
{
"id": 1,
"created_at": "2026-04-01T10:00:00Z",
"name": "Jane Doe",
"email": "jane.doe@example.com",
"organization": "org_12345",
"purchase": [101],
"teacher": null,
"userId": "user_2xabc123"
}
],
"pagination": {
"current_page": "1",
"limit": "50",
"next": {
"limit": "50",
"page": 2
},
"previous": null
}
}

Error Responses

  • Product or Students Not Found:
{
"success": false,
"message": "You probably do not have a product with 101 or it does not have any students"
}
  • Missing Permissions (403 Forbidden):
{
"success": false,
"message": "Your API key does not have the 'students:read' permission"
}