Your masjid · Content
Your news
The news items of your organization, as the Masjidbox apps and pages show them: a title, a text and a media.
Right on the key: Content: read for a read, edit (secret key) for a write.
Your news
GET/v1/masjid/news
Your organization's news, as the Masjidbox apps and pages show them, 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 news.
objectlistAlways
list.dataobject[]The items of this page.
Show child attributes (10)
objectnewsAlways
news.idstringThe news id.
titlestringThe title.
descriptionstring | nullThe text.
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/news" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"data": [
{
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "The new wing opens on Friday after Jumuah.",
"id": "nws_6af5c9e2bc095fbd2dc57361",
"media": {
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
},
"object": "news",
"title": "The new wing opens",
"updatedAt": "2026-11-12T08:00:00.000Z"
}
],
"object": "list",
"pagination": {
"hasMore": false,
"limit": 25,
"nextCursor": null
}
}One of your news
GET/v1/masjid/news/{id}
A news item of your organization, with the media it shows. Needs Content: read.
Parameters
idstring · pathrequiredThe news id.
Returns
The news item.
objectnewsAlways
news.idstringThe news id.
titlestringThe title.
descriptionstring | nullThe text.
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/news/nws_6af5c9e2bc095fbd2dc57361" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "The new wing opens on Friday after Jumuah.",
"id": "nws_6af5c9e2bc095fbd2dc57361",
"media": {
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
},
"object": "news",
"title": "The new wing opens",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Create a news item
POST/v1/masjid/news
Creates a news item: a title, a text and a media of your organization. The apps and pages show it within minutes. 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 text.
mediastring | nullA media of your organization (upload it first); null removes it.
titlestringrequiredThe title.
Returns
The news item, as stored.
objectnewsAlways
news.idstringThe news id.
titlestringThe title.
descriptionstring | nullThe text.
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/news" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"description":"The new wing opens on Friday after Jumuah.","title":"The new wing opens"}'{
"description": "The new wing opens on Friday after Jumuah.",
"title": "The new wing opens"
}{
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "The new wing opens on Friday after Jumuah.",
"id": "nws_6af5c9e2bc095fbd2dc57361",
"media": {
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
},
"object": "news",
"title": "The new wing opens",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Change a news item
PATCH/v1/masjid/news/{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. 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 news id.
Request body
descriptionstring | nullThe text.
mediastring | nullA media of your organization (upload it first); null removes it.
titlestringThe title.
Returns
The news item after the change.
objectnewsAlways
news.idstringThe news id.
titlestringThe title.
descriptionstring | nullThe text.
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/news/nws_6af5c9e2bc095fbd2dc57361" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"The new wing opens on Friday"}'{
"title": "The new wing opens on Friday"
}{
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "The new wing opens on Friday after Jumuah.",
"id": "nws_6af5c9e2bc095fbd2dc57361",
"media": {
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
},
"object": "news",
"title": "The new wing opens",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Delete a news item
DELETE/v1/masjid/news/{id}
Deletes a news item everywhere it shows, and takes it off your collections. 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 news id.
Returns
Deleted. No body.
204 · No response body.
Errors
curl -X DELETE "https://hub.masjidbox.com/v1/masjid/news/nws_6af5c9e2bc095fbd2dc57361" \
-H "Authorization: Bearer $MASJIDBOX_KEY"