curl --request PATCH \
--url https://api.example.com/v1/students/{student_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"admin_notes": "<string>",
"email": "<string>",
"send_invite": false
}
'import requests
url = "https://api.example.com/v1/students/{student_id}"
payload = {
"admin_notes": "<string>",
"email": "<string>",
"send_invite": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({admin_notes: '<string>', email: '<string>', send_invite: false})
};
fetch('https://api.example.com/v1/students/{student_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/students/{student_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'admin_notes' => '<string>',
'email' => '<string>',
'send_invite' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/students/{student_id}"
payload := strings.NewReader("{\n \"admin_notes\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/students/{student_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"admin_notes\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/students/{student_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"admin_notes\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"placeholder_email": true,
"status": "<string>",
"parent_ids": [],
"enrolled_at": "<string>",
"created_at": "<string>"
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}Update Student
Update a student’s admin-only fields. admin_notes is written directly. Supplying email
sets/updates the login email and clears the no-email placeholder flag; send_invite (default
false) sends a set-password link — combine them to add an email and invite in one call.
Inviting an account that still has no real email is rejected (409). 404 if the student isn’t
affiliated with your org. Returns the full student.
curl --request PATCH \
--url https://api.example.com/v1/students/{student_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"admin_notes": "<string>",
"email": "<string>",
"send_invite": false
}
'import requests
url = "https://api.example.com/v1/students/{student_id}"
payload = {
"admin_notes": "<string>",
"email": "<string>",
"send_invite": False
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({admin_notes: '<string>', email: '<string>', send_invite: false})
};
fetch('https://api.example.com/v1/students/{student_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/students/{student_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'admin_notes' => '<string>',
'email' => '<string>',
'send_invite' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/students/{student_id}"
payload := strings.NewReader("{\n \"admin_notes\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": false\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/students/{student_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"admin_notes\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/students/{student_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"admin_notes\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"placeholder_email": true,
"status": "<string>",
"parent_ids": [],
"enrolled_at": "<string>",
"created_at": "<string>"
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}{
"error": {
"code": "not_found",
"message": "Session not found",
"status": 404,
"details": {}
}
}Authorizations
Org API key as Token token=ei_live_...
Path Parameters
Body
PATCH /v1/students/{student_id} — update admin-only fields. Partial update.
Supplying email sets/updates the student's login email (clearing the no-email
placeholder flag). send_invite (default false here — a patch doesn't email unless
asked) sends a set-password link; combine with email to add an address and invite in
one call. Sending an invite to an account that still has no real email is rejected (409).
Was this page helpful?