Docs / Reference · public.masjids.retrieve · generated from openapi.json

Retrieve a masjid

GET/v1/masjids/{id}

The canonical public representation of one masjid. Identify a masjid by its id, never by its coordinates: they are given with 4 to 7 decimals and may differ by less than a metre from one key to another.

Path parameters

Path parameters
NameTypeDescription
idstring · requiredThe masjid id, msj_…, as search, nearby or a previous read gave it.

Response

The masjid.

Response fields
FieldDescription
hasDonationCampaign

boolean

Whether GET /v1/masjids/{id}/donation-campaign answers a campaign. Changes when a campaign is enabled or disabled, never per donation.
id

string

The masjid id, msj_….
links

object

Outbound links: report always, the others absent when unknown.
links.claim

string · optional

Where the masjid claims or updates its page. Link the attribution to it ("Masjid data provided by Masjidbox").
links.donate

string · optional

The donation page. Absent when unknown.
links.report

string

Where 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: prayer is one of fajr, dhuhr, asr, maghrib, isha, jumua or other; kind is adhan or iqamah; day is the day the time is wrong, YYYY-MM-DD, from a week before the masjid's today to 30 days after.
links.website

string · optional

The masjid's own website. Absent when unknown.
location

object

Where the masjid is. Coordinates come as a pair or not at all.
location.address

string · optional

The postal address, one line.
location.city

string · optional

The city.
location.country

string · optional

ISO 3166-1 alpha-2, upper case.
location.latitude

number · optional

Latitude, decimal degrees. Given with 4 to 7 decimal places; the precision is not significant and may differ by less than a metre from one key to another. Identify a masjid by its id, never by its coordinates.
location.longitude

number · optional

Longitude, decimal degrees. Given with 4 to 7 decimal places; the precision is not significant and may differ by less than a metre from one key to another. Identify a masjid by its id, never by its coordinates.
name

string

The masjid name.
object

masjid

Always masjid.
timezone

string · optional

The masjid's IANA timezone, in which its prayer times are given.
curl
curl "https://hub.masjidbox.com/v1/masjids/msj_abc123defg" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · Masjid
{
  "hasDonationCampaign": true,
  "id": "msj_abc123defg",
  "links": {
    "claim": "https://app.masjidbox.com/register?claim=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"
}