Your masjid · Screens

Your playlist schedules

When one of your playlists replaces the one your screens play: the days, a daily window by time or by prayer, and the screens.

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

Your playlist schedules

Masjid key · Screens: read

GET/v1/masjid/playlist-schedules

When your playlists replace the one your screens play — the days, the daily window, the screens — newest first, by cursor (limit 1 to 100, 25 by default; cursor from the previous page). Needs Screens: 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 playlist schedules.

  • objectlist

    Always list.

  • dataobject[]

    The items of this page.

    Show child attributes (22)
    • objectplaylist_schedule

      Always playlist_schedule.

    • idstring

      The schedule id.

    • playlistobject | null

      The playlist it shows; null when that playlist no longer exists.

    • playlist.idstring

      The playlist id.

    • playlist.namestring | null

      Its name.

    • playersstring[]

      Your screens of kind player it applies to.

    • androidsstring[]

      Your screens of kind android it applies to.

    • availableFromstring | null

      First day it applies; null for no start (ISO-8601).

    • availableTostring | null

      Last day it applies; null for no end (ISO-8601).

    • weekdaysnumber[]

      Days of the week it applies, 0 (Sunday) to 6.

    • timeFromobject

      When the window opens each day.

    • timeFrom.timestring | null

      A wall-clock time, HH:mm; null when relative to a prayer.

    • timeFrom.prayerstring | null

      The prayer it is relative to; null for a time.

    • timeFrom.prayerTypestring | null

      Which time of that prayer: athan or iqamah.

    • timeFrom.offsetnumber | null

      Minutes after (positive) or before (negative) it.

    • timeToobject

      When the window closes each day.

    • timeTo.timestring | null

      A wall-clock time, HH:mm; null when relative to a prayer.

    • timeTo.prayerstring | null

      The prayer it is relative to; null for a time.

    • timeTo.prayerTypestring | null

      Which time of that prayer: athan or iqamah.

    • timeTo.offsetnumber | null

      Minutes after (positive) or before (negative) it.

    • 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/playlist-schedules
curl "https://hub.masjidbox.com/v1/masjid/playlist-schedules" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidPlaylistSchedulesPage
{
  "data": [
    {
      "androids": [],
      "availableFrom": "2026-03-01T00:00:00.000Z",
      "availableTo": "2026-03-30T00:00:00.000Z",
      "createdAt": "2026-11-12T08:00:00.000Z",
      "id": "psc_6af5c9e2bc095fbd2dc5735c",
      "object": "playlist_schedule",
      "players": [
        "scr_6af5c9e2bc095fbd2dc5735a"
      ],
      "playlist": {
        "id": "pll_6af5c9e2bc095fbd2dc5735b",
        "name": "Friday"
      },
      "timeFrom": {
        "offset": null,
        "prayer": null,
        "prayerType": null,
        "time": "12:00"
      },
      "timeTo": {
        "offset": 30,
        "prayer": "dhuhr",
        "prayerType": "iqamah",
        "time": null
      },
      "updatedAt": "2026-11-12T08:00:00.000Z",
      "weekdays": [
        5
      ]
    }
  ],
  "object": "list",
  "pagination": {
    "hasMore": false,
    "limit": 25,
    "nextCursor": null
  }
}

One of your playlist schedules

Masjid key · Screens: read

GET/v1/masjid/playlist-schedules/{id}

A playlist schedule: the playlist it shows, on which of your screens, on which days and in which daily window. Needs Screens: read.

Parameters

  • idstring · pathrequired

    The playlist schedule id.

Returns

The playlist schedule.

  • objectplaylist_schedule

    Always playlist_schedule.

  • idstring

    The schedule id.

  • playlistobject | null

    The playlist it shows; null when that playlist no longer exists.

    Show child attributes (2)
    • idstring

      The playlist id.

    • namestring | null

      Its name.

  • playersstring[]

    Your screens of kind player it applies to.

  • androidsstring[]

    Your screens of kind android it applies to.

  • availableFromstring | null

    First day it applies; null for no start (ISO-8601).

  • availableTostring | null

    Last day it applies; null for no end (ISO-8601).

  • weekdaysnumber[]

    Days of the week it applies, 0 (Sunday) to 6.

  • timeFromobject

    When the window opens each day.

    Show child attributes (4)
    • timestring | null

      A wall-clock time, HH:mm; null when relative to a prayer.

    • prayerstring | null

      The prayer it is relative to; null for a time.

    • prayerTypestring | null

      Which time of that prayer: athan or iqamah.

    • offsetnumber | null

      Minutes after (positive) or before (negative) it.

  • timeToobject

    When the window closes each day.

    Show child attributes (4)
    • timestring | null

      A wall-clock time, HH:mm; null when relative to a prayer.

    • prayerstring | null

      The prayer it is relative to; null for a time.

    • prayerTypestring | null

      Which time of that prayer: athan or iqamah.

    • offsetnumber | null

      Minutes after (positive) or before (negative) it.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

GET /v1/masjid/playlist-schedules/{id}
curl "https://hub.masjidbox.com/v1/masjid/playlist-schedules/psc_6af5c9e2bc095fbd2dc5735c" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidPlaylistSchedule
{
  "androids": [],
  "availableFrom": "2026-03-01T00:00:00.000Z",
  "availableTo": "2026-03-30T00:00:00.000Z",
  "createdAt": "2026-11-12T08:00:00.000Z",
  "id": "psc_6af5c9e2bc095fbd2dc5735c",
  "object": "playlist_schedule",
  "players": [
    "scr_6af5c9e2bc095fbd2dc5735a"
  ],
  "playlist": {
    "id": "pll_6af5c9e2bc095fbd2dc5735b",
    "name": "Friday"
  },
  "timeFrom": {
    "offset": null,
    "prayer": null,
    "prayerType": null,
    "time": "12:00"
  },
  "timeTo": {
    "offset": 30,
    "prayer": "dhuhr",
    "prayerType": "iqamah",
    "time": null
  },
  "updatedAt": "2026-11-12T08:00:00.000Z",
  "weekdays": [
    5
  ]
}

Schedule a playlist

Masjid key · secret · Screens: edit

POST/v1/masjid/playlist-schedules

Schedules one of your playlists (pll_) on your screens (scr_: players for Masjidbox boxes, androids for Android screens; Tizen screens take no schedule), from availableFrom to availableTo, on weekdays, between timeFrom and timeTo: each end a time or a prayer with an offset, not both. A playlist or a screen that is not your organization's is a 404, and nothing is written. Needs a secret key with Screens: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.

Parameters

No parameters.

Request body

  • playliststringrequired

    The playlist it shows: one of yours (pll_).

  • playersstring[]

    Your screens of kind player it applies to (scr_ ids): the whole list.

  • androidsstring[]

    Your screens of kind android it applies to (scr_ ids): the whole list.

  • availableFromstring | null

    First day it applies. ISO-8601; null for none.

  • availableTostring | null

    Last day it applies. ISO-8601; null for none.

  • weekdaysinteger[]

    Days of the week it applies, 0 (Sunday) to 6: the whole list.

  • timeFromobject

    When the window opens each day. A time, or a prayer with an offset: not both.

    Show child attributes (4)
    • timestring · HH:mm | null

      A wall-clock time, HH:mm (00:00 to 23:59).

    • prayerfajr | sunrise | dhuhr | asr | maghrib | isha | null

      The prayer it is relative to.

    • prayerTypeathan | iqamah | null

      Which time of that prayer.

    • offsetinteger | null

      Minutes after (positive) or before (negative) that prayer time, -1440 to 1440.

  • timeToobject

    When the window closes each day. A time, or a prayer with an offset: not both.

    Show child attributes (4)
    • timestring · HH:mm | null

      A wall-clock time, HH:mm (00:00 to 23:59).

    • prayerfajr | sunrise | dhuhr | asr | maghrib | isha | null

      The prayer it is relative to.

    • prayerTypeathan | iqamah | null

      Which time of that prayer.

    • offsetinteger | null

      Minutes after (positive) or before (negative) that prayer time, -1440 to 1440.

Returns

The playlist schedule, as stored.

  • objectplaylist_schedule

    Always playlist_schedule.

  • idstring

    The schedule id.

  • playlistobject | null

    The playlist it shows; null when that playlist no longer exists.

    Show child attributes (2)
    • idstring

      The playlist id.

    • namestring | null

      Its name.

  • playersstring[]

    Your screens of kind player it applies to.

  • androidsstring[]

    Your screens of kind android it applies to.

  • availableFromstring | null

    First day it applies; null for no start (ISO-8601).

  • availableTostring | null

    Last day it applies; null for no end (ISO-8601).

  • weekdaysnumber[]

    Days of the week it applies, 0 (Sunday) to 6.

  • timeFromobject

    When the window opens each day.

    Show child attributes (4)
    • timestring | null

      A wall-clock time, HH:mm; null when relative to a prayer.

    • prayerstring | null

      The prayer it is relative to; null for a time.

    • prayerTypestring | null

      Which time of that prayer: athan or iqamah.

    • offsetnumber | null

      Minutes after (positive) or before (negative) it.

  • timeToobject

    When the window closes each day.

    Show child attributes (4)
    • timestring | null

      A wall-clock time, HH:mm; null when relative to a prayer.

    • prayerstring | null

      The prayer it is relative to; null for a time.

    • prayerTypestring | null

      Which time of that prayer: athan or iqamah.

    • offsetnumber | null

      Minutes after (positive) or before (negative) it.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

POST /v1/masjid/playlist-schedules
curl -X POST "https://hub.masjidbox.com/v1/masjid/playlist-schedules" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"players":["scr_6af5c9e2bc095fbd2dc5735a"],"playlist":"pll_6af5c9e2bc095fbd2dc5735b","weekdays":[5]}'
Example request · MasjidPlaylistScheduleCreate
{
  "players": [
    "scr_6af5c9e2bc095fbd2dc5735a"
  ],
  "playlist": "pll_6af5c9e2bc095fbd2dc5735b",
  "weekdays": [
    5
  ]
}
201 · MasjidPlaylistSchedule
{
  "androids": [],
  "availableFrom": "2026-03-01T00:00:00.000Z",
  "availableTo": "2026-03-30T00:00:00.000Z",
  "createdAt": "2026-11-12T08:00:00.000Z",
  "id": "psc_6af5c9e2bc095fbd2dc5735c",
  "object": "playlist_schedule",
  "players": [
    "scr_6af5c9e2bc095fbd2dc5735a"
  ],
  "playlist": {
    "id": "pll_6af5c9e2bc095fbd2dc5735b",
    "name": "Friday"
  },
  "timeFrom": {
    "offset": null,
    "prayer": null,
    "prayerType": null,
    "time": "12:00"
  },
  "timeTo": {
    "offset": 30,
    "prayer": "dhuhr",
    "prayerType": "iqamah",
    "time": null
  },
  "updatedAt": "2026-11-12T08:00:00.000Z",
  "weekdays": [
    5
  ]
}

Change a playlist schedule

Masjid key · secret · Screens: edit

PATCH/v1/masjid/playlist-schedules/{id}

A merge: a field you leave out stays, a list (players, androids, weekdays) is replaced whole. A playlist or a screen that is not your organization's is a 404, and nothing is written. Needs a secret key with Screens: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.

Parameters

  • idstring · pathrequired

    The playlist schedule id.

Request body

  • playliststring

    The playlist it shows: one of yours (pll_).

  • playersstring[]

    Your screens of kind player it applies to (scr_ ids): the whole list.

  • androidsstring[]

    Your screens of kind android it applies to (scr_ ids): the whole list.

  • availableFromstring | null

    First day it applies. ISO-8601; null for none.

  • availableTostring | null

    Last day it applies. ISO-8601; null for none.

  • weekdaysinteger[]

    Days of the week it applies, 0 (Sunday) to 6: the whole list.

  • timeFromobject

    When the window opens each day. A time, or a prayer with an offset: not both.

    Show child attributes (4)
    • timestring · HH:mm | null

      A wall-clock time, HH:mm (00:00 to 23:59).

    • prayerfajr | sunrise | dhuhr | asr | maghrib | isha | null

      The prayer it is relative to.

    • prayerTypeathan | iqamah | null

      Which time of that prayer.

    • offsetinteger | null

      Minutes after (positive) or before (negative) that prayer time, -1440 to 1440.

  • timeToobject

    When the window closes each day. A time, or a prayer with an offset: not both.

    Show child attributes (4)
    • timestring · HH:mm | null

      A wall-clock time, HH:mm (00:00 to 23:59).

    • prayerfajr | sunrise | dhuhr | asr | maghrib | isha | null

      The prayer it is relative to.

    • prayerTypeathan | iqamah | null

      Which time of that prayer.

    • offsetinteger | null

      Minutes after (positive) or before (negative) that prayer time, -1440 to 1440.

Returns

The playlist schedule after the change.

  • objectplaylist_schedule

    Always playlist_schedule.

  • idstring

    The schedule id.

  • playlistobject | null

    The playlist it shows; null when that playlist no longer exists.

    Show child attributes (2)
    • idstring

      The playlist id.

    • namestring | null

      Its name.

  • playersstring[]

    Your screens of kind player it applies to.

  • androidsstring[]

    Your screens of kind android it applies to.

  • availableFromstring | null

    First day it applies; null for no start (ISO-8601).

  • availableTostring | null

    Last day it applies; null for no end (ISO-8601).

  • weekdaysnumber[]

    Days of the week it applies, 0 (Sunday) to 6.

  • timeFromobject

    When the window opens each day.

    Show child attributes (4)
    • timestring | null

      A wall-clock time, HH:mm; null when relative to a prayer.

    • prayerstring | null

      The prayer it is relative to; null for a time.

    • prayerTypestring | null

      Which time of that prayer: athan or iqamah.

    • offsetnumber | null

      Minutes after (positive) or before (negative) it.

  • timeToobject

    When the window closes each day.

    Show child attributes (4)
    • timestring | null

      A wall-clock time, HH:mm; null when relative to a prayer.

    • prayerstring | null

      The prayer it is relative to; null for a time.

    • prayerTypestring | null

      Which time of that prayer: athan or iqamah.

    • offsetnumber | null

      Minutes after (positive) or before (negative) it.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

PATCH /v1/masjid/playlist-schedules/{id}
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/playlist-schedules/psc_6af5c9e2bc095fbd2dc5735c" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"weekdays":[4,5]}'
Example request · MasjidPlaylistSchedulePatch
{
  "weekdays": [
    4,
    5
  ]
}
200 · MasjidPlaylistSchedule
{
  "androids": [],
  "availableFrom": "2026-03-01T00:00:00.000Z",
  "availableTo": "2026-03-30T00:00:00.000Z",
  "createdAt": "2026-11-12T08:00:00.000Z",
  "id": "psc_6af5c9e2bc095fbd2dc5735c",
  "object": "playlist_schedule",
  "players": [
    "scr_6af5c9e2bc095fbd2dc5735a"
  ],
  "playlist": {
    "id": "pll_6af5c9e2bc095fbd2dc5735b",
    "name": "Friday"
  },
  "timeFrom": {
    "offset": null,
    "prayer": null,
    "prayerType": null,
    "time": "12:00"
  },
  "timeTo": {
    "offset": 30,
    "prayer": "dhuhr",
    "prayerType": "iqamah",
    "time": null
  },
  "updatedAt": "2026-11-12T08:00:00.000Z",
  "weekdays": [
    5
  ]
}

Delete a playlist schedule

Masjid key · secret · Screens: edit

DELETE/v1/masjid/playlist-schedules/{id}

Deletes a schedule: its screens go back to the playlist they play. The playlist itself stays. Needs a secret key with Screens: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.

Parameters

  • idstring · pathrequired

    The playlist schedule id.

Returns

Deleted. No body.

204 · No response body.

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