Docs / Reference · public.donationCampaigns.retrieve · generated from openapi.json
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. Cached two minutes at the edge.
Path parameters
| Name | Type | Description |
|---|---|---|
id | string · required | The masjid id, msj_…, as search, nearby or a previous read gave it. |
Response
The campaign.
| Field | Description |
|---|---|
objectdonation_campaign | Always donation_campaign. |
masjidstring | The masjid id. |
titlestring | The campaign title. |
targetobject · optional | The goal. Absent when the masjid hides its collected amount, or sets no goal. |
target.amountinteger | The amount, in the currency's minor unit. |
target.currencystring | ISO 4217, lower case. |
collectedobject · optional | What the campaign collected, amounts the masjid records outside Masjidbox included. Absent when the masjid hides it. |
collected.amountinteger | The amount, in the currency's minor unit. |
collected.currencystring | ISO 4217, lower case. |
endsAtstring · optional | When the campaign ends, an ISO instant. Absent for an open-ended campaign. |
urlstring | The 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"
}