Waqt API documentation
Base URL
https://waqt.krittimmanush.com/api
All paths below are relative to this base (e.g. https://waqt.krittimmanush.com/api/prayers).
Get prayer times
GET /prayers
Returns JSON for a city. Use the city’s stored <code>name</code> value (slug), not the display name.
city(string) — Required. City `name` from the database (case-insensitive).month(string, optional) — English month name (january–december) or number 1–12. Optional `march 2026`.year(integer, optional) — Used with `month`; defaults to the current calendar year if omitted.date(string, optional) —YYYY-MM-DD. If set, `month` is ignored.
Behaviour
- If `month` is present: returns an array of rows for that calendar month.
- Else if `date` is present: returns a single object for that day.
- Else: returns a single object for today in the app default timezone logic (see implementation).
Examples
GET https://waqt.krittimmanush.com/api/prayers?city=tromso&month=march&year=2026
GET https://waqt.krittimmanush.com/api/prayers?city=tromso&date=2026-03-15
GET https://waqt.krittimmanush.com/api/prayers?city=tromso
[
{
"date": "2026-03-01",
"fajr": "05:12",
"sunrise": "06:45",
"dhuhr": "12:10",
"asr": "15:02",
"maghrib": "17:48",
"isha": "19:15"
}
]
{
"date": "2026-03-15",
"fajr": "05:05",
"sunrise": "06:38",
"dhuhr": "12:05",
"asr": "14:55",
"maghrib": "17:42",
"isha": "19:08"
}
Empty result: HTTP 404 with {"message":"No data found"}
Next upcoming prayer
GET /next-prayer
city(string) — Required. Same as <code>/prayers</code>.
GET https://waqt.krittimmanush.com/api/next-prayer?city=tromso
{
"name": "Asr",
"time": "15:02",
"date": "2026-03-15",
"datetime_iso": "2026-03-15T15:02:00+01:00",
"seconds_remaining": 3600
}
Cities
City JSON uses `name`, `display_name`, `country`, `timezone`. (The Eloquent model hides `id` and timestamps in JSON.)
GET /cities— List all cities (public)GET /cities/{id}— One city by numeric id (public)POST /cities— Create (auth: Sanctum)PUT /cities/{id}/PATCH /cities/{id}— Update (auth)DELETE /cities/{id}— Delete (auth)
Required: name, display_name, country, timezone
{
"name": "bodo",
"display_name": "Bodø",
"country": "Norway",
"timezone": "Europe/Oslo"
}
Authentication
POST /login
Body (JSON): email, password
POST https://waqt.krittimmanush.com/api/login
Content-Type: application/json
{
"email": "user@example.com",
"password": "your-password"
}
{
"message": "Login successful",
"token": "1|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"user": { "...": "..." }
}
Send the plain-text token as: Authorization: Bearer {token}
POST /logout
Revokes the current personal access token.
POST https://waqt.krittimmanush.com/api/logout
Authorization: Bearer {token}
Accept: application/json
Example: {"message":"Logged out successfully"}
Upload prayer PDF
POST /upload
Multipart form field: pdf (max 10 MB, PDF only). City and month are detected from the file.
POST https://waqt.krittimmanush.com/api/upload
Authorization: Bearer {token}
Content-Type: multipart/form-data
pdf: (binary)
{
"status": "success",
"message": "PDF parsed and 31 prayer times saved",
"city": "Tromsø",
"month": "March, 2026"
}
Static audio (web)
https://waqt.krittimmanush.com/storage/adhan/fajr.mp3
https://waqt.krittimmanush.com/storage/adhan/general.mp3
Errors
Many endpoints return HTTP 4xx with a JSON body such as:
{ "error": "City 'x' not found" }
Unauthenticated requests often return HTTP 401 with: {"message":"Unauthenticated."}
Endpoint summary
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /prayers | — | Prayer rows for city (month / date / today) |
| GET | /next-prayer | — | Next prayer for city |
| GET | /cities | — | List cities |
| GET | /cities/{id} | — | Get city |
| POST | /login | — | Issue API token |
| POST | /logout | Revoke current token | |
| POST | /cities | Create city | |
| PUT/PATCH | /cities/{id} | Update city | |
| DELETE | /cities/{id} | Delete city | |
| POST | /upload | Upload & parse PDF |