Your masjid · Prayer times

Your full-year timetables

Your athan and iqamah times for a whole year, day by day, for the current year or the next one.

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

A full-year timetable

Masjid key · Prayer times: read

GET/v1/masjid/timetables/{kind}/{year}

The athan or iqamah timetable of the current year (the one in use, active, else the newest stored, inactive) or of the next year (pending, in use from 1 January), in your timezone.

Parameters

  • kindathan | iqamah · pathrequired

    athan (the six daily times) or iqamah (the five prayers).

  • yearinteger · pathrequired

    The current year or the next one, in your timezone; another year is a 404.

Returns

The timetable.

  • objecttimetable

    Always timetable.

  • masjidsstring[]

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

  • kindathan | iqamah

    athan (the six daily times) or iqamah (the five prayers).

  • yearinteger

    The year it covers, in your timezone.

  • statusactive | inactive | pending

    active: your times come from it this year; inactive: stored this year but not in use; pending: next year, in use from 1 January.

  • daysobject[]

    The days, in date order.

    Show child attributes (8)
    • monthinteger

      The month, 1 to 12.

    • dayinteger

      The day of the month.

    • fajrstring | null

      The fajr time, HH:MM.

    • sunrisestring | nulloptional

      Sunrise, HH:MM; athan timetables only.

    • dhuhrstring | null

      The dhuhr time, HH:MM.

    • asrstring | null

      The asr time, HH:MM.

    • maghribstring | null

      The maghrib time, HH:MM.

    • ishastring | null

      The isha time, HH:MM.

  • updatedAtstring | null

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

GET /v1/masjid/timetables/{kind}/{year}
curl "https://hub.masjidbox.com/v1/masjid/timetables/athan/2027" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"
200 · MasjidTimetable
{
  "masjids": [
    "msj_o5urjd3hd5",
    "msj_k2w8x1p0aa"
  ],
  "object": "timetable",
  "days": [
    {
      "asr": "15:01",
      "day": 1,
      "dhuhr": "12:32",
      "fajr": "05:10",
      "isha": "19:58",
      "maghrib": "18:21",
      "month": 3,
      "sunrise": "06:41"
    }
  ],
  "kind": "athan",
  "status": "pending",
  "updatedAt": "2026-11-12T08:02:11.000Z",
  "year": 2027
}

Replace a full-year timetable

Masjid key · secret · Prayer times: edit

PUT/v1/masjid/timetables/{kind}/{year}

The days you send replace the stored ones. For the current year the timetable becomes the one your times come from, as the dashboard's import does (an iqamah timetable turns the iqamah rules off). For the next year it waits, pending, until 1 January. 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

  • kindathan | iqamah · pathrequired

    athan (the six daily times) or iqamah (the five prayers).

  • yearinteger · pathrequired

    The current year or the next one, in your timezone; another year is a 404.

Request body

  • daysobject[]required

    The days of the year, HH:MM, each at most once. An athan day needs its six times; an iqamah day has no sunrise.

    Show child attributes (8)
    • monthintegerrequired

      The month, 1 to 12.

    • dayintegerrequired

      The day of the month.

    • fajrstring · HH:mm | nullrequired

      The fajr time, HH:MM.

    • sunrisestring · HH:mm | null

      Sunrise, HH:MM; athan timetables only.

    • dhuhrstring · HH:mm | nullrequired

      The dhuhr time, HH:MM.

    • asrstring · HH:mm | nullrequired

      The asr time, HH:MM.

    • maghribstring · HH:mm | nullrequired

      The maghrib time, HH:MM.

    • ishastring · HH:mm | nullrequired

      The isha time, HH:MM.

Returns

The timetable after the write.

  • objecttimetable

    Always timetable.

  • masjidsstring[]

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

  • kindathan | iqamah

    athan (the six daily times) or iqamah (the five prayers).

  • yearinteger

    The year it covers, in your timezone.

  • statusactive | inactive | pending

    active: your times come from it this year; inactive: stored this year but not in use; pending: next year, in use from 1 January.

  • daysobject[]

    The days, in date order.

    Show child attributes (8)
    • monthinteger

      The month, 1 to 12.

    • dayinteger

      The day of the month.

    • fajrstring | null

      The fajr time, HH:MM.

    • sunrisestring | nulloptional

      Sunrise, HH:MM; athan timetables only.

    • dhuhrstring | null

      The dhuhr time, HH:MM.

    • asrstring | null

      The asr time, HH:MM.

    • maghribstring | null

      The maghrib time, HH:MM.

    • ishastring | null

      The isha time, HH:MM.

  • updatedAtstring | null

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

  • affectedMasjidsstring[]

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

PUT /v1/masjid/timetables/{kind}/{year}
curl -X PUT "https://hub.masjidbox.com/v1/masjid/timetables/athan/2027" \
  -H "Authorization: Bearer $MASJIDBOX_KEY" \
  -H "Content-Type: application/json" \
  -d '{"days":[{"asr":"15:01","day":1,"dhuhr":"12:32","fajr":"05:10","isha":"19:58","maghrib":"18:21","month":3,"sunrise":"06:41"}]}'
Example request · MasjidTimetableReplace
{
  "days": [
    {
      "asr": "15:01",
      "day": 1,
      "dhuhr": "12:32",
      "fajr": "05:10",
      "isha": "19:58",
      "maghrib": "18:21",
      "month": 3,
      "sunrise": "06:41"
    }
  ]
}
200 · MasjidTimetableUpdated
{
  "masjids": [
    "msj_o5urjd3hd5",
    "msj_k2w8x1p0aa"
  ],
  "object": "timetable",
  "days": [
    {
      "asr": "15:01",
      "day": 1,
      "dhuhr": "12:32",
      "fajr": "05:10",
      "isha": "19:58",
      "maghrib": "18:21",
      "month": 3,
      "sunrise": "06:41"
    }
  ],
  "kind": "athan",
  "status": "pending",
  "updatedAt": "2026-11-12T08:02:11.000Z",
  "year": 2027,
  "affectedMasjids": [
    "msj_o5urjd3hd5",
    "msj_k2w8x1p0aa"
  ]
}

Delete next year's timetable

Masjid key · secret · Prayer times: edit

DELETE/v1/masjid/timetables/{kind}/{year}

Deletes the pending timetable of the next year. The current year's timetable cannot be deleted while your times come from it (409): switch back to computed times with PATCH /v1/masjid/calculation-method (athan) or /v1/masjid/iqamah-rules (iqamah). 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

  • kindathan | iqamah · pathrequired

    athan (the six daily times) or iqamah (the five prayers).

  • yearinteger · pathrequired

    The current year or the next one, in your timezone; another year is a 404.

Returns

Deleted. No body.

204 · No response body.

DELETE /v1/masjid/timetables/{kind}/{year}
curl -X DELETE "https://hub.masjidbox.com/v1/masjid/timetables/athan/2027" \
  -H "Authorization: Bearer $MASJIDBOX_KEY"