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

Developer key

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 · pathrequired

    The masjid id, msj_…, as search, nearby or a previous read gave it.

Returns

The campaign.

  • objectdonation_campaign

    Always donation_campaign.

  • masjidstring

    The masjid id.

  • titlestring

    The campaign title.

  • targetobjectoptional

    The goal. Absent when the masjid hides its collected amount, or sets no goal.

    Show child attributes (2)
    • amountinteger

      The amount, in the currency's minor unit.

    • currencystring

      ISO 4217, lower case.

  • collectedobjectoptional

    What the campaign collected, amounts the masjid records outside Masjidbox included. Absent when the masjid hides it.

    Show child attributes (2)
    • amountinteger

      The amount, in the currency's minor unit.

    • currencystring

      ISO 4217, lower case.

  • endsAtstringoptional

    When the campaign ends, an ISO instant. Absent for an open-ended campaign.

  • urlstring

    The campaign page, where a donation is made.

GET /v1/masjids/{id}/donation-campaign
curl "https://hub.masjidbox.com/v1/masjids/msj_abc123defg/donation-campaign" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · DonationCampaign
{
  "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"
}