Third-party apps
Donation campaigns
A masjid's default donation campaign, amounts in minor units.
Right on the key: Donation campaigns: read.
A masjid's donation campaign
GET/v1/masjids/{id}/donation-campaign
The masjid's default donation campaign, amounts in minor units. target and collected are absent when the masjid hides its collected amount. Values may be up to two minutes old.
Parameters
idstring · pathrequiredThe masjid id,
msj_…, as search, nearby or a previous read gave it.
Returns
The campaign.
objectdonation_campaignAlways
donation_campaign.masjidstringThe masjid id.
titlestringThe campaign title.
targetobjectoptionalThe goal. Absent when the masjid hides its collected amount, or sets no goal.
Show child attributes (2)
amountintegerThe amount, in the currency's minor unit.
currencystringISO 4217, lower case.
collectedobjectoptionalWhat the campaign collected, amounts the masjid records outside Masjidbox included. Absent when the masjid hides it.
Show child attributes (2)
amountintegerThe amount, in the currency's minor unit.
currencystringISO 4217, lower case.
endsAtstringoptionalWhen the campaign ends, an ISO instant. Absent for an open-ended campaign.
urlstringThe campaign page, where a donation is made.
curl "https://hub.masjidbox.com/v1/masjids/msj_abc123defg/donation-campaign" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"collected": {
"amount": 3120000,
"currency": "gbp"
},
"endsAt": "2026-12-31T23:59:59.000Z",
"target": {
"amount": 5000000,
"currency": "gbp"
},
"title": "Prayer hall extension",
"url": "https://masjidbox.com/one/donations/665f1c2e9b1e8a0012345678",
"masjid": "msj_abc123defg",
"object": "donation_campaign"
}