Your masjid · Website and app
Your website
Close your website, reopen it or put it in maintenance with a message: visitors see the change within minutes.
Right on the key: Website and app: read for a read, edit (secret key) for a write.
Your website
GET/v1/masjid/website
Whether your organization's website is closed or in maintenance, and its maintenance message. Needs Website and app: read.
Parameters
No parameters.
Returns
The website switches.
objectwebsiteAlways
website.closedbooleanClosed: visitors see the closed page.
maintenanceobjectThe maintenance switch and its message.
Show child attributes (2)
enabledbooleanVisitors see the maintenance page.
messagestring | nullThe message of the maintenance page.
Errors
curl "https://hub.masjidbox.com/v1/masjid/website" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"closed": false,
"maintenance": {
"enabled": false,
"message": "Back after Ramadan"
},
"object": "website"
}Close, reopen or put your website in maintenance
PATCH/v1/masjid/website
Changes closed, maintenance.enabled and maintenance.message only, as the dashboard does: visitors see the closed or the maintenance page within minutes. The maintenance merges: a field you leave out stays. 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
closedbooleanClose (true) or reopen (false) the website.
maintenanceobjectMerged into the stored maintenance: a field you leave out stays.
Show child attributes (2)
enabledbooleanTurn the maintenance page on or off.
messagestring | nullThe message of the maintenance page; null clears it.
Returns
The website switches after the write.
objectwebsiteAlways
website.closedbooleanClosed: visitors see the closed page.
maintenanceobjectThe maintenance switch and its message.
Show child attributes (2)
enabledbooleanVisitors see the maintenance page.
messagestring | nullThe message of the maintenance page.
Errors
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/website" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"maintenance":{"enabled":true,"message":"Back after Ramadan"}}'{
"maintenance": {
"enabled": true,
"message": "Back after Ramadan"
}
}{
"closed": false,
"maintenance": {
"enabled": false,
"message": "Back after Ramadan"
},
"object": "website"
}