API Reference

Programmatically create decks, add flashcards, and import files into your iwill.study account.

Authentication

All API requests require a Bearer token. Generate an API key in Settings → API Keys.

Authorization: Bearer isk_your_api_key_here

Base URL

https://www.iwill.study/api/v1

Rate Limits

PlanCards via APIDecks
Free100 cards/day5 decks
ProUnlimitedUnlimited

Endpoints

GET/api/v1/decks

List all decks belonging to the authenticated user, with card counts.

Authentication

Bearer token (API key)

Response

{
  "decks": [
    {
      "id": "uuid",
      "title": "Spanish B1",
      "description": "",
      "language": "Spanish",
      "source": "api",
      "created_at": "2026-03-14T...",
      "card_count": 42
    }
  ]
}
POST/api/v1/decks

Create a new empty deck.

Authentication

Bearer token (API key)

Request Body

FieldTypeRequiredDescription
titlestringYesDeck title (max 200 chars)
descriptionstringNoDeck description
languagestringNoTarget language (e.g. "Spanish")

Response

{
  "deck": {
    "id": "uuid",
    "title": "Spanish B1",
    "description": "",
    "language": "Spanish",
    "source": "api",
    "created_at": "2026-03-14T..."
  }
}
DELETE/api/v1/decks

Delete a deck and all its cards.

Authentication

Bearer token (API key)

Query Parameters

ParameterTypeRequiredDescription
idstringYesDeck ID to delete

Response

{ "success": true }
GET/api/v1/cards

List all cards in a specific deck.

Authentication

Bearer token (API key)

Query Parameters

ParameterTypeRequiredDescription
deck_idstringYesDeck ID to fetch cards from

Response

{
  "cards": [
    {
      "id": "uuid",
      "front": "however",
      "back": "sin embargo",
      "tags": ["b1", "connectors"],
      "context": "Formal writing: 'The results, however, were unexpected.'",
      "source": "api",
      "created_at": "2026-03-14T..."
    }
  ]
}
POST/api/v1/cards

Add cards to a deck. Specify an existing deck by ID, or provide a title to find-or-create a deck.

Authentication

Bearer token (API key)

Request Body

FieldTypeRequiredDescription
deck_idstringNoExisting deck UUID. Use this to add cards to a specific deck.
deckstringNoDeck title (max 200 chars). Creates deck if not found. Required if deck_id is not provided.
cardsarrayYesArray of card objects (max 500 per request)
cards[].frontstringYesFront side text (max 5000 chars)
cards[].backstringYesBack side text (max 5000 chars)
cards[].tagsstring[]NoOptional tags for the card
cards[].contextstringNoUsage examples, cultural notes, or contextual info (max 10,000 chars)

Response

{
  "deck_id": "uuid",
  "created": 2,
  "skipped": 1
}

Duplicates are automatically skipped — cards with the same front text (case-insensitive) already in the deck won't be added again. The response includes a 'skipped' count. Provide either deck_id or deck (title), not both. Free plan: max 100 cards/day via API.

PATCH/api/v1/cards

Update or move cards. Use this to move cards between decks (preserving review history), edit card content, or update context and tags.

Authentication

Bearer token (API key)

Request Body

FieldTypeRequiredDescription
card_idsstring[]YesArray of card UUIDs to update (max 500)
updates.deck_idstringNoTarget deck UUID — moves cards to this deck
updates.frontstringNoNew front text (max 5,000 chars)
updates.backstringNoNew back text (max 5,000 chars)
updates.tagsstring[]NoNew tags array
updates.contextstring | nullNoNew context/examples (max 10,000 chars), or null to clear

Response

{ "updated": 3 }

Moving cards between decks preserves all FSRS review history. You can combine a move with field updates in a single request.

POST/api/v1/import

Import flashcards from an Anki (.apkg) or CSV/TSV file.

Authentication

Bearer token (API key)

Request Body

FieldTypeRequiredDescription
fileFileYesUpload via multipart/form-data. Accepted: .apkg, .csv, .tsv, .txt

Response

{
  "deck_id": "uuid",
  "imported": 150
}

CSV files should have two columns: front and back. The filename (without extension) is used as the deck name.

Error Codes

StatusMeaning
400Bad request — invalid or missing parameters
401Unauthorized — missing or invalid API key
404Not found — resource doesn't exist or doesn't belong to you
429Rate limited — daily card limit exceeded (free plan)
500Server error — please try again or contact support