curl --request POST \
--url https://api.example.com/v1/questions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"parts": [
{
"content": "<string>",
"label": "<string>",
"position": 123,
"marks": 123,
"answer": "<string>",
"solution": "<string>",
"is_multi_choice": false,
"mcq_options": [
"<unknown>"
],
"curriculum_level_id": "<string>"
}
],
"intro_text": "<string>",
"topic": "<string>",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.example.com/v1/questions"
payload = {
"parts": [
{
"content": "<string>",
"label": "<string>",
"position": 123,
"marks": 123,
"answer": "<string>",
"solution": "<string>",
"is_multi_choice": False,
"mcq_options": ["<unknown>"],
"curriculum_level_id": "<string>"
}
],
"intro_text": "<string>",
"topic": "<string>",
"tags": ["<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({
parts: [
{
content: '<string>',
label: '<string>',
position: 123,
marks: 123,
answer: '<string>',
solution: '<string>',
is_multi_choice: false,
mcq_options: ['<unknown>'],
curriculum_level_id: '<string>'
}
],
intro_text: '<string>',
topic: '<string>',
tags: ['<string>']
})
};
fetch('https://api.example.com/v1/questions', 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/questions",
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([
'parts' => [
[
'content' => '<string>',
'label' => '<string>',
'position' => 123,
'marks' => 123,
'answer' => '<string>',
'solution' => '<string>',
'is_multi_choice' => false,
'mcq_options' => [
'<unknown>'
],
'curriculum_level_id' => '<string>'
]
],
'intro_text' => '<string>',
'topic' => '<string>',
'tags' => [
'<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/questions"
payload := strings.NewReader("{\n \"parts\": [\n {\n \"content\": \"<string>\",\n \"label\": \"<string>\",\n \"position\": 123,\n \"marks\": 123,\n \"answer\": \"<string>\",\n \"solution\": \"<string>\",\n \"is_multi_choice\": false,\n \"mcq_options\": [\n \"<unknown>\"\n ],\n \"curriculum_level_id\": \"<string>\"\n }\n ],\n \"intro_text\": \"<string>\",\n \"topic\": \"<string>\",\n \"tags\": [\n \"<string>\"\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/questions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"parts\": [\n {\n \"content\": \"<string>\",\n \"label\": \"<string>\",\n \"position\": 123,\n \"marks\": 123,\n \"answer\": \"<string>\",\n \"solution\": \"<string>\",\n \"is_multi_choice\": false,\n \"mcq_options\": [\n \"<unknown>\"\n ],\n \"curriculum_level_id\": \"<string>\"\n }\n ],\n \"intro_text\": \"<string>\",\n \"topic\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/questions")
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 \"parts\": [\n {\n \"content\": \"<string>\",\n \"label\": \"<string>\",\n \"position\": 123,\n \"marks\": 123,\n \"answer\": \"<string>\",\n \"solution\": \"<string>\",\n \"is_multi_choice\": false,\n \"mcq_options\": [\n \"<unknown>\"\n ],\n \"curriculum_level_id\": \"<string>\"\n }\n ],\n \"intro_text\": \"<string>\",\n \"topic\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"source": "<string>",
"topic": "<string>",
"tags": [],
"intro_text": "<string>",
"is_official_vce": true,
"is_current_study_design": true,
"question_number": 123,
"total_marks": 123,
"owned_by_org": true,
"author_id": "<string>",
"created_at": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create Question
Create a question in your org’s private question bank.
The question is stamped with organization_id (the calling org) and no
user_id — org-owned content survives individual tutor turnover. It then
appears in the default GET /v1/questions union for this org (and in the
in-app Question Bank’s “Org Bank” scope), but never in the shared catalogue.
Honours Idempotency-Key. Requires coursework:write (the coarse write
umbrella grants it).
curl --request POST \
--url https://api.example.com/v1/questions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"parts": [
{
"content": "<string>",
"label": "<string>",
"position": 123,
"marks": 123,
"answer": "<string>",
"solution": "<string>",
"is_multi_choice": false,
"mcq_options": [
"<unknown>"
],
"curriculum_level_id": "<string>"
}
],
"intro_text": "<string>",
"topic": "<string>",
"tags": [
"<string>"
]
}
'import requests
url = "https://api.example.com/v1/questions"
payload = {
"parts": [
{
"content": "<string>",
"label": "<string>",
"position": 123,
"marks": 123,
"answer": "<string>",
"solution": "<string>",
"is_multi_choice": False,
"mcq_options": ["<unknown>"],
"curriculum_level_id": "<string>"
}
],
"intro_text": "<string>",
"topic": "<string>",
"tags": ["<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({
parts: [
{
content: '<string>',
label: '<string>',
position: 123,
marks: 123,
answer: '<string>',
solution: '<string>',
is_multi_choice: false,
mcq_options: ['<unknown>'],
curriculum_level_id: '<string>'
}
],
intro_text: '<string>',
topic: '<string>',
tags: ['<string>']
})
};
fetch('https://api.example.com/v1/questions', 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/questions",
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([
'parts' => [
[
'content' => '<string>',
'label' => '<string>',
'position' => 123,
'marks' => 123,
'answer' => '<string>',
'solution' => '<string>',
'is_multi_choice' => false,
'mcq_options' => [
'<unknown>'
],
'curriculum_level_id' => '<string>'
]
],
'intro_text' => '<string>',
'topic' => '<string>',
'tags' => [
'<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/questions"
payload := strings.NewReader("{\n \"parts\": [\n {\n \"content\": \"<string>\",\n \"label\": \"<string>\",\n \"position\": 123,\n \"marks\": 123,\n \"answer\": \"<string>\",\n \"solution\": \"<string>\",\n \"is_multi_choice\": false,\n \"mcq_options\": [\n \"<unknown>\"\n ],\n \"curriculum_level_id\": \"<string>\"\n }\n ],\n \"intro_text\": \"<string>\",\n \"topic\": \"<string>\",\n \"tags\": [\n \"<string>\"\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/questions")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"parts\": [\n {\n \"content\": \"<string>\",\n \"label\": \"<string>\",\n \"position\": 123,\n \"marks\": 123,\n \"answer\": \"<string>\",\n \"solution\": \"<string>\",\n \"is_multi_choice\": false,\n \"mcq_options\": [\n \"<unknown>\"\n ],\n \"curriculum_level_id\": \"<string>\"\n }\n ],\n \"intro_text\": \"<string>\",\n \"topic\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/questions")
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 \"parts\": [\n {\n \"content\": \"<string>\",\n \"label\": \"<string>\",\n \"position\": 123,\n \"marks\": 123,\n \"answer\": \"<string>\",\n \"solution\": \"<string>\",\n \"is_multi_choice\": false,\n \"mcq_options\": [\n \"<unknown>\"\n ],\n \"curriculum_level_id\": \"<string>\"\n }\n ],\n \"intro_text\": \"<string>\",\n \"topic\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"source": "<string>",
"topic": "<string>",
"tags": [],
"intro_text": "<string>",
"is_official_vce": true,
"is_current_study_design": true,
"question_number": 123,
"total_marks": 123,
"owned_by_org": true,
"author_id": "<string>",
"created_at": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Org API key as Token token=ei_live_...
Headers
Body
POST /v1/questions → questions_v2 (+ question_parts). Creates a question in
the key's org private bank: organization_id is server-set to the key's org,
user_id is NULL (org-owned), and source stays NULL (never a platform
label). At least one part is required.
Response
Successful Response
Was this page helpful?