Your masjid · Notifications

Your app's scheduled pushes

The pushes your app sends once, to every device of the app, at the time you schedule them.

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

Your app's scheduled pushes

Masjid key · Notifications: read

GET/v1/masjid/app-notifications/scheduled

The pushes of your app scheduled once, sent ones included, 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 scheduled pushes.

  • objectlist

    Always list.

  • dataobject[]

    The items of this page.

    Show child attributes (14)
    • objectapp_notification

      Always app_notification.

    • idstring

      The scheduled push id.

    • titlestring

      The push title.

    • bodystring | null

      The push body.

    • enabledboolean

      It is sent.

    • 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.

    • scheduleTimestring | null

      When it is sent (ISO-8601).

    • sentAtstring | null

      When it was sent; null until then (ISO-8601).

    • 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/scheduled
curl "https://hub.masjidbox.com/v1/masjid/app-notifications/scheduled" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidAppNotificationsPage
{
  "data": [
    {
      "body": "Eid prayer at 8:00.",
      "createdAt": "2026-12-01T10:00:00.000Z",
      "enabled": true,
      "hidden": false,
      "id": "apn_6af5c9e2bc095fbd2dc5735c",
      "object": "app_notification",
      "scheduleTime": "2026-12-01T10:00:00.000Z",
      "sendToOne": false,
      "sentAt": null,
      "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 scheduled pushes

Masjid key · Notifications: read

GET/v1/masjid/app-notifications/scheduled/{id}

A scheduled push of your app, and when it was sent. Needs Notifications: read.

Parameters

  • idstring · pathrequired

    The scheduled push id.

Returns

The scheduled push.

  • objectapp_notification

    Always app_notification.

  • idstring

    The scheduled push id.

  • titlestring

    The push title.

  • bodystring | null

    The push body.

  • enabledboolean

    It is sent.

  • 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.

  • scheduleTimestring | null

    When it is sent (ISO-8601).

  • sentAtstring | null

    When it was sent; null until then (ISO-8601).

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

GET /v1/masjid/app-notifications/scheduled/{id}
curl "https://hub.masjidbox.com/v1/masjid/app-notifications/scheduled/apn_6af5c9e2bc095fbd2dc5735c" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidAppNotification
{
  "body": "Eid prayer at 8:00.",
  "createdAt": "2026-12-01T10:00:00.000Z",
  "enabled": true,
  "hidden": false,
  "id": "apn_6af5c9e2bc095fbd2dc5735c",
  "object": "app_notification",
  "scheduleTime": "2026-12-01T10:00:00.000Z",
  "sendToOne": false,
  "sentAt": null,
  "target": {
    "page": null,
    "url": "https://example.org/eid"
  },
  "title": "Eid Mubarak",
  "updatedAt": "2026-12-01T10:00:00.000Z"
}

Schedule a push of your app

Masjid key · secret · Notifications: edit

POST/v1/masjid/app-notifications/scheduled

Schedules a push of your app, sent once to every device of the app at scheduleTime (within a minute when you leave it out). As in the dashboard, a restricted organization's push is sent within a minute without a target, whatever the body says. A push already sent cannot be recalled. 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.

  • enabledboolean

    false: it is not sent.

  • hiddenboolean

    Hidden from the in-app list.

  • sendToOneboolean

    Sent to a single test device.

  • 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.

  • scheduleTimestring

    When it is sent, with its offset; left out at creation: within a minute.

Returns

The scheduled push, as stored.

  • objectapp_notification

    Always app_notification.

  • idstring

    The scheduled push id.

  • titlestring

    The push title.

  • bodystring | null

    The push body.

  • enabledboolean

    It is sent.

  • 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.

  • scheduleTimestring | null

    When it is sent (ISO-8601).

  • sentAtstring | null

    When it was sent; null until then (ISO-8601).

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

POST /v1/masjid/app-notifications/scheduled
curl -X POST "https://hub.masjidbox.com/v1/masjid/app-notifications/scheduled" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scheduleTime":"2026-12-01T10:00:00.000Z","title":"Eid Mubarak"}'
Example request · MasjidAppNotificationCreate
{
  "scheduleTime": "2026-12-01T10:00:00.000Z",
  "title": "Eid Mubarak"
}
201 · MasjidAppNotification
{
  "body": "Eid prayer at 8:00.",
  "createdAt": "2026-12-01T10:00:00.000Z",
  "enabled": true,
  "hidden": false,
  "id": "apn_6af5c9e2bc095fbd2dc5735c",
  "object": "app_notification",
  "scheduleTime": "2026-12-01T10:00:00.000Z",
  "sendToOne": false,
  "sentAt": null,
  "target": {
    "page": null,
    "url": "https://example.org/eid"
  },
  "title": "Eid Mubarak",
  "updatedAt": "2026-12-01T10:00:00.000Z"
}

Change a scheduled push

Masjid key · secret · Notifications: edit

PATCH/v1/masjid/app-notifications/scheduled/{id}

A merge: a field you leave out stays, nested ones (target, at) field by field. A new scheduleTime moves when it is sent; a push already sent stays sent. 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 scheduled push id.

Request body

  • titlestring

    The push title.

  • bodystring

    The push body.

  • enabledboolean

    false: it is not sent.

  • hiddenboolean

    Hidden from the in-app list.

  • sendToOneboolean

    Sent to a single test device.

  • 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.

  • scheduleTimestring

    When it is sent, with its offset; left out at creation: within a minute.

Returns

The scheduled push after the change.

  • objectapp_notification

    Always app_notification.

  • idstring

    The scheduled push id.

  • titlestring

    The push title.

  • bodystring | null

    The push body.

  • enabledboolean

    It is sent.

  • 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.

  • scheduleTimestring | null

    When it is sent (ISO-8601).

  • sentAtstring | null

    When it was sent; null until then (ISO-8601).

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

PATCH /v1/masjid/app-notifications/scheduled/{id}
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/app-notifications/scheduled/apn_6af5c9e2bc095fbd2dc5735c" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scheduleTime":"2026-12-01T10:00:00.000Z"}'
Example request · MasjidAppNotificationPatch
{
  "scheduleTime": "2026-12-01T10:00:00.000Z"
}
200 · MasjidAppNotification
{
  "body": "Eid prayer at 8:00.",
  "createdAt": "2026-12-01T10:00:00.000Z",
  "enabled": true,
  "hidden": false,
  "id": "apn_6af5c9e2bc095fbd2dc5735c",
  "object": "app_notification",
  "scheduleTime": "2026-12-01T10:00:00.000Z",
  "sendToOne": false,
  "sentAt": null,
  "target": {
    "page": null,
    "url": "https://example.org/eid"
  },
  "title": "Eid Mubarak",
  "updatedAt": "2026-12-01T10:00:00.000Z"
}

Delete a scheduled push

Masjid key · secret · Notifications: edit

DELETE/v1/masjid/app-notifications/scheduled/{id}

Deletes a scheduled push: not sent yet, it never is; already sent, it stays on the devices it reached. 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 scheduled push id.

Returns

Deleted. No body.

204 · No response body.

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