Your masjid · Content

Your lives

The live streams your apps and pages show. One at most is active: activating one deactivates the others.

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

Your lives

Masjid key · Content: read

GET/v1/masjid/lives

Your organization's live streams, the one your apps and pages show marked active, newest first, by cursor (limit 1 to 100, 25 by default; cursor from the previous page). Needs Content: 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 lives.

  • objectlist

    Always list.

  • dataobject[]

    The items of this page.

    Show child attributes (13)
    • objectlive

      Always live.

    • idstring

      The live id.

    • urlstring | null

      The stream page it was created from.

    • parsedUrlstring | null

      The embeddable URL.

    • providerstring | null

      The provider, e.g. YouTube.

    • titlestring | null

      The stream's title.

    • htmlstring | null

      The provider's embed HTML.

    • widthnumber | null

      The embed width, in pixels.

    • heightnumber | null

      The embed height, in pixels.

    • activeboolean

      Whether your organization shows it: one live at most is active.

    • broadcastingboolean | null

      Whether the stream is on air, as last checked.

    • 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/lives
curl "https://hub.masjidbox.com/v1/masjid/lives" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidLivesPage
{
  "data": [
    {
      "active": true,
      "broadcasting": false,
      "createdAt": "2026-11-12T08:00:00.000Z",
      "height": 270,
      "html": "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/abc\"></iframe>",
      "id": "liv_6af5c9e2bc095fbd2dc57364",
      "object": "live",
      "parsedUrl": "https://www.youtube.com/embed/abc",
      "provider": "YouTube",
      "title": "Jumuah khutbah",
      "updatedAt": "2026-11-12T08:00:00.000Z",
      "url": "https://www.youtube.com/watch?v=abc",
      "width": 480
    }
  ],
  "object": "list",
  "pagination": {
    "hasMore": false,
    "limit": 25,
    "nextCursor": null
  }
}

One of your lives

Masjid key · Content: read

GET/v1/masjid/lives/{id}

A live of your organization: its stream page, its embed and whether it is the one shown. Needs Content: read.

Parameters

  • idstring · pathrequired

    The live id.

Returns

The live.

  • objectlive

    Always live.

  • idstring

    The live id.

  • urlstring | null

    The stream page it was created from.

  • parsedUrlstring | null

    The embeddable URL.

  • providerstring | null

    The provider, e.g. YouTube.

  • titlestring | null

    The stream's title.

  • htmlstring | null

    The provider's embed HTML.

  • widthnumber | null

    The embed width, in pixels.

  • heightnumber | null

    The embed height, in pixels.

  • activeboolean

    Whether your organization shows it: one live at most is active.

  • broadcastingboolean | null

    Whether the stream is on air, as last checked.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

GET /v1/masjid/lives/{id}
curl "https://hub.masjidbox.com/v1/masjid/lives/liv_6af5c9e2bc095fbd2dc57364" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidLive
{
  "active": true,
  "broadcasting": false,
  "createdAt": "2026-11-12T08:00:00.000Z",
  "height": 270,
  "html": "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/abc\"></iframe>",
  "id": "liv_6af5c9e2bc095fbd2dc57364",
  "object": "live",
  "parsedUrl": "https://www.youtube.com/embed/abc",
  "provider": "YouTube",
  "title": "Jumuah khutbah",
  "updatedAt": "2026-11-12T08:00:00.000Z",
  "url": "https://www.youtube.com/watch?v=abc",
  "width": 480
}

Create a live

Masjid key · secret · Content: edit

POST/v1/masjid/lives

Creates a live from a stream page (a YouTube or Facebook video or live URL); a URL that cannot be read is a 400. It is stored inactive: activate it to show it. Needs a secret key with Content: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.

Parameters

No parameters.

Request body

  • urlstringrequired

    The stream page: a YouTube or Facebook video or live URL.

Returns

The live, as stored.

  • objectlive

    Always live.

  • idstring

    The live id.

  • urlstring | null

    The stream page it was created from.

  • parsedUrlstring | null

    The embeddable URL.

  • providerstring | null

    The provider, e.g. YouTube.

  • titlestring | null

    The stream's title.

  • htmlstring | null

    The provider's embed HTML.

  • widthnumber | null

    The embed width, in pixels.

  • heightnumber | null

    The embed height, in pixels.

  • activeboolean

    Whether your organization shows it: one live at most is active.

  • broadcastingboolean | null

    Whether the stream is on air, as last checked.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

POST /v1/masjid/lives
curl -X POST "https://hub.masjidbox.com/v1/masjid/lives" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://www.youtube.com/watch?v=abc"}'
Example request · MasjidLiveCreate
{
  "url": "https://www.youtube.com/watch?v=abc"
}
201 · MasjidLive
{
  "active": true,
  "broadcasting": false,
  "createdAt": "2026-11-12T08:00:00.000Z",
  "height": 270,
  "html": "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/abc\"></iframe>",
  "id": "liv_6af5c9e2bc095fbd2dc57364",
  "object": "live",
  "parsedUrl": "https://www.youtube.com/embed/abc",
  "provider": "YouTube",
  "title": "Jumuah khutbah",
  "updatedAt": "2026-11-12T08:00:00.000Z",
  "url": "https://www.youtube.com/watch?v=abc",
  "width": 480
}

Change a live

Masjid key · secret · Content: edit

PATCH/v1/masjid/lives/{id}

Switches a live on or off. Activating one deactivates your organization's other lives first: one live at most is shown. Its URL is fixed once created: create another to change it. Needs a secret key with Content: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.

Parameters

  • idstring · pathrequired

    The live id.

Request body

  • activeboolean

    Whether your organization shows it. true deactivates your organization's other lives.

Returns

The live after the change.

  • objectlive

    Always live.

  • idstring

    The live id.

  • urlstring | null

    The stream page it was created from.

  • parsedUrlstring | null

    The embeddable URL.

  • providerstring | null

    The provider, e.g. YouTube.

  • titlestring | null

    The stream's title.

  • htmlstring | null

    The provider's embed HTML.

  • widthnumber | null

    The embed width, in pixels.

  • heightnumber | null

    The embed height, in pixels.

  • activeboolean

    Whether your organization shows it: one live at most is active.

  • broadcastingboolean | null

    Whether the stream is on air, as last checked.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

PATCH /v1/masjid/lives/{id}
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/lives/liv_6af5c9e2bc095fbd2dc57364" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"active":true}'
Example request · MasjidLivePatch
{
  "active": true
}
200 · MasjidLive
{
  "active": true,
  "broadcasting": false,
  "createdAt": "2026-11-12T08:00:00.000Z",
  "height": 270,
  "html": "<iframe width=\"480\" height=\"270\" src=\"https://www.youtube.com/embed/abc\"></iframe>",
  "id": "liv_6af5c9e2bc095fbd2dc57364",
  "object": "live",
  "parsedUrl": "https://www.youtube.com/embed/abc",
  "provider": "YouTube",
  "title": "Jumuah khutbah",
  "updatedAt": "2026-11-12T08:00:00.000Z",
  "url": "https://www.youtube.com/watch?v=abc",
  "width": 480
}

Delete a live

Masjid key · secret · Content: edit

DELETE/v1/masjid/lives/{id}

Deletes a live. Needs a secret key with Content: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.

Parameters

  • idstring · pathrequired

    The live id.

Returns

Deleted. No body.

204 · No response body.

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