Your masjid · Prayer times

Your athan rules

Rules on top of the computed athan times: a fixed time for a prayer, or a window it must stay in.

Right on the key: Prayer times: read for a read, edit (secret key) for a write.

Your athan rules

Masjid key · Prayer times: read

GET/v1/masjid/athan-rules

The rules applied on top of the computed athan times, per prayer: a fixed time (equal), or a window (min, max) as HH:MM or minutes from another prayer (maghrib+90).

Parameters

No parameters.

Returns

The athan rules.

  • objectathan_rules

    Always athan_rules.

  • masjidsstring[]

    The organization's masjids: they share one timetable, so this setting is each of theirs.

  • fajrobject | null

    The fajr rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The fajr athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The fajr athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The fajr athan never after this: HH:MM, or <prayer>±minutes.

  • sunriseobject | null

    The sunrise rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The sunrise athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The sunrise athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The sunrise athan never after this: HH:MM, or <prayer>±minutes.

  • dhuhrobject | null

    The dhuhr rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The dhuhr athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The dhuhr athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The dhuhr athan never after this: HH:MM, or <prayer>±minutes.

  • asrobject | null

    The asr rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The asr athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The asr athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The asr athan never after this: HH:MM, or <prayer>±minutes.

  • maghribobject | null

    The maghrib rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The maghrib athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The maghrib athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The maghrib athan never after this: HH:MM, or <prayer>±minutes.

  • ishaobject | null

    The isha rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The isha athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The isha athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The isha athan never after this: HH:MM, or <prayer>±minutes.

  • updatedAtstring | null

    When it last changed; null before it was ever set.

GET /v1/masjid/athan-rules
curl "https://hub.masjidbox.com/v1/masjid/athan-rules" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidAthanRules
{
  "masjids": [
    "msj_o5urjd3hd5",
    "msj_k2w8x1p0aa"
  ],
  "object": "athan_rules",
  "asr": null,
  "dhuhr": {
    "equal": "13:30",
    "max": null,
    "min": null
  },
  "fajr": null,
  "isha": {
    "equal": null,
    "max": null,
    "min": "maghrib+90"
  },
  "maghrib": null,
  "sunrise": null,
  "updatedAt": "2026-11-12T08:02:11.000Z"
}

Change your athan rules

Masjid key · secret · Prayer times: edit

PATCH/v1/masjid/athan-rules

JSON Merge Patch per prayer: a prayer you send merges with its rules, null removes all of them, a prayer you leave out stays. An empty body changes nothing. Every masjid of your organization gets the change, listed in affectedMasjids. Needs a secret key with Prayer times: edit. 30 writes an hour and 300 a day per organization.

Parameters

No parameters.

Request body

  • fajrobject | null

    Replaces the fajr rule: one of equal, min and max, exactly; null removes it.

    Show child attributes (3)
    • equalstring · HH:mm | null

      The fajr athan at this time, HH:MM; null removes it.

    • minstring | null

      The fajr athan never before this, HH:MM or <prayer>±minutes; null removes it.

    • maxstring | null

      The fajr athan never after this, HH:MM or <prayer>±minutes; null removes it.

  • sunriseobject | null

    Replaces the sunrise rule: one of equal, min and max, exactly; null removes it.

    Show child attributes (3)
    • equalstring · HH:mm | null

      The sunrise athan at this time, HH:MM; null removes it.

    • minstring | null

      The sunrise athan never before this, HH:MM or <prayer>±minutes; null removes it.

    • maxstring | null

      The sunrise athan never after this, HH:MM or <prayer>±minutes; null removes it.

  • dhuhrobject | null

    Replaces the dhuhr rule: one of equal, min and max, exactly; null removes it.

    Show child attributes (3)
    • equalstring · HH:mm | null

      The dhuhr athan at this time, HH:MM; null removes it.

    • minstring | null

      The dhuhr athan never before this, HH:MM or <prayer>±minutes; null removes it.

    • maxstring | null

      The dhuhr athan never after this, HH:MM or <prayer>±minutes; null removes it.

  • asrobject | null

    Replaces the asr rule: one of equal, min and max, exactly; null removes it.

    Show child attributes (3)
    • equalstring · HH:mm | null

      The asr athan at this time, HH:MM; null removes it.

    • minstring | null

      The asr athan never before this, HH:MM or <prayer>±minutes; null removes it.

    • maxstring | null

      The asr athan never after this, HH:MM or <prayer>±minutes; null removes it.

  • maghribobject | null

    Replaces the maghrib rule: one of equal, min and max, exactly; null removes it.

    Show child attributes (3)
    • equalstring · HH:mm | null

      The maghrib athan at this time, HH:MM; null removes it.

    • minstring | null

      The maghrib athan never before this, HH:MM or <prayer>±minutes; null removes it.

    • maxstring | null

      The maghrib athan never after this, HH:MM or <prayer>±minutes; null removes it.

  • ishaobject | null

    Replaces the isha rule: one of equal, min and max, exactly; null removes it.

    Show child attributes (3)
    • equalstring · HH:mm | null

      The isha athan at this time, HH:MM; null removes it.

    • minstring | null

      The isha athan never before this, HH:MM or <prayer>±minutes; null removes it.

    • maxstring | null

      The isha athan never after this, HH:MM or <prayer>±minutes; null removes it.

Returns

The athan rules after the write.

  • objectathan_rules

    Always athan_rules.

  • masjidsstring[]

    The organization's masjids: they share one timetable, so this setting is each of theirs.

  • fajrobject | null

    The fajr rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The fajr athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The fajr athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The fajr athan never after this: HH:MM, or <prayer>±minutes.

  • sunriseobject | null

    The sunrise rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The sunrise athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The sunrise athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The sunrise athan never after this: HH:MM, or <prayer>±minutes.

  • dhuhrobject | null

    The dhuhr rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The dhuhr athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The dhuhr athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The dhuhr athan never after this: HH:MM, or <prayer>±minutes.

  • asrobject | null

    The asr rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The asr athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The asr athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The asr athan never after this: HH:MM, or <prayer>±minutes.

  • maghribobject | null

    The maghrib rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The maghrib athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The maghrib athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The maghrib athan never after this: HH:MM, or <prayer>±minutes.

  • ishaobject | null

    The isha rules; null when it has none.

    Show child attributes (3)
    • equalstring | null

      The isha athan at this time, HH:MM, whatever the computation says.

    • minstring | null

      The isha athan never before this: HH:MM, or <prayer>±minutes.

    • maxstring | null

      The isha athan never after this: HH:MM, or <prayer>±minutes.

  • updatedAtstring | null

    When it last changed; null before it was ever set.

  • affectedMasjidsstring[]

    The masjids the write changed: every masjid of the organization.

PATCH /v1/masjid/athan-rules
curl -X PATCH "https://hub.masjidbox.com/v1/masjid/athan-rules" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"isha":{"min":"maghrib+90"}}'
Example request · MasjidAthanRulesPatch
{
  "isha": {
    "min": "maghrib+90"
  }
}
200 · MasjidAthanRulesUpdated
{
  "masjids": [
    "msj_o5urjd3hd5",
    "msj_k2w8x1p0aa"
  ],
  "object": "athan_rules",
  "asr": null,
  "dhuhr": {
    "equal": "13:30",
    "max": null,
    "min": null
  },
  "fajr": null,
  "isha": {
    "equal": null,
    "max": null,
    "min": "maghrib+90"
  },
  "maghrib": null,
  "sunrise": null,
  "updatedAt": "2026-11-12T08:02:11.000Z",
  "affectedMasjids": [
    "msj_o5urjd3hd5",
    "msj_k2w8x1p0aa"
  ]
}