Your masjid · Website and app
Your app's popups
The popups your app shows on the pages that name them: their texts, colours, image and button, and how often they show.
Right on the key: Website and app: read for a read, edit (secret key) for a write.
Your app's popups
GET/v1/masjid/app-popups
The popups of your app, newest first, by cursor (limit 1 to 100, 25 by default; cursor from the previous page). A popup shows only on the pages that name it (PUT /v1/masjid/app-pages/{id}/popup). Needs Website and app: 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 popups.
objectlistAlways
list.dataobject[]The items of this page.
Show child attributes (24)
objectapp_popupAlways
app_popup.idstringThe popup id.
namestring | nullIts name, for the dashboard.
frequencystring | nullHow often it shows:
once,dailyorweekly.requireActionboolean | nullIt stays until its button is used.
backgroundstring | nullIts background colour.
mediastring | nullThe URL of the image it shows.
titleobjectThe title block.
title.textstring | nullThe title.
title.colorstring | nullIts colour.
descriptionobjectThe description block.
description.textstring | nullThe description.
description.colorstring | nullIts colour.
buttonobjectThe call-to-action button: a URL or a page of your app.
button.textstring | nullThe button label.
button.urlstring | nullThe URL the button opens.
button.pagestring | nullThe id of the app page the button opens.
button.backgroundstring | nullThe button colour.
button.colorstring | nullThe label colour.
button.displayboolean | nullThe button is shown.
viewsnumberHow many times it was shown.
clicksnumberHow many times its button was used.
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.
curl "https://hub.masjidbox.com/v1/masjid/app-popups" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"data": [
{
"background": "#FFFFFF",
"button": {
"background": "#0F4C81",
"color": "#FFFFFF",
"display": true,
"page": null,
"text": "Read more",
"url": "https://example.org/eid"
},
"clicks": 14,
"createdAt": "2026-12-01T10:00:00.000Z",
"description": {
"color": "#111827",
"text": "Eid prayer at 8:00."
},
"frequency": "once",
"id": "apo_6af5c9e2bc095fbd2dc57360",
"media": "https://cdn.example.org/eid.png",
"name": "Eid",
"object": "app_popup",
"requireAction": false,
"title": {
"color": "#111827",
"text": "Eid Mubarak"
},
"updatedAt": "2026-12-01T10:00:00.000Z",
"views": 120
}
],
"object": "list",
"pagination": {
"hasMore": false,
"limit": 25,
"nextCursor": null
}
}One of your app popups
GET/v1/masjid/app-popups/{id}
A popup of your app: its texts, colours, image, button, and how many times it was shown and its button used. Needs Website and app: read.
Parameters
idstring · pathrequiredThe popup id.
Returns
The popup.
objectapp_popupAlways
app_popup.idstringThe popup id.
namestring | nullIts name, for the dashboard.
frequencystring | nullHow often it shows:
once,dailyorweekly.requireActionboolean | nullIt stays until its button is used.
backgroundstring | nullIts background colour.
mediastring | nullThe URL of the image it shows.
titleobjectThe title block.
Show child attributes (2)
textstring | nullThe title.
colorstring | nullIts colour.
descriptionobjectThe description block.
Show child attributes (2)
textstring | nullThe description.
colorstring | nullIts colour.
buttonobjectThe call-to-action button: a URL or a page of your app.
Show child attributes (6)
textstring | nullThe button label.
urlstring | nullThe URL the button opens.
pagestring | nullThe id of the app page the button opens.
backgroundstring | nullThe button colour.
colorstring | nullThe label colour.
displayboolean | nullThe button is shown.
viewsnumberHow many times it was shown.
clicksnumberHow many times its button was used.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl "https://hub.masjidbox.com/v1/masjid/app-popups/apo_6af5c9e2bc095fbd2dc57360" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"background": "#FFFFFF",
"button": {
"background": "#0F4C81",
"color": "#FFFFFF",
"display": true,
"page": null,
"text": "Read more",
"url": "https://example.org/eid"
},
"clicks": 14,
"createdAt": "2026-12-01T10:00:00.000Z",
"description": {
"color": "#111827",
"text": "Eid prayer at 8:00."
},
"frequency": "once",
"id": "apo_6af5c9e2bc095fbd2dc57360",
"media": "https://cdn.example.org/eid.png",
"name": "Eid",
"object": "app_popup",
"requireAction": false,
"title": {
"color": "#111827",
"text": "Eid Mubarak"
},
"updatedAt": "2026-12-01T10:00:00.000Z",
"views": 120
}Create a popup of your app
POST/v1/masjid/app-popups
Creates a popup of your app as the dashboard does. It shows nowhere until a page names it (PUT /v1/masjid/app-pages/{id}/popup). A button.page must be one of your app's pages (its id from GET /v1/masjid/app-pages), else 400. Needs a secret key with Website and app: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.
Parameters
No parameters.
Request body
namestringrequiredIts name, for the dashboard.
frequencyonce | daily | weeklyHow often it shows.
requireActionbooleanIt stays until its button is used.
backgroundstring | nullIts background colour,
#rrggbb; null clears it.mediastring | nullThe URL of the image it shows; null clears it.
titleobjectThe title block; the fields named merge.
Show child attributes (2)
textstring | nullThe title; null clears it.
colorstring | nullIts colour,
#rrggbb; null clears it.
descriptionobjectThe description block; the fields named merge.
Show child attributes (2)
textstring | nullThe description; null clears it.
colorstring | nullIts colour,
#rrggbb; null clears it.
buttonobjectThe button; the fields named merge, a null one clears it.
Show child attributes (6)
textstring | nullThe button label.
urlstring | nullThe URL the button opens.
pagestring | nullThe id of the app page the button opens: one of your app's, else 400.
backgroundstring | nullThe button colour,
#rrggbb; null clears it.colorstring | nullThe label colour,
#rrggbb; null clears it.displayboolean | nullThe button is shown.
Returns
The popup, as stored.
objectapp_popupAlways
app_popup.idstringThe popup id.
namestring | nullIts name, for the dashboard.
frequencystring | nullHow often it shows:
once,dailyorweekly.requireActionboolean | nullIt stays until its button is used.
backgroundstring | nullIts background colour.
mediastring | nullThe URL of the image it shows.
titleobjectThe title block.
Show child attributes (2)
textstring | nullThe title.
colorstring | nullIts colour.
descriptionobjectThe description block.
Show child attributes (2)
textstring | nullThe description.
colorstring | nullIts colour.
buttonobjectThe call-to-action button: a URL or a page of your app.
Show child attributes (6)
textstring | nullThe button label.
urlstring | nullThe URL the button opens.
pagestring | nullThe id of the app page the button opens.
backgroundstring | nullThe button colour.
colorstring | nullThe label colour.
displayboolean | nullThe button is shown.
viewsnumberHow many times it was shown.
clicksnumberHow many times its button was used.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl -X POST "https://hub.masjidbox.com/v1/masjid/app-popups" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"frequency":"once","name":"Eid","title":{"text":"Eid Mubarak"}}'{
"frequency": "once",
"name": "Eid",
"title": {
"text": "Eid Mubarak"
}
}{
"background": "#FFFFFF",
"button": {
"background": "#0F4C81",
"color": "#FFFFFF",
"display": true,
"page": null,
"text": "Read more",
"url": "https://example.org/eid"
},
"clicks": 14,
"createdAt": "2026-12-01T10:00:00.000Z",
"description": {
"color": "#111827",
"text": "Eid prayer at 8:00."
},
"frequency": "once",
"id": "apo_6af5c9e2bc095fbd2dc57360",
"media": "https://cdn.example.org/eid.png",
"name": "Eid",
"object": "app_popup",
"requireAction": false,
"title": {
"color": "#111827",
"text": "Eid Mubarak"
},
"updatedAt": "2026-12-01T10:00:00.000Z",
"views": 120
}Change a popup of your app
PATCH/v1/masjid/app-popups/{id}
A merge: a field you leave out stays, title, description and button field by field; null clears a field. A new button.page must be one of your app's pages, else 400. Every page showing the popup shows the change. Needs a secret key with Website and app: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.
Parameters
idstring · pathrequiredThe popup id.
Request body
namestringIts name, for the dashboard.
frequencyonce | daily | weeklyHow often it shows.
requireActionbooleanIt stays until its button is used.
backgroundstring | nullIts background colour,
#rrggbb; null clears it.mediastring | nullThe URL of the image it shows; null clears it.
titleobjectThe title block; the fields named merge.
Show child attributes (2)
textstring | nullThe title; null clears it.
colorstring | nullIts colour,
#rrggbb; null clears it.
descriptionobjectThe description block; the fields named merge.
Show child attributes (2)
textstring | nullThe description; null clears it.
colorstring | nullIts colour,
#rrggbb; null clears it.
buttonobjectThe button; the fields named merge, a null one clears it.
Show child attributes (6)
textstring | nullThe button label.
urlstring | nullThe URL the button opens.
pagestring | nullThe id of the app page the button opens: one of your app's, else 400.
backgroundstring | nullThe button colour,
#rrggbb; null clears it.colorstring | nullThe label colour,
#rrggbb; null clears it.displayboolean | nullThe button is shown.
Returns
The popup after the change.
objectapp_popupAlways
app_popup.idstringThe popup id.
namestring | nullIts name, for the dashboard.
frequencystring | nullHow often it shows:
once,dailyorweekly.requireActionboolean | nullIt stays until its button is used.
backgroundstring | nullIts background colour.
mediastring | nullThe URL of the image it shows.
titleobjectThe title block.
Show child attributes (2)
textstring | nullThe title.
colorstring | nullIts colour.
descriptionobjectThe description block.
Show child attributes (2)
textstring | nullThe description.
colorstring | nullIts colour.
buttonobjectThe call-to-action button: a URL or a page of your app.
Show child attributes (6)
textstring | nullThe button label.
urlstring | nullThe URL the button opens.
pagestring | nullThe id of the app page the button opens.
backgroundstring | nullThe button colour.
colorstring | nullThe label colour.
displayboolean | nullThe button is shown.
viewsnumberHow many times it was shown.
clicksnumberHow many times its button was used.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/app-popups/apo_6af5c9e2bc095fbd2dc57360" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"title":{"text":"Ramadan Mubarak"}}'{
"title": {
"text": "Ramadan Mubarak"
}
}{
"background": "#FFFFFF",
"button": {
"background": "#0F4C81",
"color": "#FFFFFF",
"display": true,
"page": null,
"text": "Read more",
"url": "https://example.org/eid"
},
"clicks": 14,
"createdAt": "2026-12-01T10:00:00.000Z",
"description": {
"color": "#111827",
"text": "Eid prayer at 8:00."
},
"frequency": "once",
"id": "apo_6af5c9e2bc095fbd2dc57360",
"media": "https://cdn.example.org/eid.png",
"name": "Eid",
"object": "app_popup",
"requireAction": false,
"title": {
"color": "#111827",
"text": "Eid Mubarak"
},
"updatedAt": "2026-12-01T10:00:00.000Z",
"views": 120
}Delete a popup of your app
DELETE/v1/masjid/app-popups/{id}
Deletes a popup: every page that showed it shows none. Needs a secret key with Website and app: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.
Parameters
idstring · pathrequiredThe popup id.
Returns
Deleted. No body.
204 · No response body.
Errors
curl -X DELETE "https://hub.masjidbox.com/v1/masjid/app-popups/apo_6af5c9e2bc095fbd2dc57360" \
-H "Authorization: Bearer $MASJIDBOX_KEY"