Your masjid · Content
Your quizzes
Your quizzes and their results, counted per answer. Never a play: a play carries the player's name and email.
Right on the key: Content: read for a read, edit (secret key) for a write.
Your quizzes
GET/v1/masjid/quizzes
Your organization's quizzes, each with its results: how many times it was played and how many plays picked each answer: aggregates only, newest first, by cursor (limit 1 to 100, 25 by default; cursor from the previous page). Needs Content: read.
Parameters
limitinteger · queryItems per page, 1 to 100.
cursorstring · queryThe previous page's
pagination.nextCursor; absent for the first page.
Returns
A page of quizzes.
objectlistAlways
list.dataobject[]The items of this page.
Show child attributes (23)
objectquizAlways
quiz.idstringThe quiz id.
titlestring | nullThe title.
descriptionstring | nullThe description.
timenumber | nullThe time budget, in seconds.
levelnumber | nullThe difficulty level.
beginstring | nullWhen it opens (ISO-8601).
endstring | nullWhen it closes (ISO-8601).
questionsobject[]The questions, in order.
questions[].idstring | nullThe question id, to keep it on a change.
questions[].textstring | nullIts wording.
questions[].answersobject[]Its answers, each counted.
questions[].answers[].idstring | nullThe answer id, to keep it on a change.
questions[].answers[].textstring | nullIts label.
questions[].answers[].correctboolean | nullWhether it is the correct one.
questions[].answers[].picksintegerThe plays that picked it.
playersintegerHow many times it was played.
mediaobject | nullThe media it shows.
media.idstringThe media id.
media.typestring | nullpicture,videoordocument.media.urlstring | nullThe URL to show it from.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
paginationobjectWhere this page stands.
Show child attributes (3)
limitintegerThe page size asked for.
hasMorebooleanWhether another page follows: stop on false, never on a short page.
nextCursorstring | nullThe
cursorof the next page; null on the last one.
Errors
curl "https://hub.masjidbox.com/v1/masjid/quizzes" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"data": [
{
"begin": "2026-12-01T00:00:00.000Z",
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "Test your knowledge",
"end": null,
"id": "qiz_6af5c9e2bc095fbd2dc57366",
"level": 1,
"media": null,
"object": "quiz",
"players": 14,
"questions": [
{
"answers": [
{
"correct": true,
"id": "000000000000000000000082",
"picks": 11,
"text": "The 27th"
},
{
"correct": false,
"id": "000000000000000000000083",
"picks": 3,
"text": "The 15th"
}
],
"id": "000000000000000000000081",
"text": "Which night is Laylat al-Qadr sought on most?"
}
],
"time": 300,
"title": "Ramadan quiz",
"updatedAt": "2026-11-12T08:00:00.000Z"
}
],
"object": "list",
"pagination": {
"hasMore": false,
"limit": 25,
"nextCursor": null
}
}One of your quizzes
GET/v1/masjid/quizzes/{id}
A quiz of your organization, its questions and answers, and its results counted per answer. Needs Content: read.
Parameters
idstring · pathrequiredThe quiz id.
Returns
The quiz.
objectquizAlways
quiz.idstringThe quiz id.
titlestring | nullThe title.
descriptionstring | nullThe description.
timenumber | nullThe time budget, in seconds.
levelnumber | nullThe difficulty level.
beginstring | nullWhen it opens (ISO-8601).
endstring | nullWhen it closes (ISO-8601).
questionsobject[]The questions, in order.
Show child attributes (7)
idstring | nullThe question id, to keep it on a change.
textstring | nullIts wording.
answersobject[]Its answers, each counted.
answers[].idstring | nullThe answer id, to keep it on a change.
answers[].textstring | nullIts label.
answers[].correctboolean | nullWhether it is the correct one.
answers[].picksintegerThe plays that picked it.
playersintegerHow many times it was played.
mediaobject | nullThe media it shows.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl "https://hub.masjidbox.com/v1/masjid/quizzes/qiz_6af5c9e2bc095fbd2dc57366" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"begin": "2026-12-01T00:00:00.000Z",
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "Test your knowledge",
"end": null,
"id": "qiz_6af5c9e2bc095fbd2dc57366",
"level": 1,
"media": null,
"object": "quiz",
"players": 14,
"questions": [
{
"answers": [
{
"correct": true,
"id": "000000000000000000000082",
"picks": 11,
"text": "The 27th"
},
{
"correct": false,
"id": "000000000000000000000083",
"picks": 3,
"text": "The 15th"
}
],
"id": "000000000000000000000081",
"text": "Which night is Laylat al-Qadr sought on most?"
}
],
"time": 300,
"title": "Ramadan quiz",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Create a quiz
POST/v1/masjid/quizzes
Creates a quiz: its questions, their answers (which are correct), its time budget, level and dates. Nothing can play through the API. Needs a secret key with Content: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.
Parameters
No parameters.
Request body
descriptionstring | nullThe description.
timeinteger | nullThe time budget, in seconds.
levelinteger | nullThe difficulty level.
beginstring | nullWhen it opens (ISO-8601, with its offset).
endstring | nullWhen it closes (ISO-8601, with its offset).
questionsobject[]The questions: the list replaces the quiz's.
Show child attributes (6)
idstringA stored question's id, to keep it; absent, a new one.
textstringrequiredIts wording.
answersobject[]requiredIts answers.
answers[].idstringA stored answer's id, to keep it; absent, a new one.
answers[].textstringrequiredIts label.
answers[].correctbooleanrequiredWhether it is the correct one.
mediastring | nullA media of your organization (upload it first); null removes it.
titlestringrequiredThe title.
Returns
The quiz, as stored.
objectquizAlways
quiz.idstringThe quiz id.
titlestring | nullThe title.
descriptionstring | nullThe description.
timenumber | nullThe time budget, in seconds.
levelnumber | nullThe difficulty level.
beginstring | nullWhen it opens (ISO-8601).
endstring | nullWhen it closes (ISO-8601).
questionsobject[]The questions, in order.
Show child attributes (7)
idstring | nullThe question id, to keep it on a change.
textstring | nullIts wording.
answersobject[]Its answers, each counted.
answers[].idstring | nullThe answer id, to keep it on a change.
answers[].textstring | nullIts label.
answers[].correctboolean | nullWhether it is the correct one.
answers[].picksintegerThe plays that picked it.
playersintegerHow many times it was played.
mediaobject | nullThe media it shows.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl -X POST "https://hub.masjidbox.com/v1/masjid/quizzes" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"time":300,"title":"Ramadan quiz"}'{
"time": 300,
"title": "Ramadan quiz"
}{
"begin": "2026-12-01T00:00:00.000Z",
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "Test your knowledge",
"end": null,
"id": "qiz_6af5c9e2bc095fbd2dc57366",
"level": 1,
"media": null,
"object": "quiz",
"players": 14,
"questions": [
{
"answers": [
{
"correct": true,
"id": "000000000000000000000082",
"picks": 11,
"text": "The 27th"
},
{
"correct": false,
"id": "000000000000000000000083",
"picks": 3,
"text": "The 15th"
}
],
"id": "000000000000000000000081",
"text": "Which night is Laylat al-Qadr sought on most?"
}
],
"time": 300,
"title": "Ramadan quiz",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Change a quiz
PATCH/v1/masjid/quizzes/{id}
JSON Merge Patch: a field you leave out stays, null clears it. A media must be one of your organization's (med_ id), else 400. questions replaces the list: a question or an answer kept by its id keeps its counts. Needs a secret key with Content: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.
Parameters
idstring · pathrequiredThe quiz id.
Request body
descriptionstring | nullThe description.
timeinteger | nullThe time budget, in seconds.
levelinteger | nullThe difficulty level.
beginstring | nullWhen it opens (ISO-8601, with its offset).
endstring | nullWhen it closes (ISO-8601, with its offset).
questionsobject[]The questions: the list replaces the quiz's.
Show child attributes (6)
idstringA stored question's id, to keep it; absent, a new one.
textstringrequiredIts wording.
answersobject[]requiredIts answers.
answers[].idstringA stored answer's id, to keep it; absent, a new one.
answers[].textstringrequiredIts label.
answers[].correctbooleanrequiredWhether it is the correct one.
mediastring | nullA media of your organization (upload it first); null removes it.
titlestringThe title.
Returns
The quiz after the change.
objectquizAlways
quiz.idstringThe quiz id.
titlestring | nullThe title.
descriptionstring | nullThe description.
timenumber | nullThe time budget, in seconds.
levelnumber | nullThe difficulty level.
beginstring | nullWhen it opens (ISO-8601).
endstring | nullWhen it closes (ISO-8601).
questionsobject[]The questions, in order.
Show child attributes (7)
idstring | nullThe question id, to keep it on a change.
textstring | nullIts wording.
answersobject[]Its answers, each counted.
answers[].idstring | nullThe answer id, to keep it on a change.
answers[].textstring | nullIts label.
answers[].correctboolean | nullWhether it is the correct one.
answers[].picksintegerThe plays that picked it.
playersintegerHow many times it was played.
mediaobject | nullThe media it shows.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/quizzes/qiz_6af5c9e2bc095fbd2dc57366" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"end":"2026-12-31T23:59:00.000Z"}'{
"end": "2026-12-31T23:59:00.000Z"
}{
"begin": "2026-12-01T00:00:00.000Z",
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "Test your knowledge",
"end": null,
"id": "qiz_6af5c9e2bc095fbd2dc57366",
"level": 1,
"media": null,
"object": "quiz",
"players": 14,
"questions": [
{
"answers": [
{
"correct": true,
"id": "000000000000000000000082",
"picks": 11,
"text": "The 27th"
},
{
"correct": false,
"id": "000000000000000000000083",
"picks": 3,
"text": "The 15th"
}
],
"id": "000000000000000000000081",
"text": "Which night is Laylat al-Qadr sought on most?"
}
],
"time": 300,
"title": "Ramadan quiz",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Delete a quiz
DELETE/v1/masjid/quizzes/{id}
Deletes a quiz and its plays. Needs a secret key with Content: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.
Parameters
idstring · pathrequiredThe quiz id.
Returns
Deleted. No body.
204 · No response body.
Errors
curl -X DELETE "https://hub.masjidbox.com/v1/masjid/quizzes/qiz_6af5c9e2bc095fbd2dc57366" \
-H "Authorization: Bearer $MASJIDBOX_KEY"