Used by thousands of students worldwide - help us reach 150 members
Flashcards
/cardsIndividual flashcards (front / back) that belong to a flashcard collection and are scheduled with an SM-2 style spaced-repetition algorithm. Cards are private to their owner.
/cards/collection/:collectionIdList cards in a collectionGET/cards/:cardIdGet a cardPOST/cardsCreate a cardPUT/cards/:cardIdUpdate a cardPOST/cards/:cardId/reviewRecord a review of a cardDELETE/cards/:cardIdDelete a cardList cards in a collection
Returns every card in the collection, newest first (`createdAt` descending), including its spaced-repetition state. 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/cards/collection/:collectionId" \
-H "Authorization: Bearer $SHARH_TOKEN"{
"cards": [
{
"id": "66f2c1a4e0b1c2d3e4f5a6b7",
"front": "What is the definition of kalam?",
"back": "A composed, beneficial utterance by convention.",
"easeFactor": 2.5,
"interval": 0,
"repetitions": 0,
"nextReviewDate": "2026-09-18T10:30:02.117Z",
"lastReviewDate": null,
"tags": ["nahw"],
"notes": "",
"createdAt": "2026-09-18T10:30:02.117Z",
"lastModified": "2026-09-18T10:30:02.120Z"
}
]
}Get a card
Returns a single card with its spaced-repetition state. The card must be owned by the authenticated user.
Path parameters
cardIdstring | Card ObjectId |
Errors
401No token provided403Invalid token, or the card belongs to another user404No card with the given ID exists500Unexpected server error (including a malformed card ID)
curl -X GET "https://app.ummahspot.com/cards/:cardId" \
-H "Authorization: Bearer $SHARH_TOKEN"{
"id": "66f2c1a4e0b1c2d3e4f5a6b7",
"front": "What is the definition of kalam?",
"back": "A composed, beneficial utterance by convention.",
"easeFactor": 2.5,
"interval": 0,
"repetitions": 0,
"nextReviewDate": "2026-09-18T10:30:02.117Z",
"lastReviewDate": null,
"collectionId": "66f2c0ffe0b1c2d3e4f5a600",
"tags": ["nahw"],
"notes": "",
"createdAt": "2026-09-18T10:30:02.117Z",
"lastModified": "2026-09-18T10:30:02.120Z"
}Create a card
Creates a card in a collection owned by the authenticated user and adds the card reference to that collection. New cards start with `easeFactor` 2.5, `interval` 0, `repetitions` 0, `lastReviewDate` null and `nextReviewDate` set to the creation time, so they are immediately due.
Body parameters
frontrequiredstring | Front (question) side of the card. |
backrequiredstring | Back (answer) side of the card. |
collectionIdrequiredstring | ObjectId of the collection to add the card to. Must be owned by the caller. |
tagsstring[] | Free-form tags.Default: [] |
notesstring | Extra notes stored with the card.Default: '' |
Errors
400`front`, `back` or `collectionId` is missing401No 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 POST "https://app.ummahspot.com/cards" \
-H "Authorization: Bearer $SHARH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"front":"string","back":"string","collectionId":"string"}'{
"id": "66f2c1a4e0b1c2d3e4f5a6b7",
"front": "What is the definition of kalam?",
"back": "A composed, beneficial utterance by convention.",
"easeFactor": 2.5,
"interval": 0,
"repetitions": 0,
"nextReviewDate": "2026-09-18T10:30:02.117Z",
"lastReviewDate": null,
"collectionId": "66f2c0ffe0b1c2d3e4f5a600",
"tags": ["nahw"],
"notes": "",
"createdAt": "2026-09-18T10:30:02.117Z",
"lastModified": "2026-09-18T10:30:02.120Z"
}Update a card
Updates the content of a card. Only the fields present in the body are changed; `tags` replaces the whole tag list. The spaced-repetition state is not affected and a card cannot be moved to another collection. The card must be owned by the authenticated user.
Path parameters
cardIdstring | Card ObjectId |
Body parameters
frontstring | New front (question) side. |
backstring | New back (answer) side. |
tagsstring[] | New tag list (replaces the existing one). |
notesstring | New notes. |
Errors
401No token provided403Invalid token, or the card belongs to another user404No card with the given ID exists500Unexpected server error (including a malformed card ID or a validation failure such as an empty `front` / `back`)
curl -X PUT "https://app.ummahspot.com/cards/:cardId" \
-H "Authorization: Bearer $SHARH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"front":"string"}'{
"id": "66f2c1a4e0b1c2d3e4f5a6b7",
"front": "Define kalam according to the grammarians",
"back": "A composed, beneficial utterance by convention.",
"easeFactor": 2.5,
"interval": 0,
"repetitions": 0,
"nextReviewDate": "2026-09-18T10:30:02.117Z",
"lastReviewDate": null,
"collectionId": "66f2c0ffe0b1c2d3e4f5a600",
"tags": ["nahw", "ajrumiyyah"],
"notes": "",
"lastModified": "2026-09-18T10:41:36.552Z"
}Record a review of a card
Records a review and reschedules the card with an SM-2 style algorithm. Steps, in order: (1) `lastReviewDate` is set to now. (2) If `quality` is below 3 the card is reset: `repetitions` = 0 and `interval` = 1 day. Otherwise the new `interval` is 1 day when `repetitions` was 0, 6 days when it was 1, and `round(interval * easeFactor)` for later reviews (using the ease factor from before this review), and `repetitions` is incremented by 1. (3) The ease factor is then adjusted for every review, failed or not: `easeFactor = max(1.3, easeFactor + (0.1 - (5 - quality) * (0.08 + (5 - quality) * 0.02)))`. (4) `nextReviewDate` = now + `interval` days. The card must be owned by the authenticated user.
Path parameters
cardIdstring | Card ObjectId |
Body parameters
qualityrequirednumber | Recall quality from 0 to 5 inclusive (0 = complete blackout, 5 = perfect response). Values below 3 count as a failed recall. |
Errors
400`quality` is missing, less than 0 or greater than 5401No token provided403Invalid token, or the card belongs to another user404No card with the given ID exists500Unexpected server error (including a malformed card ID)
curl -X POST "https://app.ummahspot.com/cards/:cardId/review" \
-H "Authorization: Bearer $SHARH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"quality":0}'{
"id": "66f2c1a4e0b1c2d3e4f5a6b7",
"easeFactor": 2.6,
"interval": 1,
"repetitions": 1,
"nextReviewDate": "2026-09-19T10:45:10.308Z",
"lastReviewDate": "2026-09-18T10:45:10.308Z",
"message": "Review recorded successfully"
}Delete a card
Permanently deletes the card and removes its reference from the parent collection. The card must be owned by the authenticated user.
Path parameters
cardIdstring | Card ObjectId |
Errors
401No token provided403Invalid token, or the card belongs to another user404No card with the given ID exists500Unexpected server error (including a malformed card ID)
curl -X DELETE "https://app.ummahspot.com/cards/:cardId" \
-H "Authorization: Bearer $SHARH_TOKEN"{
"message": "Card deleted successfully"
}