Your masjid · Notifications

Your app's one-time pushes

The pushes your app sends at once, to every device of the app: a send cannot be recalled, a change only edits the app's list.

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

Your app's one-time pushes

Masjid key · Notifications: read

GET/v1/masjid/app-notifications/one-time

The pushes your app sent at once, as its notification list holds them, 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 one-time pushes.

  • objectlist

    Always list.

  • dataobject[]

    The items of this page.

    Show child attributes (18)
    • objectapp_one_time_notification

      Always app_one_time_notification.

    • idstring

      The one-time push id.

    • titlestring | null

      The push title.

    • bodystring | null

      The push body.

    • hiddenboolean

      Hidden from the in-app list.

    • sendToOneboolean

      Sent to a single test device.

    • targetobject

      Where the push opens: a URL or a page of your app.

    • target.urlstring | null

      The URL the push opens.

    • target.pagestring | null

      The id of the app page the push opens.

    • sentAtstring | null

      When it was pushed; null when the app had no device to push to (ISO-8601).

    • deliveredobject | null

      The devices it reached; null until it was pushed.

    • delivered.iosnumber

      iOS devices.

    • delivered.androidnumber

      Android devices.

    • failedobject | null

      The devices it failed to reach; null until it was pushed.

    • failed.iosnumber

      iOS devices.

    • failed.androidnumber

      Android devices.

    • 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-notifications/one-time
curl "https://hub.masjidbox.com/v1/masjid/app-notifications/one-time" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidAppOneTimeNotificationsPage
{
  "data": [
    {
      "body": "Eid prayer at 8:00.",
      "createdAt": "2026-12-01T10:00:00.000Z",
      "delivered": {
        "android": 12,
        "ios": 0
      },
      "failed": {
        "android": 0,
        "ios": 0
      },
      "hidden": false,
      "id": "aon_6af5c9e2bc095fbd2dc5735f",
      "object": "app_one_time_notification",
      "sendToOne": false,
      "sentAt": "2026-12-01T10:00:00.000Z",
      "target": {
        "page": null,
        "url": "https://example.org/eid"
      },
      "title": "Eid Mubarak",
      "updatedAt": "2026-12-01T10:00:00.000Z"
    }
  ],
  "object": "list",
  "pagination": {
    "hasMore": false,
    "limit": 25,
    "nextCursor": null
  }
}

One of your one-time pushes

Masjid key · Notifications: read

GET/v1/masjid/app-notifications/one-time/{id}

A one-time push of your app: when it was sent and how many devices it reached or failed to reach. Needs Notifications: read.

Parameters

  • idstring · pathrequired

    The one-time push id.

Returns

The one-time push.

  • objectapp_one_time_notification

    Always app_one_time_notification.

  • idstring

    The one-time push id.

  • titlestring | null

    The push title.

  • bodystring | null

    The push body.

  • hiddenboolean

    Hidden from the in-app list.

  • sendToOneboolean

    Sent to a single test device.

  • targetobject

    Where the push opens: a URL or a page of your app.

    Show child attributes (2)
    • urlstring | null

      The URL the push opens.

    • pagestring | null

      The id of the app page the push opens.

  • sentAtstring | null

    When it was pushed; null when the app had no device to push to (ISO-8601).

  • deliveredobject | null

    The devices it reached; null until it was pushed.

    Show child attributes (2)
    • iosnumber

      iOS devices.

    • androidnumber

      Android devices.

  • failedobject | null

    The devices it failed to reach; null until it was pushed.

    Show child attributes (2)
    • iosnumber

      iOS devices.

    • androidnumber

      Android devices.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

GET /v1/masjid/app-notifications/one-time/{id}
curl "https://hub.masjidbox.com/v1/masjid/app-notifications/one-time/aon_6af5c9e2bc095fbd2dc5735f" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidAppOneTimeNotification
{
  "body": "Eid prayer at 8:00.",
  "createdAt": "2026-12-01T10:00:00.000Z",
  "delivered": {
    "android": 12,
    "ios": 0
  },
  "failed": {
    "android": 0,
    "ios": 0
  },
  "hidden": false,
  "id": "aon_6af5c9e2bc095fbd2dc5735f",
  "object": "app_one_time_notification",
  "sendToOne": false,
  "sentAt": "2026-12-01T10:00:00.000Z",
  "target": {
    "page": null,
    "url": "https://example.org/eid"
  },
  "title": "Eid Mubarak",
  "updatedAt": "2026-12-01T10:00:00.000Z"
}

Send a push of your app now

Masjid key · secret · Notifications: edit

POST/v1/masjid/app-notifications/one-time

Sends a push AT ONCE to every device of your app, with no confirmation step. It cannot be recalled: a change or a delete afterwards only edits the app's notification list, never what the devices received. To send later, schedule it instead (POST /v1/masjid/app-notifications/scheduled). As in the dashboard, a restricted organization's push has no target, whatever the body says. A target.page must be one of your app's pages, else 400. The answer carries sentAt and the delivery counts (null when the app has no device to push to). 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 body.

  • hiddenboolean

    Hidden from the in-app list.

  • sendToOneboolean

    Sent to a single test device.

  • targetobject

    Where the push opens: a URL or a page of your app.

    Show child attributes (2)
    • urlstring

      The URL the push opens.

    • pagestring

      The id of the app page the push opens.

Returns

The one-time push, as sent.

  • objectapp_one_time_notification

    Always app_one_time_notification.

  • idstring

    The one-time push id.

  • titlestring | null

    The push title.

  • bodystring | null

    The push body.

  • hiddenboolean

    Hidden from the in-app list.

  • sendToOneboolean

    Sent to a single test device.

  • targetobject

    Where the push opens: a URL or a page of your app.

    Show child attributes (2)
    • urlstring | null

      The URL the push opens.

    • pagestring | null

      The id of the app page the push opens.

  • sentAtstring | null

    When it was pushed; null when the app had no device to push to (ISO-8601).

  • deliveredobject | null

    The devices it reached; null until it was pushed.

    Show child attributes (2)
    • iosnumber

      iOS devices.

    • androidnumber

      Android devices.

  • failedobject | null

    The devices it failed to reach; null until it was pushed.

    Show child attributes (2)
    • iosnumber

      iOS devices.

    • androidnumber

      Android devices.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

POST /v1/masjid/app-notifications/one-time
curl -X POST "https://hub.masjidbox.com/v1/masjid/app-notifications/one-time" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"Eid prayer at 8:00.","title":"Eid Mubarak"}'
Example request · MasjidAppOneTimeNotificationCreate
{
  "body": "Eid prayer at 8:00.",
  "title": "Eid Mubarak"
}
201 · MasjidAppOneTimeNotification
{
  "body": "Eid prayer at 8:00.",
  "createdAt": "2026-12-01T10:00:00.000Z",
  "delivered": {
    "android": 12,
    "ios": 0
  },
  "failed": {
    "android": 0,
    "ios": 0
  },
  "hidden": false,
  "id": "aon_6af5c9e2bc095fbd2dc5735f",
  "object": "app_one_time_notification",
  "sendToOne": false,
  "sentAt": "2026-12-01T10:00:00.000Z",
  "target": {
    "page": null,
    "url": "https://example.org/eid"
  },
  "title": "Eid Mubarak",
  "updatedAt": "2026-12-01T10:00:00.000Z"
}

Change what your app lists for a one-time push

Masjid key · secret · Notifications: edit

PATCH/v1/masjid/app-notifications/one-time/{id}

Changes only what the app's notification list shows (title, body, target, hidden); a field you leave out stays, target field by field. Nothing is sent again: the devices that received the push keep what they received. Needs a secret key with Notifications: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.

Parameters

  • idstring · pathrequired

    The one-time push id.

Request body

  • titlestring

    The push title.

  • bodystring | null

    The body the app lists; null clears it.

  • hiddenboolean

    Hidden from the in-app list.

  • targetobject

    Where the push opens; null clears a side.

    Show child attributes (2)
    • urlstring | null

      The URL the push opens; null clears it.

    • pagestring | null

      The id of the app page the push opens; null clears it.

Returns

The one-time push after the change.

  • objectapp_one_time_notification

    Always app_one_time_notification.

  • idstring

    The one-time push id.

  • titlestring | null

    The push title.

  • bodystring | null

    The push body.

  • hiddenboolean

    Hidden from the in-app list.

  • sendToOneboolean

    Sent to a single test device.

  • targetobject

    Where the push opens: a URL or a page of your app.

    Show child attributes (2)
    • urlstring | null

      The URL the push opens.

    • pagestring | null

      The id of the app page the push opens.

  • sentAtstring | null

    When it was pushed; null when the app had no device to push to (ISO-8601).

  • deliveredobject | null

    The devices it reached; null until it was pushed.

    Show child attributes (2)
    • iosnumber

      iOS devices.

    • androidnumber

      Android devices.

  • failedobject | null

    The devices it failed to reach; null until it was pushed.

    Show child attributes (2)
    • iosnumber

      iOS devices.

    • androidnumber

      Android devices.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

PATCH /v1/masjid/app-notifications/one-time/{id}
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/app-notifications/one-time/aon_6af5c9e2bc095fbd2dc5735f" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"hidden":true}'
Example request · MasjidAppOneTimeNotificationPatch
{
  "hidden": true
}
200 · MasjidAppOneTimeNotification
{
  "body": "Eid prayer at 8:00.",
  "createdAt": "2026-12-01T10:00:00.000Z",
  "delivered": {
    "android": 12,
    "ios": 0
  },
  "failed": {
    "android": 0,
    "ios": 0
  },
  "hidden": false,
  "id": "aon_6af5c9e2bc095fbd2dc5735f",
  "object": "app_one_time_notification",
  "sendToOne": false,
  "sentAt": "2026-12-01T10:00:00.000Z",
  "target": {
    "page": null,
    "url": "https://example.org/eid"
  },
  "title": "Eid Mubarak",
  "updatedAt": "2026-12-01T10:00:00.000Z"
}

Delete a one-time push

Masjid key · secret · Notifications: edit

DELETE/v1/masjid/app-notifications/one-time/{id}

Removes a one-time push from your app's notification list; the devices it reached keep it. Needs a secret key with Notifications: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.

Parameters

  • idstring · pathrequired

    The one-time push id.

Returns

Deleted. No body.

204 · No response body.

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