Your masjid · Notifications

Your One notifications

The push notifications the Masjidbox One app sends for your masjids: to their followers and to the devices nearby, once.

Right on the key: Notifications: read for a read, edit (secret key) for a write.

Your One notifications

Masjid key · Notifications: read

GET/v1/masjid/notifications

The One push notifications sent for your masjids, newest first, by cursor (limit 1 to 100, 25 by default; cursor from the previous page). Needs Notifications: 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 notifications.

  • objectlist

    Always list.

  • dataobject[]

    The items of this page.

    Show child attributes (14)
    • objectnotification

      Always notification.

    • idstring

      The notification id.

    • masjidstring | null

      The masjid it was sent for; null when that masjid is gone.

    • titlestring

      The push title.

    • bodystring | null

      The push text.

    • targetstring | null

      Where a tap leads (a URL); null or empty: the masjid page in One.

    • createdAtstring

      When it was sent (ISO-8601).

    • deliveryobject

      The devices reached, per wave; zero until the send completes.

    • delivery.followersobject

      The masjid's followers reached.

    • delivery.followers.iosinteger

      iOS devices reached.

    • delivery.followers.androidinteger

      Android devices reached.

    • delivery.nearbyobject

      Devices within 3 km of the masjid reached.

    • delivery.nearby.iosinteger

      iOS devices reached.

    • delivery.nearby.androidinteger

      Android devices reached.

  • 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/notifications
curl "https://hub.masjidbox.com/v1/masjid/notifications" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidNotificationsPage
{
  "data": [
    {
      "body": "Iftar at 18:02.",
      "createdAt": "2026-11-12T08:00:00.000Z",
      "delivery": {
        "followers": {
          "android": 20,
          "ios": 10
        },
        "nearby": {
          "android": 3,
          "ios": 1
        }
      },
      "id": "ntf_6af5c9e2bc095fbd2dc5735d",
      "masjid": "msj_o5urjd3hd5",
      "object": "notification",
      "target": null,
      "title": "Iftar tonight"
    }
  ],
  "object": "list",
  "pagination": {
    "hasMore": false,
    "limit": 25,
    "nextCursor": null
  }
}

One of your notifications

Masjid key · Notifications: read

GET/v1/masjid/notifications/{id}

A One push notification sent for one of your masjids, with the devices it reached. Needs Notifications: read.

Parameters

  • idstring · pathrequired

    The notification id.

Returns

The notification.

  • objectnotification

    Always notification.

  • idstring

    The notification id.

  • masjidstring | null

    The masjid it was sent for; null when that masjid is gone.

  • titlestring

    The push title.

  • bodystring | null

    The push text.

  • targetstring | null

    Where a tap leads (a URL); null or empty: the masjid page in One.

  • createdAtstring

    When it was sent (ISO-8601).

  • deliveryobject

    The devices reached, per wave; zero until the send completes.

    Show child attributes (6)
    • followersobject

      The masjid's followers reached.

    • followers.iosinteger

      iOS devices reached.

    • followers.androidinteger

      Android devices reached.

    • nearbyobject

      Devices within 3 km of the masjid reached.

    • nearby.iosinteger

      iOS devices reached.

    • nearby.androidinteger

      Android devices reached.

GET /v1/masjid/notifications/{id}
curl "https://hub.masjidbox.com/v1/masjid/notifications/ntf_6af5c9e2bc095fbd2dc5735d" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidNotification
{
  "body": "Iftar at 18:02.",
  "createdAt": "2026-11-12T08:00:00.000Z",
  "delivery": {
    "followers": {
      "android": 20,
      "ios": 10
    },
    "nearby": {
      "android": 3,
      "ios": 1
    }
  },
  "id": "ntf_6af5c9e2bc095fbd2dc5735d",
  "masjid": "msj_o5urjd3hd5",
  "object": "notification",
  "target": null,
  "title": "Iftar tonight"
}

Send a One notification

Masjid key · secret · Notifications: edit

POST/v1/masjid/notifications

Sends a One push notification now, once, to the masjid's followers and to the devices nearby. It cannot be edited afterwards. masjid may be left out when your organization has only one masjid. Needs a secret key with Notifications: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.

Parameters

No parameters.

Request body

  • titlestringrequired

    The push title.

  • bodystring

    The push text.

  • targetany

    Where a tap leads: an https URL; empty or left out, the masjid page in One.

  • masjidstring

    The masjid it is sent for; may be left out when your organization has only one.

Returns

The notification, as sent.

  • objectnotification

    Always notification.

  • idstring

    The notification id.

  • masjidstring | null

    The masjid it was sent for; null when that masjid is gone.

  • titlestring

    The push title.

  • bodystring | null

    The push text.

  • targetstring | null

    Where a tap leads (a URL); null or empty: the masjid page in One.

  • createdAtstring

    When it was sent (ISO-8601).

  • deliveryobject

    The devices reached, per wave; zero until the send completes.

    Show child attributes (6)
    • followersobject

      The masjid's followers reached.

    • followers.iosinteger

      iOS devices reached.

    • followers.androidinteger

      Android devices reached.

    • nearbyobject

      Devices within 3 km of the masjid reached.

    • nearby.iosinteger

      iOS devices reached.

    • nearby.androidinteger

      Android devices reached.

POST /v1/masjid/notifications
curl -X POST "https://hub.masjidbox.com/v1/masjid/notifications" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"Iftar at 18:02.","title":"Iftar tonight"}'
Example request · MasjidNotificationCreate
{
  "body": "Iftar at 18:02.",
  "title": "Iftar tonight"
}
201 · MasjidNotification
{
  "body": "Iftar at 18:02.",
  "createdAt": "2026-11-12T08:00:00.000Z",
  "delivery": {
    "followers": {
      "android": 20,
      "ios": 10
    },
    "nearby": {
      "android": 3,
      "ios": 1
    }
  },
  "id": "ntf_6af5c9e2bc095fbd2dc5735d",
  "masjid": "msj_o5urjd3hd5",
  "object": "notification",
  "target": null,
  "title": "Iftar tonight"
}

Delete one of your notifications

Masjid key · secret · Notifications: edit

DELETE/v1/masjid/notifications/{id}

Removes a notification from your list. A push already sent stays on the devices it reached. Needs a secret key with Notifications: edit. Counts against the write quota.

Parameters

  • idstring · pathrequired

    The notification id.

Returns

Deleted. No body.

204 · No response body.

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