Download the PHP package ucscode/php-listmonk without Composer
On this page you can find all versions of the php package ucscode/php-listmonk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ucscode/php-listmonk
More information about ucscode/php-listmonk
Files in ucscode/php-listmonk
Package php-listmonk
Short Description Listmonk API Implementation in PHP
License MIT
Homepage https://github.com/junisan/php-listmonk
Informations about the package php-listmonk
PHP Listmonk API
Implementation of the Listmonk API in PHP. It requires PHP >= 7.4.
A clean, object-oriented PHP client for the Listmonk API.
This package provides a structured and model-driven way to interact with a Listmonk instance, including:
- Subscriber management
- List management
- Campaign management
- Pagination handling
- Strongly typed models
It wraps the Listmonk REST API into dedicated services and models for predictable and maintainable usage.
Installation
Install via Composer:
Configuration
Initialize the API client with your Listmonk API URL and credentials:
Available Services
The client exposes three API services:
Each service contains methods specific to its domain.
Subscriber API
Create Subscriber
Returns a SubscriberModel with populated id and uuid if successful.
You may optionally pass:
Get Subscriber
By Email:
By ID:
Get All Subscribers (Paginated)
Returns a PaginatorModel.
List API
Create List
Returns a ListModel with id and uuid.
Get Lists
Get all lists:
Get list by ID:
Campaign API
Create Campaign
Get Campaigns
Get single campaign:
Change Campaign Status
Common statuses:
- draft
- scheduled
- running
- paused
- cancelled
Preview Campaign
Returns rendered HTML preview or null.
Models Overview
CampaignModel
Represents a Listmonk campaign.
Includes:
- Basic data (status, name, subject, body)
- Target lists (
listIds) - Tags
- Scheduling (
sendAt) - Advanced fields (
templateId,fromEmail, etc.) - Statistics (
views,clicks,bounces)
ListModel
Represents a subscriber list.
Key properties:
- name
- description
- isPublic
- optinSingle
- isActive
- tags
SubscriberModel
Represents a subscriber.
Key properties:
- name
- status
- attributes
- lists
Lists may be either:
- Array of list IDs
- Array of
ListSubscriptionModel
Pagination
Methods returning multiple results provide a PaginatorModel, which typically includes:
- Current page
- Per page
- Total records
- Data collection
Requirements
- PHP 8+
- PSR-18 HTTP client (optional but supported)
- Listmonk API access enabled