User-related API environment
Production user-related API docs
These pages describe the Production user-related API stack.
Use production OAuth credentials, production API base URLs, and production app URLs when following this documentation.
Need to test before going live? Switch to the Pre-live docs using the environment switcher above.
Add or update user reading session
Track the user's most recent reading location (Surah/Ayah) for "Continue reading" / "Recently read" UX. This endpoint stores location only; it does not credit reading time, streaks, goals, or activity-calendar progress.
A new reading session will be created if the user does not have an existing one in the past 20 minutes; otherwise, the existing reading session will be updated with the latest read Ayah.
Call this when the latest visible/read Ayah changes. Quran.com debounces this call so frequent scrolling updates the user's resume location without sending one request for every intersection event.
For streaks, goals, and calendar-style progress tracking, call POST /v1/activity-days with the read ranges, active reading seconds, and Mushaf id. See Reading Sessions vs Activity Days.
Request Body
Possible values: >= 1
The Surah number of the latest visible/read Ayah. Used for resume and recently-read UX.
Possible values: >= 1
The Ayah number within chapterNumber for the latest visible/read Ayah.
- 200
- 400
- 401
- 403
- 404
- 422
- 429
- 500
- 502
- 503
- 504
Request has been handled successfully.
Schema
data object
Possible values: [reading session created, reading session updated]
{
"success": true,
"data": {
"message": "reading session created"
}
}
{
"success": true,
"data": {
"message": "reading session created"
}
}
The request is missing required parameters or is invalid.
Schema
{
"message": "The request is missing required headers or is invalid",
"type": "invalid_request",
"success": false
}
The request is unauthorized.
Schema
{
"message": "The request requires user authentication",
"type": "unauthorized",
"success": false
}
Forbidden error. Can either be due to access token not being passed, having been expired or the caller trying to access a resource without enough permissions.
Schema
{
"message": "The server understood the request, but refuses to authorize it",
"type": "forbidden",
"success": false
}
Not Found. The resource being accessed does not exist.
Schema
{
"message": "The requested resource could not be found",
"type": "not_found",
"success": false
}
Validation Error. The request includes one or more invalid params. Please check the request params and try again.
Schema
{
"message": "The request was well-formed but was unable to be followed due to semantic errors",
"type": "unprocessable_entity",
"success": false
}
Too many requests, please try again later.
Schema
{
"message": "Too many requests, please try again later",
"type": "rate_limit_exceeded",
"success": false
}
Server Error. Something went wrong, try again later.
Schema
{
"message": "The server encountered an internal error and was unable to complete your request",
"type": "internal_server_error",
"success": false
}
Invalid response from the upstream server
Schema
{
"message": "The server was acting as a gateway or proxy and received an invalid response from the upstream server",
"type": "bad_gateway",
"success": false
}
The server is currently unable to handle the request due to a temporary overload or scheduled maintenance
Schema
{
"message": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance",
"type": "service_unavailable",
"success": false
}
The server did not receive a timely response from the upstream server.
Schema
{
"message": "The server was acting as a gateway or proxy and did not receive a timely response from the upstream server",
"type": "gateway_timeout",
"success": false
}