Your masjid · Content

Your events

Your organization's events, one-off or recurring, as the Masjidbox apps, pages and screens show them, with the media each one shows.

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

Your events

Masjid key · Content: read

GET/v1/masjid/events

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

  • objectlist

    Always list.

  • dataobject[]

    The items of this page.

    Show child attributes (22)
    • objectevent

      Always event.

    • idstring

      The event id.

    • titlestring

      The title.

    • descriptionstring | null

      The description.

    • addressstring | null

      Where it takes place.

    • coordinatesobject | null

      Where it takes place, on a map.

    • coordinates.latitudenumber

      Latitude.

    • coordinates.longitudenumber

      Longitude.

    • datesobject | null

      When it takes place, once.

    • dates.beginstring | null

      When it begins (ISO-8601).

    • dates.endstring | null

      When it ends (ISO-8601).

    • recurringobject | null

      How it recurs; null for a one-off event.

    • recurring.typedaily | weekly | monthly

      The period.

    • recurring.daysstring[]

      The weekdays, for a weekly event.

    • recurring.dayOfMonthnumber | null

      The day of the month, 1 to 31.

    • recurring.timestring | null

      HH:MM, in your masjid's local time.

    • 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/events
curl "https://hub.masjidbox.com/v1/masjid/events" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidEventsPage
{
  "data": [
    {
      "address": "1 High St, Birmingham",
      "coordinates": {
        "latitude": 52.48,
        "longitude": -1.89
      },
      "createdAt": "2026-11-12T08:00:00.000Z",
      "dates": {
        "begin": "2026-12-01T18:00:00.000Z",
        "end": "2026-12-01T20:00:00.000Z"
      },
      "description": "Our monthly community iftar.",
      "id": "evt_6af5c9e2bc095fbd2dc5735d",
      "media": {
        "id": "med_6af5c9e2bc095fbd2dc5735f",
        "type": "picture",
        "url": "https://cdn.masjidbox.com/content/pictures/a.webp"
      },
      "object": "event",
      "recurring": {
        "dayOfMonth": 1,
        "days": [],
        "time": "18:30",
        "type": "monthly"
      },
      "title": "Community Iftar",
      "updatedAt": "2026-11-12T08:00:00.000Z"
    }
  ],
  "object": "list",
  "pagination": {
    "hasMore": false,
    "limit": 25,
    "nextCursor": null
  }
}

One of your events

Masjid key · Content: read

GET/v1/masjid/events/{id}

An event of your organization, with the media it shows. Needs Content: read.

Parameters

  • idstring · pathrequired

    The event id.

Returns

The event.

  • objectevent

    Always event.

  • idstring

    The event id.

  • titlestring

    The title.

  • descriptionstring | null

    The description.

  • addressstring | null

    Where it takes place.

  • coordinatesobject | null

    Where it takes place, on a map.

    Show child attributes (2)
    • latitudenumber

      Latitude.

    • longitudenumber

      Longitude.

  • datesobject | null

    When it takes place, once.

    Show child attributes (2)
    • beginstring | null

      When it begins (ISO-8601).

    • endstring | null

      When it ends (ISO-8601).

  • recurringobject | null

    How it recurs; null for a one-off event.

    Show child attributes (4)
    • typedaily | weekly | monthly

      The period.

    • daysstring[]

      The weekdays, for a weekly event.

    • dayOfMonthnumber | null

      The day of the month, 1 to 31.

    • timestring | null

      HH:MM, in your masjid's local time.

  • 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/events/{id}
curl "https://hub.masjidbox.com/v1/masjid/events/evt_6af5c9e2bc095fbd2dc5735d" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidEvent
{
  "address": "1 High St, Birmingham",
  "coordinates": {
    "latitude": 52.48,
    "longitude": -1.89
  },
  "createdAt": "2026-11-12T08:00:00.000Z",
  "dates": {
    "begin": "2026-12-01T18:00:00.000Z",
    "end": "2026-12-01T20:00:00.000Z"
  },
  "description": "Our monthly community iftar.",
  "id": "evt_6af5c9e2bc095fbd2dc5735d",
  "media": {
    "id": "med_6af5c9e2bc095fbd2dc5735f",
    "type": "picture",
    "url": "https://cdn.masjidbox.com/content/pictures/a.webp"
  },
  "object": "event",
  "recurring": {
    "dayOfMonth": 1,
    "days": [],
    "time": "18:30",
    "type": "monthly"
  },
  "title": "Community Iftar",
  "updatedAt": "2026-11-12T08:00:00.000Z"
}

Create an event

Masjid key · secret · Content: edit

POST/v1/masjid/events

Creates an event: once (dates, instants with their offset) or recurring (recurring: daily, weekly on days, monthly on dayOfMonth, at time HH:MM in your masjid's local time). The apps, pages and screens show it within minutes. A media must be one of your organization's, 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

No parameters.

Request body

  • descriptionstring | null

    The description.

  • addressstring | null

    Where it takes place.

  • coordinatesobject | null

    Where it takes place, on a map; null clears it.

    Show child attributes (2)
    • latitudenumberrequired

      Latitude.

    • longitudenumberrequired

      Longitude.

  • datesobject | null

    When it takes place, once.

    Show child attributes (2)
    • beginstring | null

      When it begins (ISO-8601, with its offset).

    • endstring | null

      When it ends (ISO-8601, with its offset).

  • mediastring | null

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

  • titlestringrequired

    The title.

  • recurringobject | null

    How it recurs.

    Show child attributes (4)
    • typedaily | weekly | monthlyrequired

      The period.

    • daysstring[]

      The weekdays, for a weekly event.

    • dayOfMonthinteger | null

      The day of the month, for a monthly event.

    • timestring · HH:mm | null

      HH:MM, in your masjid's local time.

Returns

The event, as stored.

  • objectevent

    Always event.

  • idstring

    The event id.

  • titlestring

    The title.

  • descriptionstring | null

    The description.

  • addressstring | null

    Where it takes place.

  • coordinatesobject | null

    Where it takes place, on a map.

    Show child attributes (2)
    • latitudenumber

      Latitude.

    • longitudenumber

      Longitude.

  • datesobject | null

    When it takes place, once.

    Show child attributes (2)
    • beginstring | null

      When it begins (ISO-8601).

    • endstring | null

      When it ends (ISO-8601).

  • recurringobject | null

    How it recurs; null for a one-off event.

    Show child attributes (4)
    • typedaily | weekly | monthly

      The period.

    • daysstring[]

      The weekdays, for a weekly event.

    • dayOfMonthnumber | null

      The day of the month, 1 to 31.

    • timestring | null

      HH:MM, in your masjid's local time.

  • 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/events
curl -X POST "https://hub.masjidbox.com/v1/masjid/events" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dates":{"begin":"2026-12-01T18:00:00.000Z"},"title":"Community Iftar"}'
Example request · MasjidEventCreate
{
  "dates": {
    "begin": "2026-12-01T18:00:00.000Z"
  },
  "title": "Community Iftar"
}
201 · MasjidEvent
{
  "address": "1 High St, Birmingham",
  "coordinates": {
    "latitude": 52.48,
    "longitude": -1.89
  },
  "createdAt": "2026-11-12T08:00:00.000Z",
  "dates": {
    "begin": "2026-12-01T18:00:00.000Z",
    "end": "2026-12-01T20:00:00.000Z"
  },
  "description": "Our monthly community iftar.",
  "id": "evt_6af5c9e2bc095fbd2dc5735d",
  "media": {
    "id": "med_6af5c9e2bc095fbd2dc5735f",
    "type": "picture",
    "url": "https://cdn.masjidbox.com/content/pictures/a.webp"
  },
  "object": "event",
  "recurring": {
    "dayOfMonth": 1,
    "days": [],
    "time": "18:30",
    "type": "monthly"
  },
  "title": "Community Iftar",
  "updatedAt": "2026-11-12T08:00:00.000Z"
}

Change an event

Masjid key · secret · Content: edit

PATCH/v1/masjid/events/{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. recurring merges field by field; null makes the event one-off. 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 event id.

Request body

  • descriptionstring | null

    The description.

  • addressstring | null

    Where it takes place.

  • coordinatesobject | null

    Where it takes place, on a map; null clears it.

    Show child attributes (2)
    • latitudenumberrequired

      Latitude.

    • longitudenumberrequired

      Longitude.

  • datesobject | null

    When it takes place, once.

    Show child attributes (2)
    • beginstring | null

      When it begins (ISO-8601, with its offset).

    • endstring | null

      When it ends (ISO-8601, with its offset).

  • mediastring | null

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

  • titlestring

    The title.

  • recurringobject | null

    Merged field by field; null makes the event one-off.

    Show child attributes (4)
    • typedaily | weekly | monthly

      The period.

    • daysstring[]

      The weekdays, for a weekly event.

    • dayOfMonthinteger | null

      The day of the month, for a monthly event.

    • timestring · HH:mm | null

      HH:MM, in your masjid's local time.

Returns

The event after the change.

  • objectevent

    Always event.

  • idstring

    The event id.

  • titlestring

    The title.

  • descriptionstring | null

    The description.

  • addressstring | null

    Where it takes place.

  • coordinatesobject | null

    Where it takes place, on a map.

    Show child attributes (2)
    • latitudenumber

      Latitude.

    • longitudenumber

      Longitude.

  • datesobject | null

    When it takes place, once.

    Show child attributes (2)
    • beginstring | null

      When it begins (ISO-8601).

    • endstring | null

      When it ends (ISO-8601).

  • recurringobject | null

    How it recurs; null for a one-off event.

    Show child attributes (4)
    • typedaily | weekly | monthly

      The period.

    • daysstring[]

      The weekdays, for a weekly event.

    • dayOfMonthnumber | null

      The day of the month, 1 to 31.

    • timestring | null

      HH:MM, in your masjid's local time.

  • 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/events/{id}
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/events/evt_6af5c9e2bc095fbd2dc5735d" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"recurring":{"time":"19:00"}}'
Example request · MasjidEventPatch
{
  "recurring": {
    "time": "19:00"
  }
}
200 · MasjidEvent
{
  "address": "1 High St, Birmingham",
  "coordinates": {
    "latitude": 52.48,
    "longitude": -1.89
  },
  "createdAt": "2026-11-12T08:00:00.000Z",
  "dates": {
    "begin": "2026-12-01T18:00:00.000Z",
    "end": "2026-12-01T20:00:00.000Z"
  },
  "description": "Our monthly community iftar.",
  "id": "evt_6af5c9e2bc095fbd2dc5735d",
  "media": {
    "id": "med_6af5c9e2bc095fbd2dc5735f",
    "type": "picture",
    "url": "https://cdn.masjidbox.com/content/pictures/a.webp"
  },
  "object": "event",
  "recurring": {
    "dayOfMonth": 1,
    "days": [],
    "time": "18:30",
    "type": "monthly"
  },
  "title": "Community Iftar",
  "updatedAt": "2026-11-12T08:00:00.000Z"
}

Delete an event

Masjid key · secret · Content: edit

DELETE/v1/masjid/events/{id}

Deletes an event 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 event id.

Returns

Deleted. No body.

204 · No response body.

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