Skip to content

Assemble one subject's mock. Deterministic per seed, answers withheld.

POST
/api/v1/papers/{exam}/{subject}
curl --request POST \
--url https://api.utmelab.com/api/v1/papers/example/example \
--header 'X-API-Key: <X-API-Key>'
exam
required
string

Exam code, e.g. JAMB.

subject
required
string

Subject slug, e.g. physics.

seed
integer | null format: int64

Deterministic draw. Same seed, same paper. Defaults to 1, as the published contract always has: omitting it stays reproducible.

country
string | null

Country scope. A question whose topic names other countries is out; a topic that names none is in every country. Omitted means no scope filter, so the draw is the whole pool.

include_explanation
boolean | null

Include answers and explanations. Default: false.

include_passage
boolean | null

Include companion passages for reading comprehension items. Default: false.

Media typeapplication/json
object
exam
required
string
mode
required

Which gate built a paper (D70). Disclosed on the wire: a consumer must be able to tell a balanced mock from a full-length draw.

string
Allowed values: blueprint count
passages
object | null
sections
required
Array<object>
object
name
required
string
questions
required
Array<object>

One question as served. Identical to storage except the answer and working, which are present only when explicitly requested. An answer in a default payload gets rendered by somebody, eventually, by accident. verified comes from the verification log, never a stored flag.

object
answer

Present only when explanations were requested.

string | null
difficulty
required
integer format: int32
exam
required
string
explanation
One of:

Why the answer is what it is: teaser, working, and the distractor that catches people.

object
body
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
key_point
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
trap
One of:

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
id
required
string
lesson_refs

Lessons that teach the idea assessed by this question.

Array<object>
object
id
required
string
order

Canonical position of this reference within its parent.

integer format: int32
title
string
marks
required
number format: float
options
required
Array<object>
object
id
required
string
text
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
passage
One of:

The attached stimulus if requested.

object
author
string | null
exam
required
string
id
required
string
kind
required
string
subject
required
string
text
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
title
string | null
year
required
integer format: int32
passage_id

A stimulus this row belongs to. Fetch it, never ignore it: the stem may be unanswerable without it.

string | null
section
string | null
source
required
string
subject
required
string
subtopic_id
string | null
text
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
topic_slug

The syllabus topic tag for this question when the catalogue provides one.

string | null
verified
required
boolean
year
required
integer format: int32
topic
required
string
seed
required
integer format: int64
subject
required
string
total
required
integer

Example

{
"mode": "blueprint",
"sections": [
{
"questions": [
{
"explanation": {
"body": {
"inline": [
{
"kind": "bold"
}
]
},
"key_point": {
"inline": [
{
"kind": "bold"
}
]
},
"trap": {
"inline": [
{
"kind": "bold"
}
]
}
},
"options": [
{
"text": {
"inline": [
{
"kind": "bold"
}
]
}
}
],
"passage": {
"text": {
"inline": [
{
"kind": "bold"
}
]
}
},
"text": {
"inline": [
{
"kind": "bold"
}
]
}
}
]
}
]
}

An API key is missing or invalid.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The API key lacks the required scope.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

No such exam subject

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The bank cannot fill this paper yet; the body names the gaps

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The caller has exceeded the applicable rate limit.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The API is temporarily unavailable.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}