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
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 · queryItems per page, 1 to 100.
cursorstring · queryThe previous page's
pagination.nextCursor; absent for the first page.
Returns
A page of events.
objectlistAlways
list.dataobject[]The items of this page.
Show child attributes (22)
objecteventAlways
event.idstringThe event id.
titlestringThe title.
descriptionstring | nullThe description.
addressstring | nullWhere it takes place.
coordinatesobject | nullWhere it takes place, on a map.
coordinates.latitudenumberLatitude.
coordinates.longitudenumberLongitude.
datesobject | nullWhen it takes place, once.
dates.beginstring | nullWhen it begins (ISO-8601).
dates.endstring | nullWhen it ends (ISO-8601).
recurringobject | nullHow it recurs; null for a one-off event.
recurring.typedaily | weekly | monthlyThe period.
recurring.daysstring[]The weekdays, for a weekly event.
recurring.dayOfMonthnumber | nullThe day of the month, 1 to 31.
recurring.timestring | nullHH:MM, in your masjid's local time.
mediaobject | nullThe media it shows.
media.idstringThe media id.
media.typestring | nullpicture,videoordocument.media.urlstring | nullThe URL to show it from.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
paginationobjectWhere this page stands.
Show child attributes (3)
limitintegerThe page size asked for.
hasMorebooleanWhether another page follows: stop on false, never on a short page.
nextCursorstring | nullThe
cursorof the next page; null on the last one.
Errors
curl "https://hub.masjidbox.com/v1/masjid/events" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"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
GET/v1/masjid/events/{id}
An event of your organization, with the media it shows. Needs Content: read.
Parameters
idstring · pathrequiredThe event id.
Returns
The event.
objecteventAlways
event.idstringThe event id.
titlestringThe title.
descriptionstring | nullThe description.
addressstring | nullWhere it takes place.
coordinatesobject | nullWhere it takes place, on a map.
Show child attributes (2)
latitudenumberLatitude.
longitudenumberLongitude.
datesobject | nullWhen it takes place, once.
Show child attributes (2)
beginstring | nullWhen it begins (ISO-8601).
endstring | nullWhen it ends (ISO-8601).
recurringobject | nullHow it recurs; null for a one-off event.
Show child attributes (4)
typedaily | weekly | monthlyThe period.
daysstring[]The weekdays, for a weekly event.
dayOfMonthnumber | nullThe day of the month, 1 to 31.
timestring | nullHH:MM, in your masjid's local time.
mediaobject | nullThe media it shows.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl "https://hub.masjidbox.com/v1/masjid/events/evt_6af5c9e2bc095fbd2dc5735d" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"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
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 | nullThe description.
addressstring | nullWhere it takes place.
coordinatesobject | nullWhere it takes place, on a map; null clears it.
Show child attributes (2)
latitudenumberrequiredLatitude.
longitudenumberrequiredLongitude.
datesobject | nullWhen it takes place, once.
Show child attributes (2)
beginstring | nullWhen it begins (ISO-8601, with its offset).
endstring | nullWhen it ends (ISO-8601, with its offset).
mediastring | nullA media of your organization (upload it first); null removes it.
titlestringrequiredThe title.
recurringobject | nullHow it recurs.
Show child attributes (4)
typedaily | weekly | monthlyrequiredThe period.
daysstring[]The weekdays, for a weekly event.
dayOfMonthinteger | nullThe day of the month, for a monthly event.
timestring · HH:mm | nullHH:MM, in your masjid's local time.
Returns
The event, as stored.
objecteventAlways
event.idstringThe event id.
titlestringThe title.
descriptionstring | nullThe description.
addressstring | nullWhere it takes place.
coordinatesobject | nullWhere it takes place, on a map.
Show child attributes (2)
latitudenumberLatitude.
longitudenumberLongitude.
datesobject | nullWhen it takes place, once.
Show child attributes (2)
beginstring | nullWhen it begins (ISO-8601).
endstring | nullWhen it ends (ISO-8601).
recurringobject | nullHow it recurs; null for a one-off event.
Show child attributes (4)
typedaily | weekly | monthlyThe period.
daysstring[]The weekdays, for a weekly event.
dayOfMonthnumber | nullThe day of the month, 1 to 31.
timestring | nullHH:MM, in your masjid's local time.
mediaobject | nullThe media it shows.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
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"}'{
"dates": {
"begin": "2026-12-01T18:00:00.000Z"
},
"title": "Community Iftar"
}{
"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
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 · pathrequiredThe event id.
Request body
descriptionstring | nullThe description.
addressstring | nullWhere it takes place.
coordinatesobject | nullWhere it takes place, on a map; null clears it.
Show child attributes (2)
latitudenumberrequiredLatitude.
longitudenumberrequiredLongitude.
datesobject | nullWhen it takes place, once.
Show child attributes (2)
beginstring | nullWhen it begins (ISO-8601, with its offset).
endstring | nullWhen it ends (ISO-8601, with its offset).
mediastring | nullA media of your organization (upload it first); null removes it.
titlestringThe title.
recurringobject | nullMerged field by field; null makes the event one-off.
Show child attributes (4)
typedaily | weekly | monthlyThe period.
daysstring[]The weekdays, for a weekly event.
dayOfMonthinteger | nullThe day of the month, for a monthly event.
timestring · HH:mm | nullHH:MM, in your masjid's local time.
Returns
The event after the change.
objecteventAlways
event.idstringThe event id.
titlestringThe title.
descriptionstring | nullThe description.
addressstring | nullWhere it takes place.
coordinatesobject | nullWhere it takes place, on a map.
Show child attributes (2)
latitudenumberLatitude.
longitudenumberLongitude.
datesobject | nullWhen it takes place, once.
Show child attributes (2)
beginstring | nullWhen it begins (ISO-8601).
endstring | nullWhen it ends (ISO-8601).
recurringobject | nullHow it recurs; null for a one-off event.
Show child attributes (4)
typedaily | weekly | monthlyThe period.
daysstring[]The weekdays, for a weekly event.
dayOfMonthnumber | nullThe day of the month, 1 to 31.
timestring | nullHH:MM, in your masjid's local time.
mediaobject | nullThe media it shows.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
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"}}'{
"recurring": {
"time": "19:00"
}
}{
"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
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 · pathrequiredThe event id.
Returns
Deleted. No body.
204 · No response body.
Errors
curl -X DELETE "https://hub.masjidbox.com/v1/masjid/events/evt_6af5c9e2bc095fbd2dc5735d" \
-H "Authorization: Bearer $MASJIDBOX_KEY"