Your masjid · Screens

Your playlists

The playlists your screens play and their slides, each typed by its type: create one, change it, delete it.

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

Your playlists

Masjid key · Screens: read

GET/v1/masjid/playlists

The playlists your screens play, with their slides, 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 playlists.

  • objectlist

    Always list.

  • dataobject[]

    The items of this page.

    Show child attributes (11)
    • objectplaylist

      Always playlist.

    • idstring

      The playlist id.

    • namestring | null

      Its name.

    • directionstring | null

      Its text direction.

    • hideTopBarboolean | null

      The top bar is hidden; null follows the settings.

    • languagesstring[]

      Languages it cycles through.

    • languageDelaynumber | null

      Seconds each language stays; null follows the settings.

    • themeobject

      Colours, fonts and backgrounds, as stored.

    • slidesany[]

      Its slides, in order: each typed by its type (MasjidPlaylistSlide), or as stored for a slide written before the slides were typed that does not parse as its type.

    • 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/playlists
curl "https://hub.masjidbox.com/v1/masjid/playlists" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidPlaylistsPage
{
  "data": [
    {
      "createdAt": "2026-11-12T08:00:00.000Z",
      "direction": "ltr",
      "hideTopBar": false,
      "id": "pll_6af5c9e2bc095fbd2dc5735b",
      "languageDelay": 10,
      "languages": [
        "en",
        "ar"
      ],
      "name": "Main hall",
      "object": "playlist",
      "slides": [
        {
          "delay": 10,
          "showHijri": true,
          "type": "clock"
        }
      ],
      "theme": {
        "background": "#000000"
      },
      "updatedAt": "2026-11-12T08:00:00.000Z"
    }
  ],
  "object": "list",
  "pagination": {
    "hasMore": false,
    "limit": 25,
    "nextCursor": null
  }
}

One of your playlists

Masjid key · Screens: read

GET/v1/masjid/playlists/{id}

A playlist and its slides, in order: each typed by its type (MasjidPlaylistSlide), the content ids it names under their public prefix; a slide stored before the slides were typed that does not parse as its type is answered as stored. Needs Screens: read.

Parameters

  • idstring · pathrequired

    The playlist id.

Returns

The playlist.

  • objectplaylist

    Always playlist.

  • idstring

    The playlist id.

  • namestring | null

    Its name.

  • directionstring | null

    Its text direction.

  • hideTopBarboolean | null

    The top bar is hidden; null follows the settings.

  • languagesstring[]

    Languages it cycles through.

  • languageDelaynumber | null

    Seconds each language stays; null follows the settings.

  • themeobject

    Colours, fonts and backgrounds, as stored.

  • slidesany[]

    Its slides, in order: each typed by its type (MasjidPlaylistSlide), or as stored for a slide written before the slides were typed that does not parse as its type.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

GET /v1/masjid/playlists/{id}
curl "https://hub.masjidbox.com/v1/masjid/playlists/pll_6af5c9e2bc095fbd2dc5735b" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidPlaylist
{
  "createdAt": "2026-11-12T08:00:00.000Z",
  "direction": "ltr",
  "hideTopBar": false,
  "id": "pll_6af5c9e2bc095fbd2dc5735b",
  "languageDelay": 10,
  "languages": [
    "en",
    "ar"
  ],
  "name": "Main hall",
  "object": "playlist",
  "slides": [
    {
      "delay": 10,
      "showHijri": true,
      "type": "clock"
    }
  ],
  "theme": {
    "background": "#000000"
  },
  "updatedAt": "2026-11-12T08:00:00.000Z"
}

Create a playlist

Masjid key · secret · Screens: edit

POST/v1/masjid/playlists

Creates a playlist as the dashboard does: its name, text direction, languages and slides. The slides are typed: each by its type, with the fields of that type only (MasjidPlaylistSlide, 23 types); an unknown key, a field of another type or an unknown type is a 400, and every URL is https. A media, announcement, event or donation campaign a slide names is one of yours, by its public id (med_, ann_, evt_, cmp_): another organization's renders nothing. A request body is at most 16 KB, about a hundred slides. The theme is not written by the API. It plays nowhere until a screen or a schedule names it. 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

  • namestringrequired

    Its name.

  • directionltr | rtl

    Its text direction: left to right, or right to left.

  • hideTopBarboolean | null

    The top bar is hidden; null follows the screen settings again.

  • languagesstring[]

    Languages it cycles through.

  • languageDelayinteger | null

    Seconds each language stays, 0 to 3600; null follows the screen settings again.

  • slidesany[]

    Its slides, in the order they play: the whole list, each typed by its type (MasjidPlaylistSlide). An unknown key, a field of another type or an unknown type is a 400.

Returns

The playlist, as stored.

  • objectplaylist

    Always playlist.

  • idstring

    The playlist id.

  • namestring | null

    Its name.

  • directionstring | null

    Its text direction.

  • hideTopBarboolean | null

    The top bar is hidden; null follows the settings.

  • languagesstring[]

    Languages it cycles through.

  • languageDelaynumber | null

    Seconds each language stays; null follows the settings.

  • themeobject

    Colours, fonts and backgrounds, as stored.

  • slidesany[]

    Its slides, in order: each typed by its type (MasjidPlaylistSlide), or as stored for a slide written before the slides were typed that does not parse as its type.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

POST /v1/masjid/playlists
curl -X POST "https://hub.masjidbox.com/v1/masjid/playlists" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Friday","slides":[{"delay":20,"layout":"fullscreen","showIqamah":true,"type":"prayers"}]}'
Example request · MasjidPlaylistCreate
{
  "name": "Friday",
  "slides": [
    {
      "delay": 20,
      "layout": "fullscreen",
      "showIqamah": true,
      "type": "prayers"
    }
  ]
}
201 · MasjidPlaylist
{
  "createdAt": "2026-11-12T08:00:00.000Z",
  "direction": "ltr",
  "hideTopBar": false,
  "id": "pll_6af5c9e2bc095fbd2dc5735b",
  "languageDelay": 10,
  "languages": [
    "en",
    "ar"
  ],
  "name": "Main hall",
  "object": "playlist",
  "slides": [
    {
      "delay": 10,
      "showHijri": true,
      "type": "clock"
    }
  ],
  "theme": {
    "background": "#000000"
  },
  "updatedAt": "2026-11-12T08:00:00.000Z"
}

Change a playlist

Masjid key · secret · Screens: edit

PATCH/v1/masjid/playlists/{id}

A merge: a field you leave out stays, a slides list replaces the slides whole ([] empties them), null resets hideTopBar and languageDelay to your screen settings. The slides are typed: each by its type, with the fields of that type only (MasjidPlaylistSlide, 23 types); an unknown key, a field of another type or an unknown type is a 400, and every URL is https. A media, announcement, event or donation campaign a slide names is one of yours, by its public id (med_, ann_, evt_, cmp_): another organization's renders nothing. A request body is at most 16 KB, about a hundred slides. Every screen playing it shows the change at its next refresh. 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 id.

Request body

  • namestring

    Its name.

  • directionltr | rtl

    Its text direction: left to right, or right to left.

  • hideTopBarboolean | null

    The top bar is hidden; null follows the screen settings again.

  • languagesstring[]

    Languages it cycles through.

  • languageDelayinteger | null

    Seconds each language stays, 0 to 3600; null follows the screen settings again.

  • slidesany[]

    Its slides, in the order they play: the whole list, each typed by its type (MasjidPlaylistSlide). An unknown key, a field of another type or an unknown type is a 400.

Returns

The playlist after the change.

  • objectplaylist

    Always playlist.

  • idstring

    The playlist id.

  • namestring | null

    Its name.

  • directionstring | null

    Its text direction.

  • hideTopBarboolean | null

    The top bar is hidden; null follows the settings.

  • languagesstring[]

    Languages it cycles through.

  • languageDelaynumber | null

    Seconds each language stays; null follows the settings.

  • themeobject

    Colours, fonts and backgrounds, as stored.

  • slidesany[]

    Its slides, in order: each typed by its type (MasjidPlaylistSlide), or as stored for a slide written before the slides were typed that does not parse as its type.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

PATCH /v1/masjid/playlists/{id}
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/playlists/pll_6af5c9e2bc095fbd2dc5735b" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slides":[{"delay":20,"showHijri":true,"type":"clock"}]}'
Example request · MasjidPlaylistPatch
{
  "slides": [
    {
      "delay": 20,
      "showHijri": true,
      "type": "clock"
    }
  ]
}
200 · MasjidPlaylist
{
  "createdAt": "2026-11-12T08:00:00.000Z",
  "direction": "ltr",
  "hideTopBar": false,
  "id": "pll_6af5c9e2bc095fbd2dc5735b",
  "languageDelay": 10,
  "languages": [
    "en",
    "ar"
  ],
  "name": "Main hall",
  "object": "playlist",
  "slides": [
    {
      "delay": 10,
      "showHijri": true,
      "type": "clock"
    }
  ],
  "theme": {
    "background": "#000000"
  },
  "updatedAt": "2026-11-12T08:00:00.000Z"
}

Delete a playlist

Masjid key · secret · Screens: edit

DELETE/v1/masjid/playlists/{id}

Deletes a playlist for good. Point the screens that play it at another one first (PATCH /v1/masjid/screens/{id}); a schedule that showed it stays, its playlist null, and shows nothing. 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 id.

Returns

Deleted. No body.

204 · No response body.

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