curl -X POST https://api.chessplay.io/api/v1/students/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"password": "secure_password_123"
}'
import requests
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
# Minimum required: just password
data = {
"password": "secure_password_123"
}
# Optional: add more fields
# data = {
# "password": "secure_password_123",
# "email": "student@example.com",
# "first_name": "John",
# "last_name": "Doe"
# }
response = requests.post(
"https://api.chessplay.io/api/v1/students/",
headers=headers,
json=data
)
student = response.json()
print(f"Created student: {student['username']}")
// Minimum required: just password
const response = await fetch('https://api.chessplay.io/api/v1/students/', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
password: 'secure_password_123'
})
});
const student = await response.json();
console.log(`Created student: ${student.username}`);
<?php
// Minimum required: just password
$data = [
'password' => 'secure_password_123'
];
$ch = curl_init('https://api.chessplay.io/api/v1/students/');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_ACCESS_TOKEN',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$student = json_decode($response);
echo "Created student: {$student->username}\n";
curl_close($ch);
?>
{
"id": 125,
"username": "BrainyTuna",
"email": "student@example.com",
"phone_number": null,
"first_name": "John",
"last_name": "Doe",
"public_report_id": "def-456-ghi-789",
"created": "2024-01-17T09:15:00Z"
}
{
"password": ["This field is required."]
}
{
"username": ["This username is already taken in your organization."]
}
{
"non_field_errors": [
"Maximum student limit reached. Please contact support at support@wecodethat.com."
]
}
{
"detail": "You do not have permission to perform this action."
}
Students
Create Student
Create a new student in your organization
POST
/
api
/
v1
/
students
/
curl -X POST https://api.chessplay.io/api/v1/students/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"password": "secure_password_123"
}'
import requests
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
# Minimum required: just password
data = {
"password": "secure_password_123"
}
# Optional: add more fields
# data = {
# "password": "secure_password_123",
# "email": "student@example.com",
# "first_name": "John",
# "last_name": "Doe"
# }
response = requests.post(
"https://api.chessplay.io/api/v1/students/",
headers=headers,
json=data
)
student = response.json()
print(f"Created student: {student['username']}")
// Minimum required: just password
const response = await fetch('https://api.chessplay.io/api/v1/students/', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
password: 'secure_password_123'
})
});
const student = await response.json();
console.log(`Created student: ${student.username}`);
<?php
// Minimum required: just password
$data = [
'password' => 'secure_password_123'
];
$ch = curl_init('https://api.chessplay.io/api/v1/students/');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_ACCESS_TOKEN',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$student = json_decode($response);
echo "Created student: {$student->username}\n";
curl_close($ch);
?>
{
"id": 125,
"username": "BrainyTuna",
"email": "student@example.com",
"phone_number": null,
"first_name": "John",
"last_name": "Doe",
"public_report_id": "def-456-ghi-789",
"created": "2024-01-17T09:15:00Z"
}
{
"password": ["This field is required."]
}
{
"username": ["This username is already taken in your organization."]
}
{
"non_field_errors": [
"Maximum student limit reached. Please contact support at support@wecodethat.com."
]
}
{
"detail": "You do not have permission to perform this action."
}
Authentication
string
required
Bearer token for authentication (Admin only)
Body Parameters
string
required
Student’s password (will be hashed securely)
string
Student’s email address
string
Student’s first name
string
Student’s last name
string
Student’s username (auto-generated if not provided)
string
Student’s phone number
Response
integer
Unique identifier for the created student
string
Student’s username (auto-generated in AdjectiveNoun format if not provided)
string
Student’s email address
string
Student’s phone number
string
Student’s first name
string
Student’s last name
string
Auto-generated public UUID for student reports
string
ISO 8601 timestamp of when the student was created
curl -X POST https://api.chessplay.io/api/v1/students/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"password": "secure_password_123"
}'
import requests
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
# Minimum required: just password
data = {
"password": "secure_password_123"
}
# Optional: add more fields
# data = {
# "password": "secure_password_123",
# "email": "student@example.com",
# "first_name": "John",
# "last_name": "Doe"
# }
response = requests.post(
"https://api.chessplay.io/api/v1/students/",
headers=headers,
json=data
)
student = response.json()
print(f"Created student: {student['username']}")
// Minimum required: just password
const response = await fetch('https://api.chessplay.io/api/v1/students/', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
password: 'secure_password_123'
})
});
const student = await response.json();
console.log(`Created student: ${student.username}`);
<?php
// Minimum required: just password
$data = [
'password' => 'secure_password_123'
];
$ch = curl_init('https://api.chessplay.io/api/v1/students/');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_ACCESS_TOKEN',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$student = json_decode($response);
echo "Created student: {$student->username}\n";
curl_close($ch);
?>
{
"id": 125,
"username": "BrainyTuna",
"email": "student@example.com",
"phone_number": null,
"first_name": "John",
"last_name": "Doe",
"public_report_id": "def-456-ghi-789",
"created": "2024-01-17T09:15:00Z"
}
{
"password": ["This field is required."]
}
{
"username": ["This username is already taken in your organization."]
}
{
"non_field_errors": [
"Maximum student limit reached. Please contact support at support@wecodethat.com."
]
}
{
"detail": "You do not have permission to perform this action."
}
Auto-Generated Usernames
If you don’t provide a username, one will be automatically generated in PascalCase format:FastMalamuteTalentedSnailBrainyTunaDiligentAardwolf
Only password is required. All other fields (email, name, username) are optional and will be auto-generated or left empty.
With Optional Fields
curl -X POST https://api.chessplay.io/api/v1/students/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"password": "secure_password_123",
"username": "john_doe_2024",
"email": "student@example.com",
"first_name": "John",
"last_name": "Doe",
"phone_number": "+1234567890"
}'
Important Notes
Only Admin users can create students. Coach and Student users will receive a 403 Forbidden error.
Each organization has a maximum student limit. If you reach this limit, contact support to increase it.
Passwords are securely hashed using industry-standard algorithms. They are never stored in plain text.
Was this page helpful?
⌘I

