Your masjid · Content
Your collections
Titled sets of your news or your events, in order.
Right on the key: Content: read for a read, edit (secret key) for a write.
Your collections
GET/v1/masjid/collections
Your organization's collections, titled sets of its news or events, 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 collections.
objectlistAlways
list.dataobject[]The items of this page.
Show child attributes (16)
objectcollectionAlways
collection.idstringThe collection id.
titlestringThe title.
typeevents | news | nullWhat it gathers:
newsorevents.mediaobject | nullThe media it shows.
media.idstringThe media id.
media.typestring | nullpicture,videoordocument.media.urlstring | nullThe URL to show it from.
newsobject[]The news it holds, in order.
news[].idstringThe news item id.
news[].titlestring | nullIts title.
eventsobject[]The events it holds, in order.
events[].idstringThe event id.
events[].titlestring | nullIts title.
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/collections" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"data": [
{
"createdAt": "2026-11-12T08:00:00.000Z",
"events": [],
"id": "col_6af5c9e2bc095fbd2dc57363",
"media": null,
"news": [
{
"id": "nws_6af5c9e2bc095fbd2dc57361",
"title": "The new wing opens"
}
],
"object": "collection",
"title": "Ramadan 2027",
"type": "news",
"updatedAt": "2026-11-12T08:00:00.000Z"
}
],
"object": "list",
"pagination": {
"hasMore": false,
"limit": 25,
"nextCursor": null
}
}One of your collections
GET/v1/masjid/collections/{id}
A collection of your organization: the news (nws_) or events (evt_) it holds, in order, each with its title. Needs Content: read.
Parameters
idstring · pathrequiredThe collection id.
Returns
The collection.
objectcollectionAlways
collection.idstringThe collection id.
titlestringThe title.
typeevents | news | nullWhat it gathers:
newsorevents.mediaobject | nullThe media it shows.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
newsobject[]The news it holds, in order.
Show child attributes (2)
idstringThe news item id.
titlestring | nullIts title.
eventsobject[]The events it holds, in order.
Show child attributes (2)
idstringThe event id.
titlestring | nullIts title.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl "https://hub.masjidbox.com/v1/masjid/collections/col_6af5c9e2bc095fbd2dc57363" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"createdAt": "2026-11-12T08:00:00.000Z",
"events": [],
"id": "col_6af5c9e2bc095fbd2dc57363",
"media": null,
"news": [
{
"id": "nws_6af5c9e2bc095fbd2dc57361",
"title": "The new wing opens"
}
],
"object": "collection",
"title": "Ramadan 2027",
"type": "news",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Create a collection
POST/v1/masjid/collections
Creates a collection of your news (news, nws_ ids) or events (events, evt_ ids), in order. A media, news item or event that is not your organization's is a 400. 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
typeevents | news | nullWhat it gathers:
newsorevents.mediastring | nullA media of your organization (upload it first); null removes it.
newsstring[]News of your organization (
nws_ids), in order: the list replaces the stored one.eventsstring[]Events of your organization (
evt_ids), in order: the list replaces the stored one.titlestringrequiredThe title.
Returns
The collection, as stored.
objectcollectionAlways
collection.idstringThe collection id.
titlestringThe title.
typeevents | news | nullWhat it gathers:
newsorevents.mediaobject | nullThe media it shows.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
newsobject[]The news it holds, in order.
Show child attributes (2)
idstringThe news item id.
titlestring | nullIts title.
eventsobject[]The events it holds, in order.
Show child attributes (2)
idstringThe event id.
titlestring | nullIts title.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl -X POST "https://hub.masjidbox.com/v1/masjid/collections" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"news":["nws_6af5c9e2bc095fbd2dc57361"],"title":"Ramadan 2027","type":"news"}'{
"news": [
"nws_6af5c9e2bc095fbd2dc57361"
],
"title": "Ramadan 2027",
"type": "news"
}{
"createdAt": "2026-11-12T08:00:00.000Z",
"events": [],
"id": "col_6af5c9e2bc095fbd2dc57363",
"media": null,
"news": [
{
"id": "nws_6af5c9e2bc095fbd2dc57361",
"title": "The new wing opens"
}
],
"object": "collection",
"title": "Ramadan 2027",
"type": "news",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Change a collection
PATCH/v1/masjid/collections/{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. news and events replace their list whole. A media, news item or event that is not your organization's is a 400. 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 collection id.
Request body
typeevents | news | nullWhat it gathers:
newsorevents.mediastring | nullA media of your organization (upload it first); null removes it.
newsstring[]News of your organization (
nws_ids), in order: the list replaces the stored one.eventsstring[]Events of your organization (
evt_ids), in order: the list replaces the stored one.titlestringThe title.
Returns
The collection after the change.
objectcollectionAlways
collection.idstringThe collection id.
titlestringThe title.
typeevents | news | nullWhat it gathers:
newsorevents.mediaobject | nullThe media it shows.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
newsobject[]The news it holds, in order.
Show child attributes (2)
idstringThe news item id.
titlestring | nullIts title.
eventsobject[]The events it holds, in order.
Show child attributes (2)
idstringThe event id.
titlestring | nullIts title.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/collections/col_6af5c9e2bc095fbd2dc57363" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"news":["nws_6af5c9e2bc095fbd2dc57361"]}'{
"news": [
"nws_6af5c9e2bc095fbd2dc57361"
]
}{
"createdAt": "2026-11-12T08:00:00.000Z",
"events": [],
"id": "col_6af5c9e2bc095fbd2dc57363",
"media": null,
"news": [
{
"id": "nws_6af5c9e2bc095fbd2dc57361",
"title": "The new wing opens"
}
],
"object": "collection",
"title": "Ramadan 2027",
"type": "news",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Delete a collection
DELETE/v1/masjid/collections/{id}
Deletes a collection. Its news and events stay. 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 collection id.
Returns
Deleted. No body.
204 · No response body.
Errors
curl -X DELETE "https://hub.masjidbox.com/v1/masjid/collections/col_6af5c9e2bc095fbd2dc57363" \
-H "Authorization: Bearer $MASJIDBOX_KEY"