POST
/
import-anki-flashcards
curl --request POST \
  --url http://dolphinflashcards.com/api/import-anki-flashcards \
  --header 'Content-Type: multipart/form-data' \
  --form jwtToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySUQiOiIxMjM0NSJ9.abc123... \
  --form folder=Languages/Spanish \
  --form 'flashcardName=Spanish Vocabulary' \
  --form 'flashcardDescription=Imported from Anki deck' \
  --form termField=Front \
  --form definitionField=Back \
  --form stripHtml=true
{
  "flashcardID": "987654321"
}

Body

multipart/form-data
file
file
required

Anki .apkg file containing the flashcards

jwtToken
string
required

JWT authentication token

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySUQiOiIxMjM0NSJ9.abc123..."

flashcardName
string
required

Name for the new flashcard set

Example:

"Spanish Vocabulary"

folder
string
default:

Folder path to store the flashcards (empty string for root)

Example:

"Languages/Spanish"

flashcardDescription
string

Optional description for the flashcard set

Example:

"Imported from Anki deck"

termField
string
default:Front

Term field name (e.g., "Front") or index (0-based integer)

Example:

"Front"

definitionField
string
default:Back

Definition field name (e.g., "Back") or index (0-based integer)

Example:

"Back"

stripHtml
string
default:true

Whether to remove HTML tags from fields ("true" or "false" as string)

Example:

"true"

Response

200
application/json
Successfully imported flashcards
flashcardID
string

ID of the created flashcard set

Example:

"987654321"