Skip to content
HALOWERK

Textwerk

anki deck

Writes a real Anki package: an SQLite collection in the classic schema version 11 (collection.anki2, importable by Anki 2.1 desktop, AnkiDroid and AnkiMobile) with one note type (Basic or Basic and reversed card), one deck, notes with checksum (csum) and sort field, one new card per template, packed with an empty media map into a ZIP. Note GUIDs are derived from deck name and front text, so re-importing an updated deck updates notes instead of duplicating them. Text is HTML-escaped unless.

POST https://text.halowerk.com/v1/anki-deck

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
deck_namestringYesDeck name; "::" creates a sub-deck.
cardsarrayYes
note_typestringNo
htmlbooleanNoTreat card text as HTML (otherwise it is escaped).
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "deck_name",
    "cards"
  ],
  "properties": {
    "deck_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "pattern": "^[^\\x00-\\x1f\"]+$",
      "description": "Deck name; \"::\" creates a sub-deck."
    },
    "cards": {
      "type": "array",
      "minItems": 1,
      "maxItems": 2000,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "front",
          "back"
        ],
        "properties": {
          "front": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "back": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "tags": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60,
              "pattern": "^[^\\s]+$"
            }
          }
        }
      }
    },
    "note_type": {
      "type": "string",
      "enum": [
        "basic",
        "basic_and_reversed"
      ],
      "default": "basic"
    },
    "html": {
      "type": "boolean",
      "default": false,
      "description": "Treat card text as HTML (otherwise it is escaped)."
    }
  }
}

Open original schema

Published input example

{
  "deck_name": "Deutsch::A1 Nomen",
  "cards": [
    {
      "front": "das Haus",
      "back": "the house",
      "tags": [
        "nouns"
      ]
    },
    {
      "front": "der Tisch",
      "back": "the table"
    }
  ],
  "note_type": "basic_and_reversed"
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →