curl --request POST \
--url https://api.example.com/v1/parents \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "<string>",
"student_id": "<string>",
"email": "<string>",
"send_invite": true,
"phone_number": "<string>",
"phone_country_code": "<string>"
}
'import requests
url = "https://api.example.com/v1/parents"
payload = {
"full_name": "<string>",
"student_id": "<string>",
"email": "<string>",
"send_invite": True,
"phone_number": "<string>",
"phone_country_code": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
full_name: '<string>',
student_id: '<string>',
email: '<string>',
send_invite: true,
phone_number: '<string>',
phone_country_code: '<string>'
})
};
fetch('https://api.example.com/v1/parents', 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/parents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => '<string>',
'student_id' => '<string>',
'email' => '<string>',
'send_invite' => true,
'phone_number' => '<string>',
'phone_country_code' => '<string>'
]),
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/parents"
payload := strings.NewReader("{\n \"full_name\": \"<string>\",\n \"student_id\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone_number\": \"<string>\",\n \"phone_country_code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/v1/parents")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"<string>\",\n \"student_id\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone_number\": \"<string>\",\n \"phone_country_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/parents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"<string>\",\n \"student_id\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone_number\": \"<string>\",\n \"phone_country_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"status": "<string>",
"user_id": "<string>",
"email": "<string>",
"action": "<string>",
"reason": "<string>",
"invited": true,
"placeholder": true
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create Parent
Create a parent account and link it to an existing org student (student_id). email is
optional (omit → no-email placeholder account, invite later); when a real email is present and
send_invite (default true) is set, emails a set-password link. The student must already be an
accepted student of the org (else 404).
curl --request POST \
--url https://api.example.com/v1/parents \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "<string>",
"student_id": "<string>",
"email": "<string>",
"send_invite": true,
"phone_number": "<string>",
"phone_country_code": "<string>"
}
'import requests
url = "https://api.example.com/v1/parents"
payload = {
"full_name": "<string>",
"student_id": "<string>",
"email": "<string>",
"send_invite": True,
"phone_number": "<string>",
"phone_country_code": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
full_name: '<string>',
student_id: '<string>',
email: '<string>',
send_invite: true,
phone_number: '<string>',
phone_country_code: '<string>'
})
};
fetch('https://api.example.com/v1/parents', 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/parents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => '<string>',
'student_id' => '<string>',
'email' => '<string>',
'send_invite' => true,
'phone_number' => '<string>',
'phone_country_code' => '<string>'
]),
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/parents"
payload := strings.NewReader("{\n \"full_name\": \"<string>\",\n \"student_id\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone_number\": \"<string>\",\n \"phone_country_code\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.example.com/v1/parents")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"<string>\",\n \"student_id\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone_number\": \"<string>\",\n \"phone_country_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/parents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"<string>\",\n \"student_id\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone_number\": \"<string>\",\n \"phone_country_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"status": "<string>",
"user_id": "<string>",
"email": "<string>",
"action": "<string>",
"reason": "<string>",
"invited": true,
"placeholder": true
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Org API key as Token token=ei_live_...
Headers
Body
POST /v1/parents → mint a parent account and link to an EXISTING org student. scope
accounts:write. student_id must already be an accepted student of the org (else 404).
email is optional (omit → no-email placeholder account, invite later); send_invite
(default true) gates the set-password email when a real email is present.
Response
Successful Response
Result of POST /v1/students|tutors|parents — one entry per account processed (a student with a nested parent returns two).
Show child attributes
Show child attributes
Was this page helpful?