curl -X PATCH https://api.chessplay.io/api/v1/students/123/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Jane",
"email": "jane@example.com"
}'
import requests
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
data = {
"first_name": "Jane",
"email": "jane@example.com"
}
response = requests.patch(
"https://api.chessplay.io/api/v1/students/123/",
headers=headers,
json=data
)
const response = await fetch('https://api.chessplay.io/api/v1/students/123/', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: 'Jane',
email: 'jane@example.com'
})
});
{
"id": 123,
"username": "FastMalamute",
"email": "jane@example.com",
"phone_number": "+1234567890",
"first_name": "Jane",
"last_name": "Doe",
"public_report_id": "abc-123-def-456",
"created": "2024-01-15T10:30:00Z"
}
{
"detail": "You do not have permission to perform this action."
}
Students
Update Student
Update a student’s information
PATCH
/
api
/
v1
/
students
/
{id}
/
curl -X PATCH https://api.chessplay.io/api/v1/students/123/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Jane",
"email": "jane@example.com"
}'
import requests
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
data = {
"first_name": "Jane",
"email": "jane@example.com"
}
response = requests.patch(
"https://api.chessplay.io/api/v1/students/123/",
headers=headers,
json=data
)
const response = await fetch('https://api.chessplay.io/api/v1/students/123/', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: 'Jane',
email: 'jane@example.com'
})
});
{
"id": 123,
"username": "FastMalamute",
"email": "jane@example.com",
"phone_number": "+1234567890",
"first_name": "Jane",
"last_name": "Doe",
"public_report_id": "abc-123-def-456",
"created": "2024-01-15T10:30:00Z"
}
{
"detail": "You do not have permission to perform this action."
}
Authentication
string
required
Bearer token for authentication (Admin only)
Path Parameters
integer
required
Student ID
Body Parameters
string
Student’s email address
string
Student’s first name
string
Student’s last name
string
Student’s phone number
string
New password (optional)
curl -X PATCH https://api.chessplay.io/api/v1/students/123/ \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Jane",
"email": "jane@example.com"
}'
import requests
headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
data = {
"first_name": "Jane",
"email": "jane@example.com"
}
response = requests.patch(
"https://api.chessplay.io/api/v1/students/123/",
headers=headers,
json=data
)
const response = await fetch('https://api.chessplay.io/api/v1/students/123/', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: 'Jane',
email: 'jane@example.com'
})
});
{
"id": 123,
"username": "FastMalamute",
"email": "jane@example.com",
"phone_number": "+1234567890",
"first_name": "Jane",
"last_name": "Doe",
"public_report_id": "abc-123-def-456",
"created": "2024-01-15T10:30:00Z"
}
{
"detail": "You do not have permission to perform this action."
}
Only Admin users can update students.
Was this page helpful?
⌘I

