(zettel (meta (back "00001012000000") (backward "00001012000000 00001012920000") (box-number "1") (created "20210713150005") (forward "00001004010000 00001004011200 00001006050000 00001010040100 00001010070600 00001012920000") (modified "20221219154608") (published "20221219154608") (role "manual") (syntax "zmk") (tags "#api #manual #zettelstore") (title "API: Delete a zettel")) (rights 4) (encoding "") (content "Deleting a zettel within the Zettelstore is executed on the first [[box|00001004011200]] that contains that zettel.\nZettel with the same identifier, but in subsequent boxes remain.\nIf the first box containing the zettel is read-only, deleting that zettel will fail, as well for a Zettelstore in [[read-only mode|00001004010000#read-only-mode]] or if [[authentication is enabled|00001010040100]] and the user has no [[access right|00001010070600]] to do so.\n\nThe [[endpoint|00001012920000]] to delete a zettel is ''/z/{ID}'', where ''{ID}'' is a placeholder for the [[zettel identifier|00001006050000]].\nYou must send a HTTP DELETE request to this endpoint:\n```\n# curl -X DELETE http://127.0.0.1:23123/z/00001000000000\n```\n\n=== HTTP Status codes\n; ''204''\n: Delete was successful, there is no body in the response.\n; ''403''\n: You are not allowed to delete the given zettel.\n Maybe you do not have enough access rights, or either the box or Zettelstore itself operate in read-only mode.\n; ''404''\n: Zettel not found.\n You probably specified a zettel identifier that is not used in the Zettelstore."))