Your masjid · Content

Your news

The news items of your organization, as the Masjidbox apps and pages show them: a title, a text and a media.

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

Your news

Masjid key · Content: read

GET/v1/masjid/news

Your organization's news, as the Masjidbox apps and pages show them, 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 news.

  • objectlist

    Always list.

  • dataobject[]

    The items of this page.

    Show child attributes (10)
    • objectnews

      Always news.

    • idstring

      The news id.

    • titlestring

      The title.

    • descriptionstring | null

      The text.

    • mediaobject | null

      The media it shows.

    • media.idstring

      The media id.

    • media.typestring | null

      picture, video or document.

    • media.urlstring | null

      The URL to show it from.

    • 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/news
curl "https://hub.masjidbox.com/v1/masjid/news" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidNewsPage
{
  "data": [
    {
      "createdAt": "2026-11-12T08:00:00.000Z",
      "description": "The new wing opens on Friday after Jumuah.",
      "id": "nws_6af5c9e2bc095fbd2dc57361",
      "media": {
        "id": "med_6af5c9e2bc095fbd2dc5735f",
        "type": "picture",
        "url": "https://cdn.masjidbox.com/content/pictures/a.webp"
      },
      "object": "news",
      "title": "The new wing opens",
      "updatedAt": "2026-11-12T08:00:00.000Z"
    }
  ],
  "object": "list",
  "pagination": {
    "hasMore": false,
    "limit": 25,
    "nextCursor": null
  }
}

One of your news

Masjid key · Content: read

GET/v1/masjid/news/{id}

A news item of your organization, with the media it shows. Needs Content: read.

Parameters

  • idstring · pathrequired

    The news id.

Returns

The news item.

  • objectnews

    Always news.

  • idstring

    The news id.

  • titlestring

    The title.

  • descriptionstring | null

    The text.

  • mediaobject | null

    The media it shows.

    Show child attributes (3)
    • idstring

      The media id.

    • typestring | null

      picture, video or document.

    • urlstring | null

      The URL to show it from.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

GET /v1/masjid/news/{id}
curl "https://hub.masjidbox.com/v1/masjid/news/nws_6af5c9e2bc095fbd2dc57361" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidNews
{
  "createdAt": "2026-11-12T08:00:00.000Z",
  "description": "The new wing opens on Friday after Jumuah.",
  "id": "nws_6af5c9e2bc095fbd2dc57361",
  "media": {
    "id": "med_6af5c9e2bc095fbd2dc5735f",
    "type": "picture",
    "url": "https://cdn.masjidbox.com/content/pictures/a.webp"
  },
  "object": "news",
  "title": "The new wing opens",
  "updatedAt": "2026-11-12T08:00:00.000Z"
}

Create a news item

Masjid key · secret · Content: edit

POST/v1/masjid/news

Creates a news item: a title, a text and a media of your organization. The apps and pages show it within minutes. 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

  • descriptionstring | null

    The text.

  • mediastring | null

    A media of your organization (upload it first); null removes it.

  • titlestringrequired

    The title.

Returns

The news item, as stored.

  • objectnews

    Always news.

  • idstring

    The news id.

  • titlestring

    The title.

  • descriptionstring | null

    The text.

  • mediaobject | null

    The media it shows.

    Show child attributes (3)
    • idstring

      The media id.

    • typestring | null

      picture, video or document.

    • urlstring | null

      The URL to show it from.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

POST /v1/masjid/news
curl -X POST "https://hub.masjidbox.com/v1/masjid/news" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"description":"The new wing opens on Friday after Jumuah.","title":"The new wing opens"}'
Example request · MasjidNewsCreate
{
  "description": "The new wing opens on Friday after Jumuah.",
  "title": "The new wing opens"
}
201 · MasjidNews
{
  "createdAt": "2026-11-12T08:00:00.000Z",
  "description": "The new wing opens on Friday after Jumuah.",
  "id": "nws_6af5c9e2bc095fbd2dc57361",
  "media": {
    "id": "med_6af5c9e2bc095fbd2dc5735f",
    "type": "picture",
    "url": "https://cdn.masjidbox.com/content/pictures/a.webp"
  },
  "object": "news",
  "title": "The new wing opens",
  "updatedAt": "2026-11-12T08:00:00.000Z"
}

Change a news item

Masjid key · secret · Content: edit

PATCH/v1/masjid/news/{id}

JSON Merge Patch: a field you leave out stays, null clears it. A media must be one of your organization's (med_ id), else 400. 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 news id.

Request body

  • descriptionstring | null

    The text.

  • mediastring | null

    A media of your organization (upload it first); null removes it.

  • titlestring

    The title.

Returns

The news item after the change.

  • objectnews

    Always news.

  • idstring

    The news id.

  • titlestring

    The title.

  • descriptionstring | null

    The text.

  • mediaobject | null

    The media it shows.

    Show child attributes (3)
    • idstring

      The media id.

    • typestring | null

      picture, video or document.

    • urlstring | null

      The URL to show it from.

  • createdAtstring | null

    When it was created (ISO-8601).

  • updatedAtstring | null

    When it last changed (ISO-8601).

PATCH /v1/masjid/news/{id}
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/news/nws_6af5c9e2bc095fbd2dc57361" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"The new wing opens on Friday"}'
Example request · MasjidNewsPatch
{
  "title": "The new wing opens on Friday"
}
200 · MasjidNews
{
  "createdAt": "2026-11-12T08:00:00.000Z",
  "description": "The new wing opens on Friday after Jumuah.",
  "id": "nws_6af5c9e2bc095fbd2dc57361",
  "media": {
    "id": "med_6af5c9e2bc095fbd2dc5735f",
    "type": "picture",
    "url": "https://cdn.masjidbox.com/content/pictures/a.webp"
  },
  "object": "news",
  "title": "The new wing opens",
  "updatedAt": "2026-11-12T08:00:00.000Z"
}

Delete a news item

Masjid key · secret · Content: edit

DELETE/v1/masjid/news/{id}

Deletes a news item everywhere it shows, and takes it off your collections. 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 news id.

Returns

Deleted. No body.

204 · No response body.

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