Docs / Get started

Changelog

Changes to the API, newest first. A new field or a new operation can land at any time; a change that breaks clients says so in its title.

  • Credited links. links.report and links.claim are now credited to the calling project. Their URL ends with your project's reference, which does not expire: what your users send through them counts in your contributions. Nothing to change on your side; keep the URLs as received.
  • Partners page. A new public partners page lists the apps Masjidbox features, with one total of contributions for all partner apps together. Opt in from your partner profile in the console: add a website, then tick Public.

2 December 2026 — donation analysis

  • Donors. GET /v1/masjid/donors lists your donors, one per email, from their succeeded donations: what each gave over a window (from, to) and ever, their first and latest gift, how their recurring donations stand (recurring), and, with from, whether they are new, returning or lapsed (segment). Sort by total or lastGift; filter by segment and recurring. In @masjidbox/sdk/masjid: masjid.donors.list(). It needs a secret key with Donations: read.
  • Donation filters. GET /v1/masjid/donations takes from and to (the payment date), campaign (cmp_…), status (comma-separated) and amountMin / amountMax (minor units), all combined, with the same cursor.
  • Donation figures. GET /v1/masjid/stats/donations adds byFrequency: the payments of recurring donations per frequency (day, week, month, year), each with its monthly value. The other fields are unchanged.

28 November 2026 — publishable keys on websites

A website can call /v1 from its visitors' browsers with a publishable key, from the origins the key lists. See From a browser.

  • Allowed origins. In the console, a publishable key lists up to 10 origins (https://www.example.org; http://localhost for development, any port). A key with none is an app key: calls without an Origin header work as before, browser calls are refused.
  • CORS. The API answers a browser's preflight on /v1, and serves a publishable key's answer, readable by the page, only to an origin the key lists.
  • One new refusal. A browser call from another origin is a 403 ORIGIN_NOT_ALLOWED. It does not count against the key's rate limit.
  • Secret keys. A secret key's answer is never readable by a page. A browser call with one will become a 403 SECRET_KEY_IN_BROWSER: a later entry here will give the date.

28 November 2026 — Idempotency-Key on notification sends

POST /v1/masjid/notifications takes an Idempotency-Key header: a UUID you mint for each notification and keep for its retries. A push cannot be taken back, so a retry must not send it twice.

  • Retry safely. A retry with the same key and the same body answers 201 with the notification the first send made, and sends nothing. It answers even once your write quota is spent, and counts no write.
  • Two new refusals. The same key with another body is a 409 IDEMPOTENCY_KEY_REUSED. A retry while the first send has no answer yet is a 409 IDEMPOTENCY_REQUEST_UNSETTLED: that notification may already have been sent, so never resend it under a new key.
  • Keys are kept 24 hours, per organization.
  • Optional for now, required later. Without the header, a send behaves as before. The header will become required: a later entry here will give the date. Start sending it now.
  • SDK. @masjidbox/sdk/masjid will mint the key and retry a failed send once the header is required; until then it does not retry a send.

26 November 2026 — one masjid per key, named once (breaking)

A masjid key manages one masjid: yours. The masjid API stops answering it as a list. This change breaks clients and lands inside V1: the removed fields keep no alias.

  • Your masjid's id. GET and PATCH /v1/masjid answer id, your masjid's public id (msj_…, the one GET /v1/masjids/{id} reads), in place of masjids. It is null while your masjid is not in the Masjidbox directory yet, and, after a PATCH, when the directory could not give a valid id: the change is saved all the same.
  • No more masjids and affectedMasjids. The prayer times, iqamah times, jumu'ah services, athan, iqamah, special times, timetables and profile no longer carry masjids, and their writes no longer carry affectedMasjids: a write answers the resource as a read does.
  • Notifications. POST /v1/masjid/notifications no longer takes masjid, which is now refused (400): the notification goes to your masjid. A notification no longer carries masjid.
  • One statistics. GET /v1/masjid/stats/one answers stats as one object, your masjid's figures, without masjid, in place of a list of lines and masjids. It is null only while your masjid is not in the Masjidbox directory yet.
  • SDK. In @masjidbox/sdk/masjid, the …Updated types (MasjidJumuahTimesUpdated, MasjidAthanUpdated, MasjidIqamahUpdated, MasjidSpecialTimesUpdated, MasjidTimetableUpdated, MasjidProfileUpdated, MasjidOrganizationUpdated) are gone: a write returns the same type as its read.

26 November 2026 — the athan and iqamah source becomes explicit (breaking)

Where a masjid's times come from, computed or a full-year timetable, is now a field you read and set, instead of a side effect of other writes. This change breaks clients and lands inside V1: the removed routes keep no alias.

  • Masjid API, athan. GET and PATCH /v1/masjid/athan replace /v1/masjid/calculation-method and /v1/masjid/athan-rules. The answer, whose object is athan, carries source (calculation or timetable), calculation (the former calculation method, without active and updatedAt) and rules (the former athan rules, without updatedAt). A PATCH merges calculation and rules as before, and changes source only when you send it.
  • Masjid API, iqamah. GET and PATCH /v1/masjid/iqamah replace /v1/masjid/iqamah-rules. The answer, whose object is iqamah, carries source (rules or timetable) and rules (the former iqamah rules, without active and updatedAt).
  • Switching to a timetable. "source": "timetable" needs a timetable of the current year: without one the write answers 409 (RESOURCE_CONFLICT) and changes nothing. Put it first with PUT /v1/masjid/timetables/{kind}/{year}.
  • Masjid API, timetables. PUT /v1/masjid/timetables/{kind}/{year} no longer makes the timetable the source of your times: a current-year timetable your times do not come from stays inactive until you switch. Changing the calculation or the rules no longer switches back to them either.
  • SDK. In @masjidbox/sdk/masjid, masjid.calculationMethod, masjid.athanRules and masjid.iqamahRules become masjid.athan.retrieve() / update() and masjid.iqamah.retrieve() / update().

26 November 2026 — Gift Aid

  • Gift Aid declarations. GET /v1/masjid/gift-aid-declarations lists your donors' UK Gift Aid declarations by last change, with the details HMRC reads, where HMRC is with each one and the claim it went into; GET /v1/masjid/gift-aid-declarations/{id} reads one (gad_…). In @masjidbox/sdk/masjid: masjid.giftAidDeclarations.list() and retrieve().
  • Gift Aid claims. GET /v1/masjid/gift-aid-claims lists the claims your organization sent, or will send, to HMRC, with their counts and amounts; GET /v1/masjid/gift-aid-claims/{id} reads one (gac_…). In @masjidbox/sdk/masjid: masjid.giftAidClaims.list() and retrieve().
  • Both need a secret key with Donations: read.

25 November 2026 — adhan becomes athan (breaking)

Every adhan of the API is now spelled athan, on the public API (/v1/masjids/*) and on the masjid API (/v1/masjid/*) alike. This change breaks clients and lands inside V1: no alias is kept, so a client that reads adhan gets nothing from 25 November 2026. Rename these, field by field:

  • Public API, prayer times. prayers.<prayer>.adhan becomes prayers.<prayer>.athan in GET /v1/masjids/{id}/prayer-times, in each day of /prayer-times/weekly and /prayer-times/monthly (data[].prayers.<prayer>.athan), for fajr, dhuhr, asr, maghrib and isha.
  • Public API, report link. The kind you append to links.report takes athan or iqamah; kind=adhan is ignored and the form opens as without it. See Attribution.
  • Masjid API, prayer times. GET /v1/masjid/prayer-times: prayers.<prayer>.adhan becomes prayers.<prayer>.athan.
  • Masjid API, athan rules. GET and PATCH /v1/masjid/adhan-rules become /v1/masjid/athan-rules, whose object is athan_rules (was adhan_rules). In @masjidbox/sdk/masjid, masjid.adhanRules.retrieve() and update() become masjid.athanRules.retrieve() and update().
  • Masjid API, iqamah rules. A rule { "minutesAfterAdhan": 20 } becomes { "minutesAfterAthan": 20 }, read and written, in /v1/masjid/iqamah-rules.
  • Masjid API, special times. A relative time's to takes athan or iqamah (was adhan), read and written, in /v1/masjid/special-times.
  • Masjid API, timetables. The kind of /v1/masjid/timetables/{kind}/{year} and of a timetable's body is athan or iqamah: /v1/masjid/timetables/adhan/2027 becomes /v1/masjid/timetables/athan/2027, and the old path answers 400.

13 November 2026 — hosted pages

  • Hosted pages. The add a masjid page (surface=suggest) suggests addresses as the user types and lets them search the country; picking an address fills the country in. Your project's approved logo now shows on the hosted pages served from dashboard.masjidbox.com, where the browser used to block it. No change to the API.
  • Referral links, published. GET /v1/referrals/link is now in the API reference: it gives the credited links to the three hosted pages, add a missing masjid (surface=suggest), claim a masjid and report an error (claim and report, with the masjid). See Contributions.
  • Contribution totals. GET /v1/contributions/totals answers what came through your project, counted per month and per type. It replaces the per-contribution route, GET /v1/contributions/{id}.

18 October 2026 — the API opens

Masjid retrieval, search and nearby, prayer times for today, the week and the month, jumu'ah services and donation campaigns.