Your masjid · Content
Your announcements
The banners your apps and screens show: a text, its colours and an optional media.
Right on the key: Content: read for a read, edit (secret key) for a write.
Your announcements
GET/v1/masjid/announcements
Your organization's announcements (the banners of the apps and screens), 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 announcements.
objectlistAlways
list.dataobject[]The items of this page.
Show child attributes (12)
objectannouncementAlways
announcement.idstringThe announcement id.
titlestringThe title.
descriptionstring | nullThe text.
textColorstring | nullThe text colour, CSS hex.
backgroundColorstring | nullThe banner colour, CSS hex.
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/announcements" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"data": [
{
"backgroundColor": "#0f172a",
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "Doors open at 17:30.",
"id": "ann_6af5c9e2bc095fbd2dc5735e",
"media": null,
"object": "announcement",
"textColor": "#ffffff",
"title": "Iftar tonight",
"updatedAt": "2026-11-12T08:00:00.000Z"
}
],
"object": "list",
"pagination": {
"hasMore": false,
"limit": 25,
"nextCursor": null
}
}One of your announcements
GET/v1/masjid/announcements/{id}
An announcement of your organization. Needs Content: read.
Parameters
idstring · pathrequiredThe announcement id.
Returns
The announcement.
objectannouncementAlways
announcement.idstringThe announcement id.
titlestringThe title.
descriptionstring | nullThe text.
textColorstring | nullThe text colour, CSS hex.
backgroundColorstring | nullThe banner colour, CSS hex.
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/announcements/ann_6af5c9e2bc095fbd2dc5735e" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"backgroundColor": "#0f172a",
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "Doors open at 17:30.",
"id": "ann_6af5c9e2bc095fbd2dc5735e",
"media": null,
"object": "announcement",
"textColor": "#ffffff",
"title": "Iftar tonight",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Create an announcement
POST/v1/masjid/announcements
Creates a banner: a title, a text, its colours (CSS hex) and a media of your organization. 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.
textColorstring | nullCSS hex: #rgb, #rrggbb or #rrggbbaa; null clears it.
backgroundColorstring | nullCSS hex: #rgb, #rrggbb or #rrggbbaa; null clears it.
mediastring | nullA media of your organization (upload it first); null removes it.
titlestringrequiredThe title.
Returns
The announcement, as stored.
objectannouncementAlways
announcement.idstringThe announcement id.
titlestringThe title.
descriptionstring | nullThe text.
textColorstring | nullThe text colour, CSS hex.
backgroundColorstring | nullThe banner colour, CSS hex.
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/announcements" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"backgroundColor":"#0f172a","title":"Iftar tonight"}'{
"backgroundColor": "#0f172a",
"title": "Iftar tonight"
}{
"backgroundColor": "#0f172a",
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "Doors open at 17:30.",
"id": "ann_6af5c9e2bc095fbd2dc5735e",
"media": null,
"object": "announcement",
"textColor": "#ffffff",
"title": "Iftar tonight",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Change an announcement
PATCH/v1/masjid/announcements/{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 announcement id.
Request body
descriptionstring | nullThe text.
textColorstring | nullCSS hex: #rgb, #rrggbb or #rrggbbaa; null clears it.
backgroundColorstring | nullCSS hex: #rgb, #rrggbb or #rrggbbaa; null clears it.
mediastring | nullA media of your organization (upload it first); null removes it.
titlestringThe title.
Returns
The announcement after the change.
objectannouncementAlways
announcement.idstringThe announcement id.
titlestringThe title.
descriptionstring | nullThe text.
textColorstring | nullThe text colour, CSS hex.
backgroundColorstring | nullThe banner colour, CSS hex.
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/announcements/ann_6af5c9e2bc095fbd2dc5735e" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Iftar at 18:02"}'{
"title": "Iftar at 18:02"
}{
"backgroundColor": "#0f172a",
"createdAt": "2026-11-12T08:00:00.000Z",
"description": "Doors open at 17:30.",
"id": "ann_6af5c9e2bc095fbd2dc5735e",
"media": null,
"object": "announcement",
"textColor": "#ffffff",
"title": "Iftar tonight",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Delete an announcement
DELETE/v1/masjid/announcements/{id}
Deletes an announcement everywhere it shows. 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 announcement id.
Returns
Deleted. No body.
204 · No response body.
Errors
curl -X DELETE "https://hub.masjidbox.com/v1/masjid/announcements/ann_6af5c9e2bc095fbd2dc5735e" \
-H "Authorization: Bearer $MASJIDBOX_KEY"