Reference
API reference
Every route the Lymi API serves, one page per resource. The pages render the OpenAPI document from the running server, so they never fall behind the code.
Base URL
https://my.lymi.appSend your key in an x-api-key header; Authentication covers scopes and errors. Each route’s request assumes LYMI_KEY is set in your shell; replace anything in braces with a real id.
Resources
Content
- DecksA deck holds cards and sets their defaults.
- SectionsOptional, ordered parts of one deck that every learner sees. Each learner opens them in order unless the owner turns that off.
- SeriesThe owner's optional, ordered groups of their own decks, reviewed together. Members of a shared deck never see them.
- CardsOne term and what the learner knows about it. Adding a term that already exists is skipped, never rejected.
- TagsLabels on cards that find and review them across decks. A card's tags are part of the card, and the same name is one tag in every deck you study.
- PicturesA card's one private picture: set from bytes or a public link, described, archived and restored.
- LanguagesHow cards in each language are written. Public and cacheable.
Review
Sharing and publishing
- SharingWho else studies a deck: its members, invitations and join link. Every member keeps their own schedule.
- PublishingA deck's public page on Explore, and its editions in other meaning languages.
- ExplorePublished decks as the learner browses them in the app, and adding one to Library.
- ReportsAggregate results for a publisher's own published decks: adds, first reviews, returning learners and page views. Read-only.
Moving cards
Account
- AccountWho the credential belongs to.
- SettingsThe learner's own preferences.
- API keysSession only: no key can list, mint or revoke another key.
- Connected appsAssistants and apps the learner granted access to over OAuth.
- ActivityWrites by connected apps, API keys and the AI, imports, and the people events of a shared deck, newest first.
- RemindersThe daily review reminder, sent to a browser by Web Push.
Conventions
- Ids
- A 19-character string that sorts by the time it was made.
- Timestamps
- ISO 8601 strings in UTC.
- Duplicates
- Adding a term that already exists in the same language is skipped and reported, never rejected, so re-running a call is safe.
- Removal
- Cards, decks and sections are archived and can be restored. Only deleting a series cannot be undone.
Errors
A failed call answers with a status and an Error body. Three statuses can come from any route, so the resource pages list only the ones a route adds.
- 401
- No session, API key or token, or one that is not valid.
- 403
- A read key on a write, or a key or token on a route only the learner's own session may call.
- 429
- The key is over its rate limit. Retry-After gives the seconds to wait.