Third-party apps
Masjids
The canonical public representation of one masjid. Find one by name or around a point, then read it by its id.
Right on the key: Masjid profile: read.
Retrieve a masjid
GET/v1/masjids/{id}
The canonical public representation of one masjid. Identify a masjid by its id, never by its coordinates.
Parameters
idstring · pathrequiredThe masjid id,
msj_…, as search, nearby or a previous read gave it.
Returns
The masjid.
hasDonationCampaignbooleanWhether
GET /v1/masjids/{id}/donation-campaignanswers a campaign. Changes when a campaign is enabled or disabled, never per donation.idstringThe masjid id,
msj_….linksobjectOutbound links:
reportalways, the others absent when unknown.Show child attributes (4)
claimstringoptionalWhere the masjid claims or updates its page. Link the attribution to it ("Masjid data provided by Masjidbox").
donatestringoptionalThe donation page. Absent when unknown.
reportstringWhere a user reports an error in this masjid's times. Always present: the page takes the report, or invites the masjid to claim its page when nobody manages it yet. Link a "Report an error" next to the attribution. To preselect the form, append any of
?prayer=&kind=&day=to the link:prayeris one offajr,dhuhr,asr,maghrib,isha,jumuahorother;kindisathanoriqamah;dayis the day the time is wrong,YYYY-MM-DD, from a week before the masjid's today to 30 days after.websitestringoptionalThe masjid's own website. Absent when unknown.
locationobjectWhere the masjid is. Coordinates come as a pair or not at all.
Show child attributes (5)
addressstringoptionalThe postal address, one line.
citystringoptionalThe city.
countrystringoptionalISO 3166-1 alpha-2, upper case.
latitudenumberoptionalLatitude, WGS 84 decimal degrees. Identify a masjid by its
id, never by its coordinates.longitudenumberoptionalLongitude, WGS 84 decimal degrees. Identify a masjid by its
id, never by its coordinates.
namestringThe masjid name.
objectmasjidAlways
masjid.timezonestringoptionalThe masjid's IANA timezone, in which its prayer times are given.
curl "https://hub.masjidbox.com/v1/masjids/msj_abc123defg" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"hasDonationCampaign": true,
"id": "msj_abc123defg",
"links": {
"claim": "https://dashboard.masjidbox.com/hub/claim/msj_abc123defg",
"donate": "https://masjidbox.com/donate/abc123defg",
"report": "https://hub.masjidbox.com/report/msj_abc123defg",
"website": "https://www.eastlondonmosque.org.uk"
},
"location": {
"address": "82-92 Whitechapel Rd, London E1 1JQ",
"city": "London",
"country": "GB",
"latitude": 51.5173,
"longitude": -0.0652
},
"name": "East London Mosque",
"object": "masjid",
"timezone": "Europe/London"
}Search masjids by name
GET/v1/masjids/search
Finds masjids matching q, best first. Not pageable.
Parameters
qstring · queryrequiredWhat to look for: a masjid name, 1 to 200 characters.
Returns
The masjids found.
objectlistAlways
list.dataobject[]The masjids found, best first.
Show child attributes (16)
hasDonationCampaignbooleanWhether
GET /v1/masjids/{id}/donation-campaignanswers a campaign. Changes when a campaign is enabled or disabled, never per donation.idstringThe masjid id,
msj_….linksobjectOutbound links:
reportalways, the others absent when unknown.links.claimstringoptionalWhere the masjid claims or updates its page. Link the attribution to it ("Masjid data provided by Masjidbox").
links.donatestringoptionalThe donation page. Absent when unknown.
links.reportstringWhere a user reports an error in this masjid's times. Always present: the page takes the report, or invites the masjid to claim its page when nobody manages it yet. Link a "Report an error" next to the attribution. To preselect the form, append any of
?prayer=&kind=&day=to the link:prayeris one offajr,dhuhr,asr,maghrib,isha,jumuahorother;kindisathanoriqamah;dayis the day the time is wrong,YYYY-MM-DD, from a week before the masjid's today to 30 days after.links.websitestringoptionalThe masjid's own website. Absent when unknown.
locationobjectWhere the masjid is. Coordinates come as a pair or not at all.
location.addressstringoptionalThe postal address, one line.
location.citystringoptionalThe city.
location.countrystringoptionalISO 3166-1 alpha-2, upper case.
location.latitudenumberoptionalLatitude, WGS 84 decimal degrees. Identify a masjid by its
id, never by its coordinates.location.longitudenumberoptionalLongitude, WGS 84 decimal degrees. Identify a masjid by its
id, never by its coordinates.namestringThe masjid name.
objectmasjidAlways
masjid.timezonestringoptionalThe masjid's IANA timezone, in which its prayer times are given.
Errors
curl "https://hub.masjidbox.com/v1/masjids/search?q=East%20London%20Mosque" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"data": [
{
"hasDonationCampaign": true,
"id": "msj_abc123defg",
"links": {
"claim": "https://dashboard.masjidbox.com/hub/claim/msj_abc123defg",
"donate": "https://masjidbox.com/donate/abc123defg",
"report": "https://hub.masjidbox.com/report/msj_abc123defg",
"website": "https://www.eastlondonmosque.org.uk"
},
"location": {
"address": "82-92 Whitechapel Rd, London E1 1JQ",
"city": "London",
"country": "GB",
"latitude": 51.5173,
"longitude": -0.0652
},
"name": "East London Mosque",
"object": "masjid",
"timezone": "Europe/London"
}
],
"object": "list"
}Find masjids near a point
GET/v1/masjids/nearby
The masjids around a point, nearest first, each with its distance. Not pageable.
Parameters
latnumber · queryrequiredLatitude of the point, decimal degrees within ±90.
lonnumber · queryrequiredLongitude of the point, decimal degrees within ±180.
Returns
The masjids near the point.
objectlistAlways
list.dataobject[]The masjids near the point, nearest first.
Show child attributes (17)
hasDonationCampaignbooleanWhether
GET /v1/masjids/{id}/donation-campaignanswers a campaign. Changes when a campaign is enabled or disabled, never per donation.idstringThe masjid id,
msj_….linksobjectOutbound links:
reportalways, the others absent when unknown.links.claimstringoptionalWhere the masjid claims or updates its page. Link the attribution to it ("Masjid data provided by Masjidbox").
links.donatestringoptionalThe donation page. Absent when unknown.
links.reportstringWhere a user reports an error in this masjid's times. Always present: the page takes the report, or invites the masjid to claim its page when nobody manages it yet. Link a "Report an error" next to the attribution. To preselect the form, append any of
?prayer=&kind=&day=to the link:prayeris one offajr,dhuhr,asr,maghrib,isha,jumuahorother;kindisathanoriqamah;dayis the day the time is wrong,YYYY-MM-DD, from a week before the masjid's today to 30 days after.links.websitestringoptionalThe masjid's own website. Absent when unknown.
locationobjectWhere the masjid is. Coordinates come as a pair or not at all.
location.addressstringoptionalThe postal address, one line.
location.citystringoptionalThe city.
location.countrystringoptionalISO 3166-1 alpha-2, upper case.
location.latitudenumberoptionalLatitude, WGS 84 decimal degrees. Identify a masjid by its
id, never by its coordinates.location.longitudenumberoptionalLongitude, WGS 84 decimal degrees. Identify a masjid by its
id, never by its coordinates.namestringThe masjid name.
objectmasjidAlways
masjid.timezonestringoptionalThe masjid's IANA timezone, in which its prayer times are given.
distanceKmnumberDistance from the point asked, in kilometres.
curl "https://hub.masjidbox.com/v1/masjids/nearby?lat=51.5173&lon=-0.0652" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"data": [
{
"hasDonationCampaign": true,
"id": "msj_abc123defg",
"links": {
"claim": "https://dashboard.masjidbox.com/hub/claim/msj_abc123defg",
"donate": "https://masjidbox.com/donate/abc123defg",
"report": "https://hub.masjidbox.com/report/msj_abc123defg",
"website": "https://www.eastlondonmosque.org.uk"
},
"location": {
"address": "82-92 Whitechapel Rd, London E1 1JQ",
"city": "London",
"country": "GB",
"latitude": 51.5173,
"longitude": -0.0652
},
"name": "East London Mosque",
"object": "masjid",
"timezone": "Europe/London",
"distanceKm": 0.8
}
],
"object": "list"
}