Your masjid · Website and app
Your app's widget
The widget of your app's home screen: its colours, its banner, its donation campaign and its text overrides.
Right on the key: Website and app: read for a read, edit (secret key) for a write.
Your app's widget
GET/v1/masjid/app-widget
The widget of your app's home screen: its colours, banner, donation campaign and text overrides. Needs Website and app: read.
Parameters
No parameters.
Returns
The app widget.
objectapp_widgetAlways
app_widget.themeobjectIts colours.
Show child attributes (4)
lightobjectLight mode.
light.universestring | nullThe colour of the mode,
#rrggbb.darkobjectDark mode.
dark.universestring | nullThe colour of the mode,
#rrggbb.
announcementstring | nullThe banner it shows.
campaignstring | nullThe donation campaign it shows.
translationobjectIts text overrides, by key.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl "https://hub.masjidbox.com/v1/masjid/app-widget" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"announcement": "Ramadan timetables are in.",
"campaign": "cmp_6af5c9e2bc095fbd2dc5735b",
"createdAt": "2026-12-01T10:00:00.000Z",
"object": "app_widget",
"theme": {
"dark": {
"universe": "#000000"
},
"light": {
"universe": "#32a852"
}
},
"translation": {
"NEED_UPDATE": "Update available"
},
"updatedAt": "2026-12-01T10:00:00.000Z"
}Change your app's widget
PATCH/v1/masjid/app-widget
A merge: a field you leave out stays, theme mode by mode, translation key by key; null clears the banner or the campaign. A new campaign must be one of your donation campaigns (cmp_ id), else 400. Every device of the app shows the change once its caches refresh. 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
themeobjectIts colours; the modes named merge.
Show child attributes (4)
lightobjectLight mode.
light.universestring | nullThe colour of the mode,
#rrggbb; null clears it.darkobjectDark mode.
dark.universestring | nullThe colour of the mode,
#rrggbb; null clears it.
announcementstring | nullThe banner it shows; null clears it.
campaignstring | nullOne of your donation campaigns (
cmp_); null clears it; another organization’s is a 400.translationobjectText overrides, by key; the keys named merge.
Returns
The app widget after the change.
objectapp_widgetAlways
app_widget.themeobjectIts colours.
Show child attributes (4)
lightobjectLight mode.
light.universestring | nullThe colour of the mode,
#rrggbb.darkobjectDark mode.
dark.universestring | nullThe colour of the mode,
#rrggbb.
announcementstring | nullThe banner it shows.
campaignstring | nullThe donation campaign it shows.
translationobjectIts text overrides, by key.
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-widget" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"announcement":"Ramadan timetables are in."}'{
"announcement": "Ramadan timetables are in."
}{
"announcement": "Ramadan timetables are in.",
"campaign": "cmp_6af5c9e2bc095fbd2dc5735b",
"createdAt": "2026-12-01T10:00:00.000Z",
"object": "app_widget",
"theme": {
"dark": {
"universe": "#000000"
},
"light": {
"universe": "#32a852"
}
},
"translation": {
"NEED_UPDATE": "Update available"
},
"updatedAt": "2026-12-01T10:00:00.000Z"
}