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

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

Response

The campaign.

Response fields
FieldDescription
object

donation_campaign

Always donation_campaign.
masjid

string

The masjid id.
title

string

The campaign title.
target

object · optional

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

integer

The amount, in the currency's minor unit.
target.currency

string

ISO 4217, lower case.
collected

object · optional

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

integer

The amount, in the currency's minor unit.
collected.currency

string

ISO 4217, lower case.
endsAt

string · optional

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

string

The campaign page, where a donation is made.
curl
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"
}