Used by thousands of students worldwide - help us reach 150 members
Flashcard Collections
/card-collectionsFlashcard decks. A collection groups cards, carries per-deck daily review settings, and exposes study queues (due cards, new cards) and statistics. Collections are private to their owner.
/card-collectionsList your collectionsGET/card-collections/:collectionIdGet a collectionGET/card-collections/:collectionId/statsGet collection statisticsGET/card-collections/:collectionId/dueList cards due for reviewGET/card-collections/:collectionId/newList new (never reviewed) cardsPOST/card-collectionsCreate a collectionPUT/card-collections/:collectionIdUpdate a collectionDELETE/card-collections/:collectionIdDelete a collection and its cardsList your collections
Returns all collections owned by the authenticated user, sorted by `lastModified` descending. Cards themselves are not included, only a `cardCount`.
Errors
401No token provided403Invalid token500Unexpected server error
curl -X GET "https://app.ummahspot.com/card-collections" \
-H "Authorization: Bearer $SHARH_TOKEN"{
"collections": [
{
"id": "66f2c0ffe0b1c2d3e4f5a600",
"name": "Ajrumiyyah definitions",
"description": "Key terms from the matn",
"cardCount": 42,
"settings": {
"cardsPerDay": 20,
"newCardsPerDay": 10
},
"createdAt": "2026-08-15T12:00:00.000Z",
"lastModified": "2026-09-18T10:30:02.130Z"
}
]
}Get a collection
Returns one collection (without its cards). The collection must be owned by the authenticated user.
Path parameters
collectionIdstring | CardCollection ObjectId |
Errors
401No token provided403Invalid token, or the collection belongs to another user404No collection with the given ID exists500Unexpected server error (including a malformed collection ID)
curl -X GET "https://app.ummahspot.com/card-collections/:collectionId" \
-H "Authorization: Bearer $SHARH_TOKEN"{
"id": "66f2c0ffe0b1c2d3e4f5a600",
"name": "Ajrumiyyah definitions",
"description": "Key terms from the matn",
"cardCount": 42,
"settings": {
"cardsPerDay": 20,
"newCardsPerDay": 10
},
"createdAt": "2026-08-15T12:00:00.000Z",
"lastModified": "2026-09-18T10:30:02.130Z"
}Get collection statistics
Returns card counts for the collection: `total`; `due` (cards whose `nextReviewDate` is now or earlier — this includes never-reviewed cards, which are due from creation); `new` (`repetitions` = 0 and never reviewed); `learning` (`repetitions` 1 or 2); `mature` (`repetitions` 3 or more). The collection must be owned by the authenticated user.
Path parameters
collectionIdstring | CardCollection ObjectId |
Errors
401No token provided403Invalid token, or the collection belongs to another user404No collection with the given ID exists500Unexpected server error (including a malformed collection ID)
curl -X GET "https://app.ummahspot.com/card-collections/:collectionId/stats" \
-H "Authorization: Bearer $SHARH_TOKEN"{
"collectionId": "66f2c0ffe0b1c2d3e4f5a600",
"collectionName": "Ajrumiyyah definitions",
"stats": {
"total": 42,
"due": 12,
"new": 8,
"learning": 14,
"mature": 19
}
}List cards due for review
Returns the cards in the collection whose `nextReviewDate` is now or earlier, most overdue first (`nextReviewDate` ascending). Never-reviewed cards are included because their `nextReviewDate` is their creation time. The number of cards is capped by `limit`, which defaults to the collection's `settings.cardsPerDay`. The cap is not tracked per day: it only limits the size of this response. A `limit` of 0 removes the cap. The collection must be owned by the authenticated user.
Path parameters
collectionIdstring | CardCollection ObjectId |
Query parameters
limitnumber | Maximum number of cards to return; parsed with parseInt. 0 returns all due cards.Default: settings.cardsPerDay (20 unless changed) |
Errors
401No token provided403Invalid token, or the collection belongs to another user404No collection with the given ID exists500Unexpected server error (including a malformed collection ID)
curl -X GET "https://app.ummahspot.com/card-collections/:collectionId/due" \
-H "Authorization: Bearer $SHARH_TOKEN"{
"cards": [
{
"id": "66f2c1a4e0b1c2d3e4f5a6b7",
"front": "What is the definition of kalam?",
"back": "A composed, beneficial utterance by convention.",
"easeFactor": 2.6,
"interval": 6,
"repetitions": 2,
"nextReviewDate": "2026-09-17T08:12:44.000Z",
"lastReviewDate": "2026-09-11T08:12:44.000Z",
"tags": ["nahw"],
"notes": ""
}
],
"count": 1
}List new (never reviewed) cards
Returns cards in the collection that have never been reviewed (`repetitions` = 0 and `lastReviewDate` null), oldest first (`createdAt` ascending). The number of cards is capped by `limit`, which defaults to the collection's `settings.newCardsPerDay`. The cap is not tracked per day: it only limits the size of this response. A `limit` of 0 removes the cap. The collection must be owned by the authenticated user.
Path parameters
collectionIdstring | CardCollection ObjectId |
Query parameters
limitnumber | Maximum number of cards to return; parsed with parseInt. 0 returns all new cards.Default: settings.newCardsPerDay (10 unless changed) |
Errors
401No token provided403Invalid token, or the collection belongs to another user404No collection with the given ID exists500Unexpected server error (including a malformed collection ID)
curl -X GET "https://app.ummahspot.com/card-collections/:collectionId/new" \
-H "Authorization: Bearer $SHARH_TOKEN"{
"cards": [
{
"id": "66f2c1a4e0b1c2d3e4f5a6b7",
"front": "What is the definition of kalam?",
"back": "A composed, beneficial utterance by convention.",
"tags": ["nahw"],
"notes": "",
"createdAt": "2026-09-18T10:30:02.117Z"
}
],
"count": 1
}Create a collection
Creates an empty collection owned by the authenticated user. Settings that are not supplied take their defaults.
Body parameters
namerequiredstring | Collection name. |
descriptionstring | Collection description.Default: '' |
settingsobject | Study settings: `cardsPerDay` (number, default page size of the due queue) and `newCardsPerDay` (number, default page size of the new-card queue).Default: { cardsPerDay: 20, newCardsPerDay: 10 } |
Errors
400`name` is missing401No token provided403Invalid token500Unexpected server error
curl -X POST "https://app.ummahspot.com/card-collections" \
-H "Authorization: Bearer $SHARH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"string"}'{
"id": "66f2c0ffe0b1c2d3e4f5a600",
"name": "Ajrumiyyah definitions",
"description": "Key terms from the matn",
"cardCount": 0,
"settings": {
"cardsPerDay": 20,
"newCardsPerDay": 10
},
"createdAt": "2026-09-18T10:28:40.019Z",
"lastModified": "2026-09-18T10:28:40.019Z"
}Update a collection
Updates the name, description and/or settings of a collection. Only the fields present in the body are changed; `settings` is shallow-merged into the existing settings, so a single setting can be sent on its own. The collection must be owned by the authenticated user.
Path parameters
collectionIdstring | CardCollection ObjectId |
Body parameters
namestring | New collection name. |
descriptionstring | New collection description. |
settingsobject | Settings to merge: `cardsPerDay` (number) and/or `newCardsPerDay` (number). |
Errors
401No token provided403Invalid token, or the collection belongs to another user404No collection with the given ID exists500Unexpected server error (including a malformed collection ID or a validation failure such as an empty `name`)
curl -X PUT "https://app.ummahspot.com/card-collections/:collectionId" \
-H "Authorization: Bearer $SHARH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"string"}'{
"id": "66f2c0ffe0b1c2d3e4f5a600",
"name": "Ajrumiyyah definitions",
"description": "Key terms from the matn",
"cardCount": 42,
"settings": {
"cardsPerDay": 30,
"newCardsPerDay": 10
},
"lastModified": "2026-09-18T10:50:21.774Z"
}Delete a collection and its cards
Permanently deletes the collection together with every card in it. The collection must be owned by the authenticated user.
Path parameters
collectionIdstring | CardCollection ObjectId |
Errors
401No token provided403Invalid token, or the collection belongs to another user404No collection with the given ID exists500Unexpected server error (including a malformed collection ID)
curl -X DELETE "https://app.ummahspot.com/card-collections/:collectionId" \
-H "Authorization: Bearer $SHARH_TOKEN"{
"message": "Collection and all associated cards deleted successfully"
}