title: Plain Encoding
role: manual
tags: #api #manual #reference #zettelstore
syntax: zmk
back: 00001012920500
backward: 00001012920500
box-number: 1
copyright: (c) 2020-present by Detlef Stern <ds@zettelstore.de>
created: 20260303142555
forward: 00001005000000 00001012920800
lang: en
license: EUPL-1.2-or-later
modified: 20260303145928
published: 20260303145928
visibility: public

The &ldquo;plain&rdquo; encoding represents a zettel the same way it is stored in a file with an extension [`.zettel`](00001005000000).

Zettel with a [syntax](00001006020000#syntax) value [&ldquo;zmk&rdquo;](00001008000000#zmk) are typically stored in a file with the extension `.zettel`.
Storing zettel with other syntax values in a `.zettel` file is also possible, but not recommended.
In those cases, the zettel is stored in two files: one file (without a filename extension) contains the metadata, and the other stores the zettel content.

These two cases are mirrored by specifying the required [part](00001012920800) of a zettel:

* If part has the value &ldquo;zettel&rdquo;, the full zettel, both metadata and content, is encoded.
  This corresponds to storing a zettel in a single file with the extension `.zettel`.
* A part value of &ldquo;meta&rdquo; encodes only the metadata of a zettel.
* A part value of &ldquo;content&rdquo; (the default) encodes the raw content of a zettel.

If transferred via HTTP, the content type depends on the selected part:

* If part has the value &ldquo;zettel&rdquo;, the content type is either `application/octet-stream` (for binary content) or a value derived from the `syntax` metadata.
* A part value of &ldquo;content&rdquo; results in a content type is derived from the `syntax` metadata.
* A part value of &ldquo;meta&rdquo; results in a content type `text/plain; charset=utf-8`.