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

Masjid key · Website and app: read

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 · query

    Items per page, 1 to 100.

  • cursorstring · query

    The previous page's pagination.nextCursor; absent for the first page.

Returns

A page of popups.

  • objectlist

    Always list.

  • dataobject[]

    The items of this page.

    Show child attributes (24)
    • objectapp_popup

      Always app_popup.

    • idstring

      The popup id.

    • namestring | null

      Its name, for the dashboard.

    • frequencystring | null

      How often it shows: once, daily or weekly.

    • requireActionboolean | null

      It stays until its button is used.

    • backgroundstring | null

      Its background colour.

    • mediastring | null

      The URL of the image it shows.

    • titleobject

      The title block.

    • title.textstring | null

      The title.

    • title.colorstring | null

      Its colour.

    • descriptionobject

      The description block.

    • description.textstring | null

      The description.

    • description.colorstring | null

      Its colour.

    • buttonobject

      The call-to-action button: a URL or a page of your app.

    • button.textstring | null

      The button label.

    • button.urlstring | null

      The URL the button opens.

    • button.pagestring | null

      The id of the app page the button opens.

    • button.backgroundstring | null

      The button colour.

    • button.colorstring | null

      The label colour.

    • button.displayboolean | null

      The button is shown.

    • viewsnumber

      How many times it was shown.

    • clicksnumber

      How many times its button was used.

    • createdAtstring | null

      When it was created (ISO-8601).

    • updatedAtstring | null

      When it last changed (ISO-8601).

  • paginationobject

    Where this page stands.

    Show child attributes (3)
    • limitinteger

      The page size asked for.

    • hasMoreboolean

      Whether another page follows: stop on false, never on a short page.

    • nextCursorstring | null

      The cursor of the next page; null on the last one.

GET /v1/masjid/app-popups
curl "https://hub.masjidbox.com/v1/masjid/app-popups" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidAppPopupsPage
{
  "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

Masjid key · Website and app: read

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 · pathrequired

    The popup id.

Returns

The popup.

  • objectapp_popup

    Always app_popup.

  • idstring

    The popup id.

  • namestring | null

    Its name, for the dashboard.

  • frequencystring | null

    How often it shows: once, daily or weekly.

  • requireActionboolean | null

    It stays until its button is used.

  • backgroundstring | null

    Its background colour.

  • mediastring | null

    The URL of the image it shows.

  • titleobject

    The title block.

    Show child attributes (2)
    • textstring | null

      The title.

    • colorstring | null

      Its colour.

  • descriptionobject

    The description block.

    Show child attributes (2)
    • textstring | null

      The description.

    • colorstring | null

      Its colour.

  • buttonobject

    The call-to-action button: a URL or a page of your app.

    Show child attributes (6)
    • textstring | null

      The button label.

    • urlstring | null

      The URL the button opens.

    • pagestring | null

      The id of the app page the button opens.

    • backgroundstring | null

      The button colour.

    • colorstring | null

      The label colour.

    • displayboolean | null

      The button is shown.

  • viewsnumber

    How many times it was shown.

  • clicksnumber

    How many times its button was used.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

GET /v1/masjid/app-popups/{id}
curl "https://hub.masjidbox.com/v1/masjid/app-popups/apo_6af5c9e2bc095fbd2dc57360" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidAppPopup
{
  "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

Masjid key · secret · Website and app: edit

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

  • namestringrequired

    Its name, for the dashboard.

  • frequencyonce | daily | weekly

    How often it shows.

  • requireActionboolean

    It stays until its button is used.

  • backgroundstring | null

    Its background colour, #rrggbb; null clears it.

  • mediastring | null

    The URL of the image it shows; null clears it.

  • titleobject

    The title block; the fields named merge.

    Show child attributes (2)
    • textstring | null

      The title; null clears it.

    • colorstring | null

      Its colour, #rrggbb; null clears it.

  • descriptionobject

    The description block; the fields named merge.

    Show child attributes (2)
    • textstring | null

      The description; null clears it.

    • colorstring | null

      Its colour, #rrggbb; null clears it.

  • buttonobject

    The button; the fields named merge, a null one clears it.

    Show child attributes (6)
    • textstring | null

      The button label.

    • urlstring | null

      The URL the button opens.

    • pagestring | null

      The id of the app page the button opens: one of your app's, else 400.

    • backgroundstring | null

      The button colour, #rrggbb; null clears it.

    • colorstring | null

      The label colour, #rrggbb; null clears it.

    • displayboolean | null

      The button is shown.

Returns

The popup, as stored.

  • objectapp_popup

    Always app_popup.

  • idstring

    The popup id.

  • namestring | null

    Its name, for the dashboard.

  • frequencystring | null

    How often it shows: once, daily or weekly.

  • requireActionboolean | null

    It stays until its button is used.

  • backgroundstring | null

    Its background colour.

  • mediastring | null

    The URL of the image it shows.

  • titleobject

    The title block.

    Show child attributes (2)
    • textstring | null

      The title.

    • colorstring | null

      Its colour.

  • descriptionobject

    The description block.

    Show child attributes (2)
    • textstring | null

      The description.

    • colorstring | null

      Its colour.

  • buttonobject

    The call-to-action button: a URL or a page of your app.

    Show child attributes (6)
    • textstring | null

      The button label.

    • urlstring | null

      The URL the button opens.

    • pagestring | null

      The id of the app page the button opens.

    • backgroundstring | null

      The button colour.

    • colorstring | null

      The label colour.

    • displayboolean | null

      The button is shown.

  • viewsnumber

    How many times it was shown.

  • clicksnumber

    How many times its button was used.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

POST /v1/masjid/app-popups
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"}}'
Example request · MasjidAppPopupCreate
{
  "frequency": "once",
  "name": "Eid",
  "title": {
    "text": "Eid Mubarak"
  }
}
201 · MasjidAppPopup
{
  "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

Masjid key · secret · Website and app: edit

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 · pathrequired

    The popup id.

Request body

  • namestring

    Its name, for the dashboard.

  • frequencyonce | daily | weekly

    How often it shows.

  • requireActionboolean

    It stays until its button is used.

  • backgroundstring | null

    Its background colour, #rrggbb; null clears it.

  • mediastring | null

    The URL of the image it shows; null clears it.

  • titleobject

    The title block; the fields named merge.

    Show child attributes (2)
    • textstring | null

      The title; null clears it.

    • colorstring | null

      Its colour, #rrggbb; null clears it.

  • descriptionobject

    The description block; the fields named merge.

    Show child attributes (2)
    • textstring | null

      The description; null clears it.

    • colorstring | null

      Its colour, #rrggbb; null clears it.

  • buttonobject

    The button; the fields named merge, a null one clears it.

    Show child attributes (6)
    • textstring | null

      The button label.

    • urlstring | null

      The URL the button opens.

    • pagestring | null

      The id of the app page the button opens: one of your app's, else 400.

    • backgroundstring | null

      The button colour, #rrggbb; null clears it.

    • colorstring | null

      The label colour, #rrggbb; null clears it.

    • displayboolean | null

      The button is shown.

Returns

The popup after the change.

  • objectapp_popup

    Always app_popup.

  • idstring

    The popup id.

  • namestring | null

    Its name, for the dashboard.

  • frequencystring | null

    How often it shows: once, daily or weekly.

  • requireActionboolean | null

    It stays until its button is used.

  • backgroundstring | null

    Its background colour.

  • mediastring | null

    The URL of the image it shows.

  • titleobject

    The title block.

    Show child attributes (2)
    • textstring | null

      The title.

    • colorstring | null

      Its colour.

  • descriptionobject

    The description block.

    Show child attributes (2)
    • textstring | null

      The description.

    • colorstring | null

      Its colour.

  • buttonobject

    The call-to-action button: a URL or a page of your app.

    Show child attributes (6)
    • textstring | null

      The button label.

    • urlstring | null

      The URL the button opens.

    • pagestring | null

      The id of the app page the button opens.

    • backgroundstring | null

      The button colour.

    • colorstring | null

      The label colour.

    • displayboolean | null

      The button is shown.

  • viewsnumber

    How many times it was shown.

  • clicksnumber

    How many times its button was used.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

PATCH /v1/masjid/app-popups/{id}
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"}}'
Example request · MasjidAppPopupPatch
{
  "title": {
    "text": "Ramadan Mubarak"
  }
}
200 · MasjidAppPopup
{
  "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

Masjid key · secret · Website and app: edit

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 · pathrequired

    The popup id.

Returns

Deleted. No body.

204 · No response body.

DELETE /v1/masjid/app-popups/{id}
curl -X DELETE "https://hub.masjidbox.com/v1/masjid/app-popups/apo_6af5c9e2bc095fbd2dc57360" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"