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

Masjid key · Website and app: read

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.

  • objectwebsite

    Always website.

  • closedboolean

    Closed: visitors see the closed page.

  • maintenanceobject

    The maintenance switch and its message.

    Show child attributes (2)
    • enabledboolean

      Visitors see the maintenance page.

    • messagestring | null

      The message of the maintenance page.

GET /v1/masjid/website
curl "https://hub.masjidbox.com/v1/masjid/website" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidWebsite
{
  "closed": false,
  "maintenance": {
    "enabled": false,
    "message": "Back after Ramadan"
  },
  "object": "website"
}

Close, reopen or put your website in maintenance

Masjid key · secret · Website and app: edit

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

  • closedboolean

    Close (true) or reopen (false) the website.

  • maintenanceobject

    Merged into the stored maintenance: a field you leave out stays.

    Show child attributes (2)
    • enabledboolean

      Turn the maintenance page on or off.

    • messagestring | null

      The message of the maintenance page; null clears it.

Returns

The website switches after the write.

  • objectwebsite

    Always website.

  • closedboolean

    Closed: visitors see the closed page.

  • maintenanceobject

    The maintenance switch and its message.

    Show child attributes (2)
    • enabledboolean

      Visitors see the maintenance page.

    • messagestring | null

      The message of the maintenance page.

PATCH /v1/masjid/website
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"}}'
Example request · MasjidWebsitePatch
{
  "maintenance": {
    "enabled": true,
    "message": "Back after Ramadan"
  }
}
200 · MasjidWebsite
{
  "closed": false,
  "maintenance": {
    "enabled": false,
    "message": "Back after Ramadan"
  },
  "object": "website"
}