curl --request POST \
--url https://api.example.com/v1/users/bulk-invite \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"users": [
{
"type": "student",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"send_invite": true,
"phone": "<string>",
"parent": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>"
}
}
]
}
'import requests
url = "https://api.example.com/v1/users/bulk-invite"
payload = { "users": [
{
"type": "student",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"send_invite": True,
"phone": "<string>",
"parent": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<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({
users: [
{
type: 'student',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
send_invite: true,
phone: '<string>',
parent: {
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone: '<string>'
}
}
]
})
};
fetch('https://api.example.com/v1/users/bulk-invite', 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/users/bulk-invite",
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([
'users' => [
[
'type' => 'student',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'send_invite' => true,
'phone' => '<string>',
'parent' => [
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'phone' => '<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/users/bulk-invite"
payload := strings.NewReader("{\n \"users\": [\n {\n \"type\": \"student\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone\": \"<string>\",\n \"parent\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n }\n }\n ]\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/users/bulk-invite")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"users\": [\n {\n \"type\": \"student\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone\": \"<string>\",\n \"parent\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/users/bulk-invite")
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 \"users\": [\n {\n \"type\": \"student\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone\": \"<string>\",\n \"parent\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [],
"summary": {
"total": 0,
"ok": 0,
"exists": 0,
"errors": 0,
"created": 0
}
}{
"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": {}
}
}Bulk Invite Users
Bulk create/invite 1–100 users — students (optionally each with a parent), tutors,
and parents — in one call. Each row carries a type discriminator.
Auth is all-or-nothing: the key must hold every scope the batch’s row types require
(students:write for student/parent rows, tutors:write for tutor rows) or the whole
request is 403. Provisioning is then per-row and independent — one row’s failure never
rolls back the others. Each input row maps to one results[] entry (same order, by
index) with a status:
ok— newly provisioned (created= whether a new login was made)exists— already an accepted member of this org (idempotent no-op)error— could not provision (errorcarries a human-readable reason)
Honours Idempotency-Key (the whole batch result is replayed on retry).
curl --request POST \
--url https://api.example.com/v1/users/bulk-invite \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"users": [
{
"type": "student",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"send_invite": true,
"phone": "<string>",
"parent": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<string>"
}
}
]
}
'import requests
url = "https://api.example.com/v1/users/bulk-invite"
payload = { "users": [
{
"type": "student",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"send_invite": True,
"phone": "<string>",
"parent": {
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"phone": "<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({
users: [
{
type: 'student',
first_name: '<string>',
last_name: '<string>',
email: '<string>',
send_invite: true,
phone: '<string>',
parent: {
first_name: '<string>',
last_name: '<string>',
email: '<string>',
phone: '<string>'
}
}
]
})
};
fetch('https://api.example.com/v1/users/bulk-invite', 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/users/bulk-invite",
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([
'users' => [
[
'type' => 'student',
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'send_invite' => true,
'phone' => '<string>',
'parent' => [
'first_name' => '<string>',
'last_name' => '<string>',
'email' => '<string>',
'phone' => '<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/users/bulk-invite"
payload := strings.NewReader("{\n \"users\": [\n {\n \"type\": \"student\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone\": \"<string>\",\n \"parent\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n }\n }\n ]\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/users/bulk-invite")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"users\": [\n {\n \"type\": \"student\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone\": \"<string>\",\n \"parent\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/users/bulk-invite")
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 \"users\": [\n {\n \"type\": \"student\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"send_invite\": true,\n \"phone\": \"<string>\",\n \"parent\": {\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"email\": \"<string>\",\n \"phone\": \"<string>\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [],
"summary": {
"total": 0,
"ok": 0,
"exists": 0,
"errors": 0,
"created": 0
}
}{
"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_...
Headers
Body
POST /v1/users/bulk-invite — create/invite 1–100 users (students, tutors, and/or
parents) in one call. Each row is provisioned independently: one row's failure never
rolls back the others (see the per-row results).
1 - 100 elementsA student row in POST /v1/users/bulk-invite (optionally with a parent created + linked atomically). Mirrors POST /v1/students.
- BulkInviteStudent
- BulkInviteTutor
- BulkInviteParent
Show child attributes
Show child attributes
Response
Successful Response
Was this page helpful?