Skip to content

API Reference ​

Welcome to the Sunnah.now API reference. Here you can find documentation for all available endpoints.

The API is currently in version v0.1.0. Everyone is welcome to contribute at github.com/sunnah-now. For the stable release, please keep an eye on github.com/sunnah-now.

Base URL ​

All requests should be made to: https://api.sunnah.now (or http://localhost:3000 when running locally).

Authentication ​

Most routes require an API token. See the Authentication Guide for details.

API Groups ​

The API is divided into several groups:

  • General: Basic endpoints like health check.
  • Books: Endpoints to list collections and get their metadata.
  • Hadiths: Endpoints to retrieve Hadiths from collections (supports pagination).
  • Volumes: Endpoints to retrieve Hadiths within a specific volume.
  • Chapters: Endpoints to retrieve Hadiths within a specific chapter.
  • Self-Hosted API: Administrative endpoints for token management and analytics. For self-hosted instances, these endpoints require the MASTER_TOKEN defined in your .env.local.

v0.1.0 - Everyone is welcome to contribute at github.com/sunnah-now. Released under the MIT License.