Docs API reference
Question banks
Reusable questions with immutable versions.
Questions live in banks and are never edited in place: every edit adds a new immutable version. The body shape depends on the question type; see Quizzes & questions.
9 endpoints · base path /api/v1
List question banks
AccessAdmin, or an API key with the read or write scope.
Lists banks with the number of active questions in each. A bank is a folder: every question lives in exactly one.
Responses
Example response
[
{
"activeQuestions": 1,
"description": "A short description.",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"name": "Acme Company"
}
]Errors
| Status | When |
|---|---|
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
Errors use RFC 9457 problem details.
curl -X GET "$LMS_URL/api/v1/question-banks" \
-H "X-API-Key: $LMS_KEY"const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const res = await fetch(`${LMS_URL}/api/v1/question-banks`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const res = await fetch(`${LMS_URL}/api/v1/question-banks`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
res = requests.get(f"{LMS_URL}/api/v1/question-banks", headers=HEADERS, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/question-banks"))
.header("X-API-Key", lmsKey)
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
uri = URI("#{lms_url}/api/v1/question-banks")
request = Net::HTTP::Get.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"))
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$ch = curl_init("$lmsUrl/api/v1/question-banks");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY')],
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", os.Getenv("LMS_URL") + "/api/v1/question-banks", nil)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}Create a question bank
AccessAdmin, or an API key with the write scope.
Creates a bank. Names are unique within the tenant.
Request body application/json · CreateBank
| Field | Type | Notes |
|---|---|---|
| description | string | — |
| namerequired | string | min length 1 |
Example request body
{
"description": "A short description.",
"name": "Acme Company"
}Responses
Example response
{
"activeQuestions": 1,
"description": "A short description.",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"name": "Acme Company"
}Errors
| Status | When |
|---|---|
| 400 | The request was malformed or failed validation. errors lists each field. |
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
| 409 | A bank with that name already exists. |
Errors use RFC 9457 problem details.
curl -X POST "$LMS_URL/api/v1/question-banks" \
-H "X-API-Key: $LMS_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "A short description.",
"name": "Acme Company"
}'const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const res = await fetch(`${LMS_URL}/api/v1/question-banks`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"description": "A short description.",
"name": "Acme Company"
}),
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const res = await fetch(`${LMS_URL}/api/v1/question-banks`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"description": "A short description.",
"name": "Acme Company"
}),
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
res = requests.post(f"{LMS_URL}/api/v1/question-banks", headers=HEADERS, json={
"description": "A short description.",
"name": "Acme Company",
}, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String body = """
{
"description": "A short description.",
"name": "Acme Company"
}
""";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/question-banks"))
.header("X-API-Key", lmsKey)
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
uri = URI("#{lms_url}/api/v1/question-banks")
request = Net::HTTP::Post.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"), "Content-Type" => "application/json")
request.body = {
"description" => "A short description.",
"name" => "Acme Company",
}.to_json
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$ch = curl_init("$lmsUrl/api/v1/question-banks");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
"description" => "A short description.",
"name" => "Acme Company",
]),
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{
"description": "A short description.",
"name": "Acme Company"
}`)
req, _ := http.NewRequest("POST", os.Getenv("LMS_URL") + "/api/v1/question-banks", body)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}List questions in a bank
AccessAdmin, or an API key with the read or write scope.
Lists questions with their latest version and how many versions exist. Filter with status=ACTIVE or ARCHIVED.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| bankIdrequired | path | string (uuid) | The id from a previous response. |
| status | query | string | matches ACTIVE|ARCHIVED |
Responses
Example response
[
{
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"latest": {
"body": {},
"createdAt": "2026-11-25T14:03:11Z",
"explanation": "Always use the nearest safe exit.",
"gradingMode": "string",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"points": 1,
"prompt": "Where do you go when the fire alarm sounds?",
"type": "SINGLE_CHOICE",
"versionNumber": 1
},
"status": "ACTIVE",
"versionCount": 1
}
]Errors
| Status | When |
|---|---|
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
| 404 | It doesn't exist, or it belongs to another tenant (the two look the same on purpose). |
Errors use RFC 9457 problem details.
BANK_ID=7e41743a-ffa6-461a-a5b3-c125e18b0472
curl -X GET "$LMS_URL/api/v1/question-banks/$BANK_ID/questions?status=ACTIVE" \
-H "X-API-Key: $LMS_KEY"const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const bankId = "7e41743a-ffa6-461a-a5b3-c125e18b0472"
const res = await fetch(`${LMS_URL}/api/v1/question-banks/${bankId}/questions?status=ACTIVE`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const bankId = "7e41743a-ffa6-461a-a5b3-c125e18b0472"
const res = await fetch(`${LMS_URL}/api/v1/question-banks/${bankId}/questions?status=ACTIVE`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
bank_id = "7e41743a-ffa6-461a-a5b3-c125e18b0472"
res = requests.get(f"{LMS_URL}/api/v1/question-banks/{bank_id}/questions?status=ACTIVE", headers=HEADERS, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String bankId = "7e41743a-ffa6-461a-a5b3-c125e18b0472";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/question-banks/" + bankId + "/questions?status=ACTIVE"))
.header("X-API-Key", lmsKey)
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
bank_id = "7e41743a-ffa6-461a-a5b3-c125e18b0472"
uri = URI("#{lms_url}/api/v1/question-banks/#{bank_id}/questions?status=ACTIVE")
request = Net::HTTP::Get.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"))
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$bankId = "7e41743a-ffa6-461a-a5b3-c125e18b0472";
$ch = curl_init("$lmsUrl/api/v1/question-banks/{$bankId}/questions?status=ACTIVE");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY')],
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
bankId := "7e41743a-ffa6-461a-a5b3-c125e18b0472"
req, _ := http.NewRequest("GET", os.Getenv("LMS_URL") + "/api/v1/question-banks/" + bankId + "/questions?status=ACTIVE", nil)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}Create a question
AccessAdmin, or an API key with the write scope.
Creates a question and its first version. type is one of SINGLE_CHOICE, MULTIPLE_CHOICE, TRUE_FALSE, SHORT_TEXT, NUMERIC, ORDERING, MATCHING, LONG_TEXT, and body must match that type exactly. Each shape is described in Quizzes & questions.
Essay (LONG_TEXT) questions are always graded by a person. points defaults to 1.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| bankIdrequired | path | string (uuid) | The id from a previous response. |
Request body application/json · QuestionInput
| Field | Type | Notes |
|---|---|---|
| bodyrequired | JsonNode | — |
| explanation | string | — |
| gradingMode | string | matches AUTO|MANUAL |
| points | number | min 0 |
| promptrequired | string | min length 1 |
| typerequired | string | matches SINGLE_CHOICE|MULTIPLE_CHOICE|TRUE_FALSE|SHORT_TEXT|NUMERIC|ORDERING|MATCHING|LONG_TEXT |
Example request body
{
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"points": 1,
"explanation": "Always use the nearest safe exit.",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
},
{
"id": "c",
"text": "The lift"
}
],
"correctOptionId": "a"
}
}Responses
Example response
{
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"latest": {
"body": {},
"createdAt": "2026-11-25T14:03:11Z",
"explanation": "Always use the nearest safe exit.",
"gradingMode": "string",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"points": 1,
"prompt": "Where do you go when the fire alarm sounds?",
"type": "SINGLE_CHOICE",
"versionNumber": 1
},
"status": "ACTIVE",
"versionCount": 1
}Errors
| Status | When |
|---|---|
| 400 | The body doesn't match the type (for example the correct option id isn't one of the options). |
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
| 404 | It doesn't exist, or it belongs to another tenant (the two look the same on purpose). |
Errors use RFC 9457 problem details.
BANK_ID=7e41743a-ffa6-461a-a5b3-c125e18b0472
curl -X POST "$LMS_URL/api/v1/question-banks/$BANK_ID/questions" \
-H "X-API-Key: $LMS_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"points": 1,
"explanation": "Always use the nearest safe exit.",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
},
{
"id": "c",
"text": "The lift"
}
],
"correctOptionId": "a"
}
}'const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const bankId = "7e41743a-ffa6-461a-a5b3-c125e18b0472"
const res = await fetch(`${LMS_URL}/api/v1/question-banks/${bankId}/questions`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"points": 1,
"explanation": "Always use the nearest safe exit.",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
},
{
"id": "c",
"text": "The lift"
}
],
"correctOptionId": "a"
}
}),
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const bankId = "7e41743a-ffa6-461a-a5b3-c125e18b0472"
const res = await fetch(`${LMS_URL}/api/v1/question-banks/${bankId}/questions`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"points": 1,
"explanation": "Always use the nearest safe exit.",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
},
{
"id": "c",
"text": "The lift"
}
],
"correctOptionId": "a"
}
}),
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
bank_id = "7e41743a-ffa6-461a-a5b3-c125e18b0472"
res = requests.post(f"{LMS_URL}/api/v1/question-banks/{bank_id}/questions", headers=HEADERS, json={
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"points": 1,
"explanation": "Always use the nearest safe exit.",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit",
},
{
"id": "b",
"text": "Back to my desk",
},
{
"id": "c",
"text": "The lift",
},
],
"correctOptionId": "a",
},
}, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String bankId = "7e41743a-ffa6-461a-a5b3-c125e18b0472";
String body = """
{
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"points": 1,
"explanation": "Always use the nearest safe exit.",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
},
{
"id": "c",
"text": "The lift"
}
],
"correctOptionId": "a"
}
}
""";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/question-banks/" + bankId + "/questions"))
.header("X-API-Key", lmsKey)
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
bank_id = "7e41743a-ffa6-461a-a5b3-c125e18b0472"
uri = URI("#{lms_url}/api/v1/question-banks/#{bank_id}/questions")
request = Net::HTTP::Post.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"), "Content-Type" => "application/json")
request.body = {
"type" => "SINGLE_CHOICE",
"prompt" => "Where do you go when the fire alarm sounds?",
"points" => 1,
"explanation" => "Always use the nearest safe exit.",
"body" => {
"options" => [
{
"id" => "a",
"text" => "The nearest safe exit",
},
{
"id" => "b",
"text" => "Back to my desk",
},
{
"id" => "c",
"text" => "The lift",
},
],
"correctOptionId" => "a",
},
}.to_json
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$bankId = "7e41743a-ffa6-461a-a5b3-c125e18b0472";
$ch = curl_init("$lmsUrl/api/v1/question-banks/{$bankId}/questions");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
"type" => "SINGLE_CHOICE",
"prompt" => "Where do you go when the fire alarm sounds?",
"points" => 1,
"explanation" => "Always use the nearest safe exit.",
"body" => [
"options" => [
[
"id" => "a",
"text" => "The nearest safe exit",
],
[
"id" => "b",
"text" => "Back to my desk",
],
[
"id" => "c",
"text" => "The lift",
],
],
"correctOptionId" => "a",
],
]),
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
bankId := "7e41743a-ffa6-461a-a5b3-c125e18b0472"
body := strings.NewReader(`{
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"points": 1,
"explanation": "Always use the nearest safe exit.",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
},
{
"id": "c",
"text": "The lift"
}
],
"correctOptionId": "a"
}
}`)
req, _ := http.NewRequest("POST", os.Getenv("LMS_URL") + "/api/v1/question-banks/" + bankId + "/questions", body)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}Get a question with all its versions
AccessAdmin, or an API key with the read or write scope.
Returns the question and every version, newest first. Versions are immutable.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | string (uuid) | The id from a previous response. |
Responses
Example response
{
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"status": "ACTIVE",
"versions": [
{
"body": {},
"createdAt": "2026-11-25T14:03:11Z",
"explanation": "Always use the nearest safe exit.",
"gradingMode": "string",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"points": 1,
"prompt": "Where do you go when the fire alarm sounds?",
"type": "SINGLE_CHOICE",
"versionNumber": 1
}
]
}Errors
| Status | When |
|---|---|
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
| 404 | It doesn't exist, or it belongs to another tenant (the two look the same on purpose). |
Errors use RFC 9457 problem details.
QUESTION_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X GET "$LMS_URL/api/v1/questions/$QUESTION_ID" \
-H "X-API-Key: $LMS_KEY"const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const questionId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/questions/${questionId}`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const questionId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/questions/${questionId}`, {
method: 'GET',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
question_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
res = requests.get(f"{LMS_URL}/api/v1/questions/{question_id}", headers=HEADERS, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String questionId = "37386ae0-0ea5-44e0-a02e-161f807af560";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/questions/" + questionId))
.header("X-API-Key", lmsKey)
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
question_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
uri = URI("#{lms_url}/api/v1/questions/#{question_id}")
request = Net::HTTP::Get.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"))
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$questionId = "37386ae0-0ea5-44e0-a02e-161f807af560";
$ch = curl_init("$lmsUrl/api/v1/questions/{$questionId}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY')],
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
questionId := "37386ae0-0ea5-44e0-a02e-161f807af560"
req, _ := http.NewRequest("GET", os.Getenv("LMS_URL") + "/api/v1/questions/" + questionId, nil)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}Archive a question
AccessAdmin, or an API key with the write scope.
Archived questions stay in quizzes that already use them but can't be added to new ones or drawn into new pools.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | string (uuid) | The id from a previous response. |
Responses
Example response
{
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"latest": {
"body": {},
"createdAt": "2026-11-25T14:03:11Z",
"explanation": "Always use the nearest safe exit.",
"gradingMode": "string",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"points": 1,
"prompt": "Where do you go when the fire alarm sounds?",
"type": "SINGLE_CHOICE",
"versionNumber": 1
},
"status": "ACTIVE",
"versionCount": 1
}Errors
| Status | When |
|---|---|
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
| 404 | It doesn't exist, or it belongs to another tenant (the two look the same on purpose). |
Errors use RFC 9457 problem details.
QUESTION_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X POST "$LMS_URL/api/v1/questions/$QUESTION_ID/archive" \
-H "X-API-Key: $LMS_KEY"const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const questionId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/questions/${questionId}/archive`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const questionId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/questions/${questionId}/archive`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
question_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
res = requests.post(f"{LMS_URL}/api/v1/questions/{question_id}/archive", headers=HEADERS, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String questionId = "37386ae0-0ea5-44e0-a02e-161f807af560";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/questions/" + questionId + "/archive"))
.header("X-API-Key", lmsKey)
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
question_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
uri = URI("#{lms_url}/api/v1/questions/#{question_id}/archive")
request = Net::HTTP::Post.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"))
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$questionId = "37386ae0-0ea5-44e0-a02e-161f807af560";
$ch = curl_init("$lmsUrl/api/v1/questions/{$questionId}/archive");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY')],
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
questionId := "37386ae0-0ea5-44e0-a02e-161f807af560"
req, _ := http.NewRequest("POST", os.Getenv("LMS_URL") + "/api/v1/questions/" + questionId + "/archive", nil)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}Move a question to another bank
AccessAdmin, or an API key with the write scope.
A question lives in exactly one bank; moving it is an explicit act.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | string (uuid) | The id from a previous response. |
Request body application/json · MoveQuestion
| Field | Type | Notes |
|---|---|---|
| bankIdrequired | string (uuid) | — |
Example request body
{
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472"
}Responses
Example response
{
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"latest": {
"body": {},
"createdAt": "2026-11-25T14:03:11Z",
"explanation": "Always use the nearest safe exit.",
"gradingMode": "string",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"points": 1,
"prompt": "Where do you go when the fire alarm sounds?",
"type": "SINGLE_CHOICE",
"versionNumber": 1
},
"status": "ACTIVE",
"versionCount": 1
}Errors
| Status | When |
|---|---|
| 400 | The request was malformed or failed validation. errors lists each field. |
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
| 404 | It doesn't exist, or it belongs to another tenant (the two look the same on purpose). |
Errors use RFC 9457 problem details.
QUESTION_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X PUT "$LMS_URL/api/v1/questions/$QUESTION_ID/bank" \
-H "X-API-Key: $LMS_KEY" \
-H "Content-Type: application/json" \
-d '{
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472"
}'const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const questionId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/questions/${questionId}/bank`, {
method: 'PUT',
headers: { "X-API-Key": LMS_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472"
}),
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const questionId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/questions/${questionId}/bank`, {
method: 'PUT',
headers: { "X-API-Key": LMS_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472"
}),
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
question_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
res = requests.put(f"{LMS_URL}/api/v1/questions/{question_id}/bank", headers=HEADERS, json={
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472",
}, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String questionId = "37386ae0-0ea5-44e0-a02e-161f807af560";
String body = """
{
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472"
}
""";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/questions/" + questionId + "/bank"))
.header("X-API-Key", lmsKey)
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString(body))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
question_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
uri = URI("#{lms_url}/api/v1/questions/#{question_id}/bank")
request = Net::HTTP::Put.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"), "Content-Type" => "application/json")
request.body = {
"bankId" => "7e41743a-ffa6-461a-a5b3-c125e18b0472",
}.to_json
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$questionId = "37386ae0-0ea5-44e0-a02e-161f807af560";
$ch = curl_init("$lmsUrl/api/v1/questions/{$questionId}/bank");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
"bankId" => "7e41743a-ffa6-461a-a5b3-c125e18b0472",
]),
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
questionId := "37386ae0-0ea5-44e0-a02e-161f807af560"
body := strings.NewReader(`{
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472"
}`)
req, _ := http.NewRequest("PUT", os.Getenv("LMS_URL") + "/api/v1/questions/" + questionId + "/bank", body)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}Restore a question
AccessAdmin, or an API key with the write scope.
Makes an archived question active again.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | string (uuid) | The id from a previous response. |
Responses
Example response
{
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"latest": {
"body": {},
"createdAt": "2026-11-25T14:03:11Z",
"explanation": "Always use the nearest safe exit.",
"gradingMode": "string",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"points": 1,
"prompt": "Where do you go when the fire alarm sounds?",
"type": "SINGLE_CHOICE",
"versionNumber": 1
},
"status": "ACTIVE",
"versionCount": 1
}Errors
| Status | When |
|---|---|
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
| 404 | It doesn't exist, or it belongs to another tenant (the two look the same on purpose). |
Errors use RFC 9457 problem details.
QUESTION_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X POST "$LMS_URL/api/v1/questions/$QUESTION_ID/restore" \
-H "X-API-Key: $LMS_KEY"const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const questionId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/questions/${questionId}/restore`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const questionId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/questions/${questionId}/restore`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY },
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
question_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
res = requests.post(f"{LMS_URL}/api/v1/questions/{question_id}/restore", headers=HEADERS, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String questionId = "37386ae0-0ea5-44e0-a02e-161f807af560";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/questions/" + questionId + "/restore"))
.header("X-API-Key", lmsKey)
.method("POST", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
question_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
uri = URI("#{lms_url}/api/v1/questions/#{question_id}/restore")
request = Net::HTTP::Post.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"))
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$questionId = "37386ae0-0ea5-44e0-a02e-161f807af560";
$ch = curl_init("$lmsUrl/api/v1/questions/{$questionId}/restore");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY')],
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
questionId := "37386ae0-0ea5-44e0-a02e-161f807af560"
req, _ := http.NewRequest("POST", os.Getenv("LMS_URL") + "/api/v1/questions/" + questionId + "/restore", nil)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}Edit a question (adds a version)
AccessAdmin, or an API key with the write scope.
A question is never edited in place. Posting here adds the next immutable version. The type can't change; create a new question for that.
Quizzes that already use the question keep the version they pinned until you upgrade them with POST /assessment-items/{id}/upgrade. Attempts always show the exact version the learner saw.
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
| idrequired | path | string (uuid) | The id from a previous response. |
Request body application/json · QuestionInput
| Field | Type | Notes |
|---|---|---|
| bodyrequired | JsonNode | — |
| explanation | string | — |
| gradingMode | string | matches AUTO|MANUAL |
| points | number | min 0 |
| promptrequired | string | min length 1 |
| typerequired | string | matches SINGLE_CHOICE|MULTIPLE_CHOICE|TRUE_FALSE|SHORT_TEXT|NUMERIC|ORDERING|MATCHING|LONG_TEXT |
Example request body
{
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
}
],
"correctOptionId": "a"
}
}Responses
Example response
{
"bankId": "7e41743a-ffa6-461a-a5b3-c125e18b0472",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"latest": {
"body": {},
"createdAt": "2026-11-25T14:03:11Z",
"explanation": "Always use the nearest safe exit.",
"gradingMode": "string",
"id": "37386ae0-0ea5-44e0-a02e-161f807af560",
"points": 1,
"prompt": "Where do you go when the fire alarm sounds?",
"type": "SINGLE_CHOICE",
"versionNumber": 1
},
"status": "ACTIVE",
"versionCount": 1
}Errors
| Status | When |
|---|---|
| 400 | The type differs from the question's type, or the body is invalid. |
| 401 | Missing, invalid or expired credentials. |
| 403 | Your credential is valid but isn't allowed to do this. |
| 404 | It doesn't exist, or it belongs to another tenant (the two look the same on purpose). |
Errors use RFC 9457 problem details.
QUESTION_ID=37386ae0-0ea5-44e0-a02e-161f807af560
curl -X POST "$LMS_URL/api/v1/questions/$QUESTION_ID/versions" \
-H "X-API-Key: $LMS_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
}
],
"correctOptionId": "a"
}
}'const LMS_URL = process.env.LMS_URL
const LMS_KEY = process.env.LMS_KEY
const questionId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/questions/${questionId}/versions`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
}
],
"correctOptionId": "a"
}
}),
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data = await res.json()const LMS_URL = process.env.LMS_URL!
const LMS_KEY = process.env.LMS_KEY!
const questionId = "37386ae0-0ea5-44e0-a02e-161f807af560"
const res = await fetch(`${LMS_URL}/api/v1/questions/${questionId}/versions`, {
method: 'POST',
headers: { "X-API-Key": LMS_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
}
],
"correctOptionId": "a"
}
}),
})
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`)
const data: unknown = await res.json()import os
import requests
LMS_URL = os.environ["LMS_URL"]
HEADERS = {"X-API-Key": os.environ["LMS_KEY"]}
question_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
res = requests.post(f"{LMS_URL}/api/v1/questions/{question_id}/versions", headers=HEADERS, json={
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit",
},
{
"id": "b",
"text": "Back to my desk",
},
],
"correctOptionId": "a",
},
}, timeout=10)
res.raise_for_status()
data = res.json()import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Request {
public static void main(String[] args) throws Exception {
String lmsUrl = System.getenv("LMS_URL");
String lmsKey = System.getenv("LMS_KEY");
String questionId = "37386ae0-0ea5-44e0-a02e-161f807af560";
String body = """
{
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
}
],
"correctOptionId": "a"
}
}
""";
var request = HttpRequest.newBuilder(URI.create(lmsUrl + "/api/v1/questions/" + questionId + "/versions"))
.header("X-API-Key", lmsKey)
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString(body))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 300) throw new IllegalStateException(response.statusCode() + " " + response.body());
System.out.println(response.body());
}
}require "net/http"
require "json"
lms_url = ENV.fetch("LMS_URL")
question_id = "37386ae0-0ea5-44e0-a02e-161f807af560"
uri = URI("#{lms_url}/api/v1/questions/#{question_id}/versions")
request = Net::HTTP::Post.new(uri, "X-API-Key" => ENV.fetch("LMS_KEY"), "Content-Type" => "application/json")
request.body = {
"type" => "SINGLE_CHOICE",
"prompt" => "Where do you go when the fire alarm sounds?",
"body" => {
"options" => [
{
"id" => "a",
"text" => "The nearest safe exit",
},
{
"id" => "b",
"text" => "Back to my desk",
},
],
"correctOptionId" => "a",
},
}.to_json
response = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(request) }
raise "#{response.code} #{response.body}" unless response.is_a?(Net::HTTPSuccess)
data = JSON.parse(response.body)<?php
$lmsUrl = getenv('LMS_URL');
$questionId = "37386ae0-0ea5-44e0-a02e-161f807af560";
$ch = curl_init("$lmsUrl/api/v1/questions/{$questionId}/versions");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-Key: ' . getenv('LMS_KEY'), 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
"type" => "SINGLE_CHOICE",
"prompt" => "Where do you go when the fire alarm sounds?",
"body" => [
"options" => [
[
"id" => "a",
"text" => "The nearest safe exit",
],
[
"id" => "b",
"text" => "Back to my desk",
],
],
"correctOptionId" => "a",
],
]),
]);
$response = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 300) {
throw new RuntimeException($response);
}
$data = json_decode($response, true);package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
questionId := "37386ae0-0ea5-44e0-a02e-161f807af560"
body := strings.NewReader(`{
"type": "SINGLE_CHOICE",
"prompt": "Where do you go when the fire alarm sounds?",
"body": {
"options": [
{
"id": "a",
"text": "The nearest safe exit"
},
{
"id": "b",
"text": "Back to my desk"
}
],
"correctOptionId": "a"
}
}`)
req, _ := http.NewRequest("POST", os.Getenv("LMS_URL") + "/api/v1/questions/" + questionId + "/versions", body)
req.Header.Set("X-API-Key", os.Getenv("LMS_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
data, _ := io.ReadAll(res.Body)
if res.StatusCode >= 300 {
panic(fmt.Sprintf("%d %s", res.StatusCode, data))
}
fmt.Println(string(data))
}