curl -X POST https://api.chessplay.io/api/v1/classrooms/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Advanced Chess"}'
import requests
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
data = {"name": "Advanced Chess", "description": "For experienced players"}
response = requests.post(
"https://api.chessplay.io/api/v1/classrooms/",
headers=headers,
json=data
)
{
"id": 2,
"name": "Advanced Chess",
"description": "For experienced players",
"coach": {...},
"students": [],
"start_time": "2024-01-20T10:00:00Z",
"end_time": "2024-01-20T11:00:00Z"
}
Classrooms
Create Classroom
Create a new classroom
POST
/
api
/
v1
/
classrooms
/
curl -X POST https://api.chessplay.io/api/v1/classrooms/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Advanced Chess"}'
import requests
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
data = {"name": "Advanced Chess", "description": "For experienced players"}
response = requests.post(
"https://api.chessplay.io/api/v1/classrooms/",
headers=headers,
json=data
)
{
"id": 2,
"name": "Advanced Chess",
"description": "For experienced players",
"coach": {...},
"students": [],
"start_time": "2024-01-20T10:00:00Z",
"end_time": "2024-01-20T11:00:00Z"
}
Authentication
string
required
Bearer token (Admin only)
Body Parameters
string
required
Classroom name
string
Classroom description
integer
Coach ID (defaults to authenticated user)
array
Array of student IDs
curl -X POST https://api.chessplay.io/api/v1/classrooms/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Advanced Chess"}'
import requests
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
data = {"name": "Advanced Chess", "description": "For experienced players"}
response = requests.post(
"https://api.chessplay.io/api/v1/classrooms/",
headers=headers,
json=data
)
{
"id": 2,
"name": "Advanced Chess",
"description": "For experienced players",
"coach": {...},
"students": [],
"start_time": "2024-01-20T10:00:00Z",
"end_time": "2024-01-20T11:00:00Z"
}
Was this page helpful?
⌘I

