Changelog

This changelog is generated automatically from GitHub Releases.

v0.4.2

2026-06-10 · GitHub

[0.4.2] - 2026-06-09

Added

  • Add media upload and campaign attachment support: new upload_media() function and Media model, plus a media_ids parameter on create_campaign() and update_campaign(). Updates preserve a campaign’s existing attachments unless media_ids is passed explicitly. (fixes #16)
  • Documentation site at https://mkennedy.codes/docs/listmonk/ generated from the docstrings with Great Docs
  • Ship a py.typed marker (and the Typing :: Typed classifier) so mypy/pyright type-check against the library’s annotations
  • create_list(), update_list(), and delete_list() now accept the optional timeout_config parameter like every other network call (delete_list() previously hardcoded a 30-second timeout; all three now default to 10 seconds)

Changed

  • Import httpx2 directly instead of aliasing it as httpx, so signatures, docstrings, and the docs site all show httpx2.Timeout / httpx2.HTTPStatusError — the names users actually import
  • Tighten public signatures to match documented behavior: required parameters are no longer Optional (create_campaign(name, subject), create_template(name, body), delete_campaign(campaign_id), delete_template(template_id), set_default_template(template_id), confirm_optin(...)), and functions that can never return None no longer claim Optional returns (list_by_id, campaign_preview_by_id, template_preview_by_id, create_campaign, create_template, create_list, update_list)
  • Fix the headers parameter annotation on create_campaign() — it is a list of single-entry dicts, not a dict
  • Accuracy pass over docstrings, the README, and the example client (corrected TLS/certifi guidance, README samples that would not run as written, stale claims about unimplemented list/template APIs)

Fixed

  • Fix update_list() sending the list type as list_type instead of type, so changing a list’s type now actually takes effect
  • Fix Subscriber.model_dump() crashing on server-populated subscribers (list-membership dicts and a None updated_at now serialize cleanly)
  • Fix the list_by_id() workaround for listmonk#2117 crashing with AttributeError when the server returns a result set (dict access instead of attribute access)
  • Fix repeat login() calls returning True without re-validating the new credentials against the server

v0.4.1

2026-06-03 · GitHub

[0.4.1] - 2026-06-03

Changed

  • Migrate the HTTP backend from httpx to httpx2, the Pydantic-maintained fork, after the original httpx project paused releases and locked down its issue tracker. httpx2 is imported internally as httpx, so the public API and all call sites are unchanged.
  • TLS certificates are now validated against the operating system trust store (via truststore, the httpx2 default) instead of the bundled certifi CA list. If you self-host Listmonk behind a custom or corporate CA, install that CA in your OS trust store or set SSL_CERT_FILE / SSL_CERT_DIR. See the new SSL entry in the README F.A.Q.
  • If you pass a custom timeout_config, construct it with httpx2.Timeout(...) (now the bundled dependency) instead of httpx.Timeout(...).

v0.4.0

2026-04-08 · GitHub

[0.4.0] - 2026-04-08

Added

v0.3.13

2026-04-04 · GitHub

[0.3.13] - 2026-04-03

Fixed

  • Fix confirm_optin() returning False on non-English Listmonk instances by using HTTP status codes instead of hardcoded English response strings (fixes #23)

v0.3.12

2026-04-04 · GitHub

Make subscriber name optional, bump version to 0.3.12 to match Listmonk API/UI behavior (fixes #15)

This update aligns the SDK with the Listmonk API and UI by making the name field optional for subscribers. The change propagates through the data models (Subscriber, CreateSubscriberModel) and the create_subscriber() helper. The changelog is updated to reflect version 0.3.12, and the release comparison links are adjusted accordingly.

v0.3.11

2026-04-04 · GitHub

[0.3.11] - 2026-04-03

Fixed

  • Fix campaign creation failing with listmonk server 6.0.0 - headers field now correctly uses a list of dictionaries instead of a plain dictionary (PR #28)

v0.3.10

2026-01-28 · GitHub

[0.3.10] - 2026-01-28

Added

v0.3.9

2026-01-06 · GitHub

[0.3.9] - 2026-01-05

Added

Changed

  • Loosen some of the types to allow more flexible usage (avoid type errors when DTOs/ViewModels/etc have VALUE|None typing but are known to be in a good state)
  • Refactor client implementation to improve organization and maintainability

v0.3.8

2025-10-22 · GitHub

Added

  • Support for subject parameter in transactional templates (PR #24)
  • FAQ section to README.md (PR #22)
  • Four new API methods to the public interface
  • CLAUDE.md with project overview, development commands, code style, and key patterns
  • WARP.md documentation
  • Ruff formatting configuration

Changed

  • Extensive type annotation improvements for better IDE support (PyLance/VS Code)
  • HTTP response validation and parsing refactored for better error handling
  • Headers type fix: now properly uses string values instead of list of dictionaries
  • Code formatting with ruff throughout the codebase
  • Documentation improvements in README.md

Fixed

  • Custom exception renamed from FileNotFoundError to ListmonkFileNotFoundError to avoid builtin conflict
  • Non-string to string types in __all__ exports
  • Type inference error in code fragments

Thanks @neilime and @obrizan for the PRs.

v0.3.7

2025-05-24 · GitHub

Restores custom header functionality for send_transactional_email() And create/delete list was, well, deleted.

It looks like this was some kind of failed merge, maybe. I’m not sure what happened here. Sorry folks.

v0.3.6

2025-05-20 · GitHub

Bump version to fix project definition. strenum wasn’t included in the pyproject.toml’s dependencies. No functional changes.

v0.3.5

2025-05-18 · GitHub

Add an optional timeout parameter (httpx.Timeout) for all network operations.

v0.3.4

2025-05-07 · GitHub

Adds new features from two recent PRs:

  • Allow to send headers to the /api/tx endpoint. https://github.com/mikeckennedy/listmonk/pull/20
  • Create and delete lists. https://github.com/mikeckennedy/listmonk/pull/19

v0.3.3

2024-12-01 · GitHub

Adds support for this library on Python 3.10 by replacing enum.StrEnum with github.com/irgeek/StrEnum.

v0.3.0

2024-11-12 · GitHub

Adds two new features:

  • 📨 Manage campaign (bulk) emails from the API.
  • 🎨 Edit and create templates to control the over all look and feel of campaigns.

Thank you @pastorhudson for the PRs.

v0.2.1

2024-10-29 · GitHub

This release updates the library to work with Listmonk 4.0+ which was released yesterday.

v0.1.8

2024-04-06 · GitHub

Bug fix: Searching for users with listmonk.all_subscribers() with a query parameter crashes (on the server, should be 400 but here’s the fix nonetheless).

v0.1.7

2024-02-02 · GitHub

Add ability to add attachments to transactional mails, see #5

v0.1.6

2024-01-29 · GitHub

Make from email option on transactional emails.

v0.1.5

2024-01-24 · GitHub

Loosen some pydantic constraints for some situations.

v0.1.4

2024-01-22 · GitHub

Added doc strings for most data and methods and specific exception types.

v0.1.3

2024-01-21 · GitHub

Fix bug where emails with a + wouldn’t work on retrieval.

v0.1.2

2024-01-21 · GitHub

Added opt-in / confirm subscription method.