Your masjid · Donation campaigns
Your donation campaigns
The campaigns your donors give to, each with what it collected. Change one, or close it with enabled: false: a campaign is never deleted.
Right on the key: Donation campaigns: read for a read, edit (secret key) for a write.
Your donation campaigns
GET/v1/masjid/donation-campaigns
Your organization's donation campaigns, each with what it collected, newest first, by cursor (limit 1 to 100, 25 by default; cursor from the previous page). Needs Donation campaigns: read.
Parameters
limitinteger · queryItems per page, 1 to 100.
cursorstring · queryThe previous page's
pagination.nextCursor; absent for the first page.
Returns
A page of campaigns.
objectlistAlways
list.dataobject[]The items of this page.
Show child attributes (33)
objectdonation_campaignAlways
donation_campaign.idstringThe campaign id.
titlestringIts title.
descriptionstring | nullShort description.
longDescriptionstring | nullLong description.
slugstring | nullWhere its page lives.
mediastring | nullThe media shown on it.
colorstring | nullBrand colour,
#rrggbb.targetnumber | nullIts target, in minor units of the currency (pence, cents).
externalnumber | nullCollected elsewhere and counted in, in minor units of the currency (pence, cents).
amountsnumber[]Suggested amounts, in minor units.
allowFreeInputbooleanThe donor may type an amount.
oneTimebooleanOne-off donations offered.
recurrentbooleanRecurring donations offered.
recurrentFrequenciesstring[]day,week,month,year.startDatestring | nullWhen it opens (ISO-8601).
endDatestring | nullWhen it closes (ISO-8601).
dayOfWeeknumber | nullWeekly collection day, 0 = Sunday.
dayOfMonthnumber | nullMonthly collection day.
recuFiscalbooleanFrench tax receipts issued.
giftAidbooleanUK Gift Aid offered.
coverFeesbooleanThe donor may cover the fees.
sponsoredbooleanA sponsored event (HMRC).
featuredbooleanFeatured on your pages.
hideCollectedAmountbooleanThe collected amount is hidden.
enabledbooleanEnabled.
activebooleanEnabled, started and not ended: it takes donations now.
currencystring | nullThe account's currency, ISO 4217.
donationsobjectWhat it collected.
donations.countnumberSucceeded donations.
donations.totalnumberCollected, in minor units, what was collected elsewhere included.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
paginationobjectWhere this page stands.
Show child attributes (3)
limitintegerThe page size asked for.
hasMorebooleanWhether another page follows: stop on false, never on a short page.
nextCursorstring | nullThe
cursorof the next page; null on the last one.
curl "https://hub.masjidbox.com/v1/masjid/donation-campaigns" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"data": [
{
"active": true,
"allowFreeInput": true,
"amounts": [
1000,
2500,
5000
],
"color": "#0a7d5c",
"coverFees": false,
"createdAt": "2026-11-12T08:00:00.000Z",
"currency": "GBP",
"dayOfMonth": null,
"dayOfWeek": null,
"description": "Feed a family this Ramadan",
"donations": {
"count": 12,
"total": 45000
},
"enabled": true,
"endDate": null,
"external": 0,
"featured": false,
"giftAid": true,
"hideCollectedAmount": false,
"id": "cmp_6af5c9e2bc095fbd2dc5735b",
"longDescription": null,
"media": "med_6af5c9e2bc095fbd2dc57360",
"object": "donation_campaign",
"oneTime": true,
"recuFiscal": false,
"recurrent": true,
"recurrentFrequencies": [
"month"
],
"slug": "ramadan-appeal",
"sponsored": false,
"startDate": "2026-11-12T08:00:00.000Z",
"target": 1000000,
"title": "Ramadan Appeal",
"updatedAt": "2026-11-12T08:00:00.000Z"
}
],
"object": "list",
"pagination": {
"hasMore": false,
"limit": 25,
"nextCursor": null
}
}One of your donation campaigns
GET/v1/masjid/donation-campaigns/{id}
A donation campaign of your organization, with what it collected. Needs Donation campaigns: read.
Parameters
idstring · pathrequiredThe campaign id.
Returns
The campaign.
objectdonation_campaignAlways
donation_campaign.idstringThe campaign id.
titlestringIts title.
descriptionstring | nullShort description.
longDescriptionstring | nullLong description.
slugstring | nullWhere its page lives.
mediastring | nullThe media shown on it.
colorstring | nullBrand colour,
#rrggbb.targetnumber | nullIts target, in minor units of the currency (pence, cents).
externalnumber | nullCollected elsewhere and counted in, in minor units of the currency (pence, cents).
amountsnumber[]Suggested amounts, in minor units.
allowFreeInputbooleanThe donor may type an amount.
oneTimebooleanOne-off donations offered.
recurrentbooleanRecurring donations offered.
recurrentFrequenciesstring[]day,week,month,year.startDatestring | nullWhen it opens (ISO-8601).
endDatestring | nullWhen it closes (ISO-8601).
dayOfWeeknumber | nullWeekly collection day, 0 = Sunday.
dayOfMonthnumber | nullMonthly collection day.
recuFiscalbooleanFrench tax receipts issued.
giftAidbooleanUK Gift Aid offered.
coverFeesbooleanThe donor may cover the fees.
sponsoredbooleanA sponsored event (HMRC).
featuredbooleanFeatured on your pages.
hideCollectedAmountbooleanThe collected amount is hidden.
enabledbooleanEnabled.
activebooleanEnabled, started and not ended: it takes donations now.
currencystring | nullThe account's currency, ISO 4217.
donationsobjectWhat it collected.
Show child attributes (2)
countnumberSucceeded donations.
totalnumberCollected, in minor units, what was collected elsewhere included.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl "https://hub.masjidbox.com/v1/masjid/donation-campaigns/cmp_6af5c9e2bc095fbd2dc5735b" \
-H "Authorization: Bearer $MASJIDBOX_KEY"{
"active": true,
"allowFreeInput": true,
"amounts": [
1000,
2500,
5000
],
"color": "#0a7d5c",
"coverFees": false,
"createdAt": "2026-11-12T08:00:00.000Z",
"currency": "GBP",
"dayOfMonth": null,
"dayOfWeek": null,
"description": "Feed a family this Ramadan",
"donations": {
"count": 12,
"total": 45000
},
"enabled": true,
"endDate": null,
"external": 0,
"featured": false,
"giftAid": true,
"hideCollectedAmount": false,
"id": "cmp_6af5c9e2bc095fbd2dc5735b",
"longDescription": null,
"media": "med_6af5c9e2bc095fbd2dc57360",
"object": "donation_campaign",
"oneTime": true,
"recuFiscal": false,
"recurrent": true,
"recurrentFrequencies": [
"month"
],
"slug": "ramadan-appeal",
"sponsored": false,
"startDate": "2026-11-12T08:00:00.000Z",
"target": 1000000,
"title": "Ramadan Appeal",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Create a donation campaign
POST/v1/masjid/donation-campaigns
Creates a campaign as the dashboard does: enabled, its page under the first free slug of its title, your default campaign if it is your first. Its dates (startDate, endDate, with their offset) are set here, once. A media must be one of your organization's (med_ id), else 400. Needs a secret key with Donation campaigns: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.
Parameters
No parameters.
Request body
titlestringrequiredIts title.
descriptionstringShort description.
longDescriptionstringLong description.
mediastring | nullOne of your media (
med_); null removes it.colorstringBrand colour,
#rrggbb.targetintegerTarget, in minor units.
externalintegerCollected elsewhere, in minor units.
amountsinteger[]Suggested amounts, in minor units, up to 10.
allowFreeInputbooleanThe donor may type an amount.
oneTimebooleanOne-off donations offered.
recurrentbooleanRecurring donations offered.
recurrentFrequenciesstring[]Recurrence units offered.
dayOfWeekinteger | nullWeekly collection day, 0 = Sunday.
dayOfMonthinteger | nullMonthly collection day.
recuFiscalbooleanFrench tax receipts issued.
giftAidbooleanUK Gift Aid offered.
coverFeesbooleanThe donor may cover the fees.
sponsoredbooleanA sponsored event (HMRC).
featuredbooleanFeatured on your pages.
hideCollectedAmountbooleanThe collected amount is hidden.
startDatestringWhen it opens, with its offset; set once, here.
endDatestringWhen it closes, with its offset; set once, here.
Returns
The campaign, as stored.
objectdonation_campaignAlways
donation_campaign.idstringThe campaign id.
titlestringIts title.
descriptionstring | nullShort description.
longDescriptionstring | nullLong description.
slugstring | nullWhere its page lives.
mediastring | nullThe media shown on it.
colorstring | nullBrand colour,
#rrggbb.targetnumber | nullIts target, in minor units of the currency (pence, cents).
externalnumber | nullCollected elsewhere and counted in, in minor units of the currency (pence, cents).
amountsnumber[]Suggested amounts, in minor units.
allowFreeInputbooleanThe donor may type an amount.
oneTimebooleanOne-off donations offered.
recurrentbooleanRecurring donations offered.
recurrentFrequenciesstring[]day,week,month,year.startDatestring | nullWhen it opens (ISO-8601).
endDatestring | nullWhen it closes (ISO-8601).
dayOfWeeknumber | nullWeekly collection day, 0 = Sunday.
dayOfMonthnumber | nullMonthly collection day.
recuFiscalbooleanFrench tax receipts issued.
giftAidbooleanUK Gift Aid offered.
coverFeesbooleanThe donor may cover the fees.
sponsoredbooleanA sponsored event (HMRC).
featuredbooleanFeatured on your pages.
hideCollectedAmountbooleanThe collected amount is hidden.
enabledbooleanEnabled.
activebooleanEnabled, started and not ended: it takes donations now.
currencystring | nullThe account's currency, ISO 4217.
donationsobjectWhat it collected.
Show child attributes (2)
countnumberSucceeded donations.
totalnumberCollected, in minor units, what was collected elsewhere included.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
Errors
curl -X POST "https://hub.masjidbox.com/v1/masjid/donation-campaigns" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"amounts":[1000,2500],"startDate":"2026-11-12T08:00:00.000Z","title":"Ramadan Appeal"}'{
"amounts": [
1000,
2500
],
"startDate": "2026-11-12T08:00:00.000Z",
"title": "Ramadan Appeal"
}{
"active": true,
"allowFreeInput": true,
"amounts": [
1000,
2500,
5000
],
"color": "#0a7d5c",
"coverFees": false,
"createdAt": "2026-11-12T08:00:00.000Z",
"currency": "GBP",
"dayOfMonth": null,
"dayOfWeek": null,
"description": "Feed a family this Ramadan",
"donations": {
"count": 12,
"total": 45000
},
"enabled": true,
"endDate": null,
"external": 0,
"featured": false,
"giftAid": true,
"hideCollectedAmount": false,
"id": "cmp_6af5c9e2bc095fbd2dc5735b",
"longDescription": null,
"media": "med_6af5c9e2bc095fbd2dc57360",
"object": "donation_campaign",
"oneTime": true,
"recuFiscal": false,
"recurrent": true,
"recurrentFrequencies": [
"month"
],
"slug": "ramadan-appeal",
"sponsored": false,
"startDate": "2026-11-12T08:00:00.000Z",
"target": 1000000,
"title": "Ramadan Appeal",
"updatedAt": "2026-11-12T08:00:00.000Z"
}Change a donation campaign
PATCH/v1/masjid/donation-campaigns/{id}
A merge: a field you leave out stays. Its dates never change here. A change that would cancel running recurring donations (enabled: false or recurrent: false while one runs) is a 409; there is no delete — close it with enabled: false. A new media must be one of your organization's (med_ id), else 400. Needs a secret key with Donation campaigns: edit. Counts against the write quota: 30 writes an hour and 300 a day per organization.
Parameters
idstring · pathrequiredThe campaign id.
Request body
titlestringIts title.
descriptionstringShort description.
longDescriptionstringLong description.
mediastring | nullOne of your media (
med_); null removes it.colorstringBrand colour,
#rrggbb.targetintegerTarget, in minor units.
externalintegerCollected elsewhere, in minor units.
amountsinteger[]Suggested amounts, in minor units, up to 10.
allowFreeInputbooleanThe donor may type an amount.
oneTimebooleanOne-off donations offered.
recurrentbooleanRecurring donations offered.
recurrentFrequenciesstring[]Recurrence units offered.
dayOfWeekinteger | nullWeekly collection day, 0 = Sunday.
dayOfMonthinteger | nullMonthly collection day.
recuFiscalbooleanFrench tax receipts issued.
giftAidbooleanUK Gift Aid offered.
coverFeesbooleanThe donor may cover the fees.
sponsoredbooleanA sponsored event (HMRC).
featuredbooleanFeatured on your pages.
hideCollectedAmountbooleanThe collected amount is hidden.
enabledbooleanfalsecloses it; refused (409) while recurring donations run on it.
Returns
The campaign after the change.
objectdonation_campaignAlways
donation_campaign.idstringThe campaign id.
titlestringIts title.
descriptionstring | nullShort description.
longDescriptionstring | nullLong description.
slugstring | nullWhere its page lives.
mediastring | nullThe media shown on it.
colorstring | nullBrand colour,
#rrggbb.targetnumber | nullIts target, in minor units of the currency (pence, cents).
externalnumber | nullCollected elsewhere and counted in, in minor units of the currency (pence, cents).
amountsnumber[]Suggested amounts, in minor units.
allowFreeInputbooleanThe donor may type an amount.
oneTimebooleanOne-off donations offered.
recurrentbooleanRecurring donations offered.
recurrentFrequenciesstring[]day,week,month,year.startDatestring | nullWhen it opens (ISO-8601).
endDatestring | nullWhen it closes (ISO-8601).
dayOfWeeknumber | nullWeekly collection day, 0 = Sunday.
dayOfMonthnumber | nullMonthly collection day.
recuFiscalbooleanFrench tax receipts issued.
giftAidbooleanUK Gift Aid offered.
coverFeesbooleanThe donor may cover the fees.
sponsoredbooleanA sponsored event (HMRC).
featuredbooleanFeatured on your pages.
hideCollectedAmountbooleanThe collected amount is hidden.
enabledbooleanEnabled.
activebooleanEnabled, started and not ended: it takes donations now.
currencystring | nullThe account's currency, ISO 4217.
donationsobjectWhat it collected.
Show child attributes (2)
countnumberSucceeded donations.
totalnumberCollected, in minor units, what was collected elsewhere included.
createdAtstring | nullWhen it was created (ISO-8601).
updatedAtstring | nullWhen it last changed (ISO-8601).
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/donation-campaigns/cmp_6af5c9e2bc095fbd2dc5735b" \
-H "Authorization: Bearer $MASJIDBOX_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Ramadan Appeal 1448"}'{
"title": "Ramadan Appeal 1448"
}{
"active": true,
"allowFreeInput": true,
"amounts": [
1000,
2500,
5000
],
"color": "#0a7d5c",
"coverFees": false,
"createdAt": "2026-11-12T08:00:00.000Z",
"currency": "GBP",
"dayOfMonth": null,
"dayOfWeek": null,
"description": "Feed a family this Ramadan",
"donations": {
"count": 12,
"total": 45000
},
"enabled": true,
"endDate": null,
"external": 0,
"featured": false,
"giftAid": true,
"hideCollectedAmount": false,
"id": "cmp_6af5c9e2bc095fbd2dc5735b",
"longDescription": null,
"media": "med_6af5c9e2bc095fbd2dc57360",
"object": "donation_campaign",
"oneTime": true,
"recuFiscal": false,
"recurrent": true,
"recurrentFrequencies": [
"month"
],
"slug": "ramadan-appeal",
"sponsored": false,
"startDate": "2026-11-12T08:00:00.000Z",
"target": 1000000,
"title": "Ramadan Appeal",
"updatedAt": "2026-11-12T08:00:00.000Z"
}