# v2.4.0: Micropub update, delete/undelete, drafts, replies > Reconstructed on 2026-11-03 from the changelog and git history. Commit `0d3a5cd`. Design: ADR-067. ## Summary The Micropub endpoint could only create published notes. It now supports update, soft delete and undelete, drafts, replies, photos in multipart requests and from remote URLs, and the `q=source` / `q=category` queries editing apps need. ## Changes - `starpunk/micropub.py` (largely rewritten): - `handle_create`: `post-status` (`extract_post_status`), `in-reply-to` (`extract_in_reply_to`), multipart uploads (`_save_uploads`), remote photos (`_fetch_remote_photo`: public addresses only, 20 MB, max 4; `_public_address`), own media URLs mapped back to media rows (`_media_id_for_url`); unsupported `h=` types rejected (`_check_type`). - `handle_update` (JSON, `update` scope): delete, then replace, then add, for `content`, `name`, `category`, `photo`, `in-reply-to`, `post-status`; other properties 400; success 204. - `handle_delete` (`delete` scope), with `undelete=True` for undelete. - `handle_query`: `q=source` with or without `url` (list incl. drafts, `limit`/`offset`, `properties[]`), via `note_to_mf2`; `q=category` (`_all_categories`, `filter`); `q=config` lists queries and post types. - `_require_scope`; the media endpoint accepts the `media` scope. - `starpunk/notes.py`: `undelete_note(slug)` restores a soft-deleted note and its file from `.trash/`; crossposts removed on delete and re-posted on undelete. - `starpunk/routes/micropub.py`: dispatch on `action`; the media endpoint is served at both `/micropub/media` (advertised) and `/media`. ## Tests `tests/test_micropub_v240.py` (23 tests: each update operation, scopes, delete/undelete, drafts, replies, multipart and remote photos, queries); `tests/test_micropub.py` updated for the new responses. ## Notes - `published` can be set on create but not changed by update. - Remote photo fetching here used its own public-address check; v2.9.0 moved it onto the webmention SSRF fetcher (every redirect checked, pinned connection).