Your masjid · Content
Your albums
Photo and video albums: a cover and your media, in order.
Right on the key: Content: read for a read, edit (secret key) for a write.
Your albums
GET/v1/masjid/albums
Your organization's photo and video albums, 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 albums.
objectlistAlways
list.dataobject[]The items of this page.
Show child attributes (14)
objectalbumAlways
album.idstringThe album id.
titlestringThe title.
coverobject | nullThe cover media.
cover.idstringThe media id.
cover.typestring | nullpicture,videoordocument.cover.urlstring | nullThe URL to show it from.
mediasobject[]The media of the album, in order.
medias[].idstringThe media id.
medias[].typestring | nullpicture,videoordocument.medias[].urlstring | nullThe URL to show it from.
enabledboolean | nullWhether the album is shown.
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/albums" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"data": [
{
"cover": {
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
},
"createdAt": "2026-11-12T08:00:00.000Z",
"enabled": true,
"id": "alb_6af5c9e2bc095fbd2dc57362",
"medias": [
{
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
}
],
"object": "album",
"title": "Eid 2026",
"updatedAt": "2026-11-12T08:00:00.000Z"
}
],
"object": "list",
"pagination": {
"hasMore": false,
"limit": 25,
"nextCursor": null
}
}One of your albums
GET/v1/masjid/albums/{id}
An album of your organization: its cover and its media, in order. Needs Content: read.
Parameters
idstring · pathrequiredThe album id.
Returns
The album.
objectalbumAlways
album.idstringThe album id.
titlestringThe title.
coverobject | nullThe cover media.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
mediasobject[]The media of the album, in order.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
enabledboolean | nullWhether the album is shown.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl "https://hub.masjidbox.com/v1/masjid/albums/alb_6af5c9e2bc095fbd2dc57362" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"cover": {
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
},
"createdAt": "2026-11-12T08:00:00.000Z",
"enabled": true,
"id": "alb_6af5c9e2bc095fbd2dc57362",
"medias": [
{
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
}
],
"object": "album",
"title": "Eid 2026",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Create an album
POST/v1/masjid/albums
Creates an album: a title, a cover and media of your organization (med_ ids, in order; upload them first). Any cover or medias entry that is not your organization's is a 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
coverstring | nullA media of your organization as the cover; null removes it.
mediasstring[]Media of your organization (
med_ids), in order: the list replaces the album's.enabledbooleanWhether the album is shown.
titlestringrequiredThe title.
Returns
The album, as stored.
objectalbumAlways
album.idstringThe album id.
titlestringThe title.
coverobject | nullThe cover media.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
mediasobject[]The media of the album, in order.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
enabledboolean | nullWhether the album is shown.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl -X POST "https://hub.masjidbox.com/v1/masjid/albums" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"medias":["med_6af5c9e2bc095fbd2dc5735f"],"title":"Eid 2026"}'{
"medias": [
"med_6af5c9e2bc095fbd2dc5735f"
],
"title": "Eid 2026"
}{
"cover": {
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
},
"createdAt": "2026-11-12T08:00:00.000Z",
"enabled": true,
"id": "alb_6af5c9e2bc095fbd2dc57362",
"medias": [
{
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
}
],
"object": "album",
"title": "Eid 2026",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Change an album
PATCH/v1/masjid/albums/{id}
JSON Merge Patch: a field you leave out stays, null clears it. medias replaces the album's list whole. A cover or a medias entry that is not your organization's is a 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 · pathrequiredThe album id.
Request body
coverstring | nullA media of your organization as the cover; null removes it.
mediasstring[]Media of your organization (
med_ids), in order: the list replaces the album's.enabledbooleanWhether the album is shown.
titlestringThe title.
Returns
The album after the change.
objectalbumAlways
album.idstringThe album id.
titlestringThe title.
coverobject | nullThe cover media.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
mediasobject[]The media of the album, in order.
Show child attributes (3)
idstringThe media id.
typestring | nullpicture,videoordocument.urlstring | nullThe URL to show it from.
enabledboolean | nullWhether the album is shown.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/albums/alb_6af5c9e2bc095fbd2dc57362" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled":false}'{
"enabled": false
}{
"cover": {
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
},
"createdAt": "2026-11-12T08:00:00.000Z",
"enabled": true,
"id": "alb_6af5c9e2bc095fbd2dc57362",
"medias": [
{
"id": "med_6af5c9e2bc095fbd2dc5735f",
"type": "picture",
"url": "https://cdn.masjidbox.com/content/pictures/a.webp"
}
],
"object": "album",
"title": "Eid 2026",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Delete an album
DELETE/v1/masjid/albums/{id}
Deletes an album. Its media stay in your library. 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 album id.
Returns
Deleted. No body.
204 · No response body.
Errors
curl -X DELETE "https://hub.masjidbox.com/v1/masjid/albums/alb_6af5c9e2bc095fbd2dc57362" \
-H "Authorization: Bearer $MASJIDBOX_KEY"