mailerpress icon black white

Documentation

MailerPress public REST API

MailerPress API

v1.5.0

Complete REST API for MailerPress – WordPress Email Marketing Plugin. Supports multiple authentication methods including WordPress Application Passwords and Custom API Keys.

https://{domain}/wp-json/mailerpress/v1 — Production server

Authentication

applicationPassword http (basic)

WordPress Application Password (HTTP Basic Auth). Generate in Users > Profile.

apiKey apiKey

MailerPress API Key (starts with mpk_)

X-MailerPress-API-Key in header

apiSecret apiKey

MailerPress API Secret (starts with mps_)

X-MailerPress-API-Secret in header

Contacts

Contact management, notes, and statistics

GET /contacts/all List all contacts

Get paginated list of contacts with filtering and search

Parameters
NameInTypeDescription
pagedqueryintegerPage number
perPagesqueryintegerResults per page
searchquerystringSearch by email or contact ID
subscription_statusquerystringFilter by subscription status
listqueryintegerFilter by list ID
tagqueryintegerFilter by tag ID
orderbyquerystringSort field
orderquerystringSort direction
Responses
200Successful response
PropertyTypeDescription
postsarray<Contact>
pagesinteger
countinteger
401Unauthorized – Authentication required
PropertyTypeDescription
codestring
messagestring
dataobject
POST /contact Create or update contact

Create a new contact or update existing one by email

Request Body required
PropertyTypeDescription
email*string
first_namestring
last_namestring
statusstring
subscribed | unsubscribed | pending
tagsarray<object>
listsarray<object>
custom_fieldsobject
opt_in_sourcestring Default: "api"
Responses
200Contact created/updated successfully
PropertyTypeDescription
successboolean
messagestring
dataobject
400Bad Request – Invalid parameters
PropertyTypeDescription
codestring
messagestring
dataobject
DELETE /contact Delete contacts

Delete multiple contacts by IDs

Request Body required
PropertyTypeDescription
ids*array<integer>
Responses
200Contacts deleted successfully
PropertyTypeDescription
successboolean
messagestring
deleted_countinteger
PUT /contacts Bulk update contacts

Bulk update contacts (status, tags, lists, custom fields, profile data)

Request Body required
PropertyTypeDescription
idsarray<integer>
newStatusstring
subscribed | unsubscribed | pending
first_namestring
last_namestring
emailstring
tagsarray<object>
removeTagsarray<object>
listsarray<object>
removeListsarray<object>
custom_fieldsobject
Responses
200Contacts updated successfully
PropertyTypeDescription
successboolean
messagestring
PUT /contact/{id} Update single contact

Update a single contact by ID

Parameters
NameInTypeDescription
id*pathinteger
Request Body required
PropertyTypeDescription
emailstring
first_namestring
last_namestring
newStatusstring
subscribed | unsubscribed | pending
tagsarray<object>
removeTagsarray<object>
listsarray<object>
removeListsarray<object>
custom_fieldsobject
Responses
200Contact updated successfully
PropertyTypeDescription
successboolean
messagestring
404Not Found – Resource not found
PropertyTypeDescription
codestring
messagestring
dataobject
GET /contact/{contact_id}/activity Get contact activity

Get activity history for a specific contact

Parameters
NameInTypeDescription
contact_id*pathinteger
pagequeryinteger
Responses
200Contact activity list
GET /contact/{contact_id}/campaigns Get contact campaigns

Get campaigns associated with a specific contact

Parameters
NameInTypeDescription
contact_id*pathinteger
Responses
200Campaigns associated with the contact
GET /stats/{contact_id} Get contact stats

Get email engagement statistics for a specific contact

Parameters
NameInTypeDescription
contact_id*pathinteger
campaign_idqueryintegerOptional campaign ID to filter stats
Responses
200Contact engagement statistics
PropertyTypeDescription
total_openedinteger
total_clickedinteger
total_unsubscribedinteger
GET /contact-note/{contact_id} Get contact notes

Get all notes for a specific contact

Parameters
NameInTypeDescription
contact_id*pathinteger
Responses
200Contact notes
PropertyTypeDescription
successboolean
notesarray<ContactNote>
POST /contact/note Create contact note

Add a note to a contact

Request Body required
PropertyTypeDescription
contact_id*integer
content*string
Responses
200Note created successfully
PropertyTypeDescription
successboolean
noteContactNote
PUT /contact/note/{note_id} Update contact note

Update an existing contact note

Parameters
NameInTypeDescription
note_id*pathinteger
Request Body required
PropertyTypeDescription
content*string
Responses
200Note updated successfully
PropertyTypeDescription
successboolean
messagestring
DELETE /contact/note/{note_id} Delete contact note

Delete a contact note

Parameters
NameInTypeDescription
note_id*pathinteger
Responses
200Note deleted successfully
PropertyTypeDescription
successboolean
messagestring
GET /contact/check-email Check email existence

Check if an email address already exists in contacts

Parameters
NameInTypeDescription
email*querystring
exclude_idqueryintegerContact ID to exclude from the check
Responses
200Email check result
PropertyTypeDescription
existsboolean
POST /contact/export Export contacts

Export contacts to a downloadable file

Request Body required
PropertyTypeDescription
contact_idsarray<integer>
emailstringEmail to send the export link to
Responses
200Export initiated successfully

Campaigns

Campaign management, sending, and analytics

GET /campaigns List campaigns

Get paginated list of campaigns with filtering

Parameters
NameInTypeDescription
pagedqueryinteger
perPagesqueryinteger
searchquerystringSearch by campaign name
statusquerystringFilter by status (comma-separated)
campaign_typequerystringFilter by campaign type
orderbyquerystring
orderquerystring
Responses
200Successful response
PropertyTypeDescription
postsarray<Campaign>
pagesinteger
countinteger
POST /campaigns Create campaign

Create a new campaign

Request Body required
PropertyTypeDescription
title*string
campaign_typestring
newsletter | automated | automation | wp_email | wc_email
Default: "newsletter"
metaobject
automation_idinteger
step_idinteger
Responses
200Campaign created successfully
PropertyTypeDescription
successboolean
idinteger
messagestring
GET /campaign/{id} Get campaign

Get a single campaign by ID

Parameters
NameInTypeDescription
id*pathinteger
Responses
200Campaign data
PropertyTypeDescription
campaign_idinteger
namestring
subjectstring
statusstring
campaign_typestring
content_htmlstring
configobject
created_atstring
updated_atstring
404Not Found – Resource not found
PropertyTypeDescription
codestring
messagestring
dataobject
PUT /campaign/{id} Update campaign

Update a campaign's title and metadata

Parameters
NameInTypeDescription
id*pathinteger
Request Body
PropertyTypeDescription
titlestring
metaobject
Responses
200Campaign updated successfully
DELETE /campaign Delete campaigns

Delete multiple campaigns by IDs

Request Body required
PropertyTypeDescription
ids*array<integer>
Responses
200Campaigns deleted successfully
PropertyTypeDescription
successboolean
deleted_countinteger
GET /campaign-status Get campaign status

Get status and statistics for one or more campaigns

Parameters
NameInTypeDescription
ids*queryarrayCampaign IDs (array)
Responses
200Campaign status data
PUT /campaign/{id}/rename Rename campaign

Rename a campaign

Parameters
NameInTypeDescription
id*pathinteger
Request Body required
PropertyTypeDescription
title*string
Responses
200Campaign renamed successfully
PUT /campaign/status Update campaign status

Change the status of a campaign (draft, trash, etc.)

Request Body required
PropertyTypeDescription
id*integer
status*string
Responses
200Status updated successfully
POST /campaign/send_test Send test email

Send a test email for a campaign

Request Body required
PropertyTypeDescription
contacts*array<string>
htmlContent*string
subject*string
Responses
200Test email sent successfully
POST /campaign/count-audience Count audience

Count potential recipients based on targeting criteria

Request Body required
PropertyTypeDescription
tagsarray<integer>
listsarray<integer>
recipientTargetingstring
segmentobject
Responses
200Audience count
GET /campaign/batches Get campaign batches

Get send batches for a campaign

Parameters
NameInTypeDescription
id*queryintegerCampaign ID
pagedqueryinteger
perPagequeryinteger
Responses
200Campaign batches
PropertyTypeDescription
batchesarray
countinteger
pagesinteger
GET /batch-opened-contacts Get contacts who opened

Get paginated list of contacts who opened a batch email

Parameters
NameInTypeDescription
batch_id*queryinteger
searchquerystring
pagedqueryinteger
perPagequeryinteger
Responses
200Contacts who opened
PropertyTypeDescription
postsarray
countinteger
identified_countinteger
anonymous_countinteger
pagesinteger
GET /batch-clicked-contacts Get contacts who clicked

Get paginated list of contacts who clicked a link in a batch email

Parameters
NameInTypeDescription
batch_id*queryinteger
searchquerystring
pagedqueryinteger
perPagequeryinteger
Responses
200Contacts who clicked
PropertyTypeDescription
postsarray
countinteger
identified_countinteger
anonymous_countinteger
pagesinteger
GET /batch-unsubscribed-contacts Get contacts who unsubscribed

Get paginated list of contacts who unsubscribed from a batch email

Parameters
NameInTypeDescription
batch_id*queryinteger
searchquerystring
pagedqueryinteger
perPagequeryinteger
Responses
200Contacts who unsubscribed
PropertyTypeDescription
postsarray
countinteger
identified_countinteger
anonymous_countinteger
pagesinteger
GET /campaigns/{id}/logs Get campaign logs

Get send logs for a campaign

Parameters
NameInTypeDescription
id*pathinteger
pagequeryinteger
per_pagequeryinteger
statusquerystring
Responses
200Campaign send logs

Lists

Contact list management

GET /list List all lists

Get paginated list of contact lists

Parameters
NameInTypeDescription
pagedqueryinteger
perPagesqueryinteger
searchquerystring
orderbyquerystring
orderquerystring
Responses
200Successful response
PropertyTypeDescription
postsarray<ContactList>
pagesinteger
countinteger
POST /list Create list

Create a new contact list

Request Body required
PropertyTypeDescription
title*string
descriptionstring
Responses
200List created successfully
PropertyTypeDescription
idinteger
labelstring
descriptionstring
is_defaultinteger
DELETE /list Delete lists

Delete multiple lists by IDs

Request Body required
PropertyTypeDescription
ids*array<integer>
Responses
200Lists deleted successfully
PropertyTypeDescription
successboolean
messagestring
deleted_countinteger
GET /list/all Get all lists (no pagination)

Get all contact lists without pagination

Responses
200All lists
PUT /list/{id}/rename Rename list

Rename a contact list

Parameters
NameInTypeDescription
id*pathinteger
Request Body required
PropertyTypeDescription
title*string
descriptionstring
Responses
200List renamed successfully
PropertyTypeDescription
successboolean
messagestring
list_idinteger
PUT /list/{id}/set-default Set default list

Set a list as the default contact list

Parameters
NameInTypeDescription
id*pathinteger
Responses
200Default list updated
PropertyTypeDescription
successboolean
messagestring
list_idinteger

Tags

Contact tag management

GET /tags List all tags

Get paginated list of tags

Parameters
NameInTypeDescription
pagedqueryinteger
perPagesqueryinteger
searchquerystring
orderbyquerystring
orderquerystring
Responses
200Successful response
PropertyTypeDescription
postsarray<Tag>
pagesinteger
countinteger
POST /tags Create tag

Create a new tag

Request Body required
PropertyTypeDescription
name*string
Responses
200Tag created successfully
PropertyTypeDescription
idinteger
labelstring
DELETE /tag Delete tags

Delete multiple tags by IDs

Request Body required
PropertyTypeDescription
ids*array<integer>
Responses
200Tags deleted successfully
PropertyTypeDescription
successboolean
messagestring
deleted_countinteger
GET /tag/all Get all tags (no pagination)

Get all tags without pagination

Responses
200All tags
PUT /tag/{id}/rename Rename tag

Rename a tag

Parameters
NameInTypeDescription
id*pathinteger
Request Body required
PropertyTypeDescription
title*string
Responses
200Tag renamed successfully
PropertyTypeDescription
successboolean
messagestring

API Keys

API key management and permissions

GET /api-keys List API keys

Get paginated list of API keys

Parameters
NameInTypeDescription
pagedqueryinteger
perPagesqueryinteger
searchquerystring
statusquerystring
orderbyquerystring
orderquerystring
Responses
200API keys list
PropertyTypeDescription
postsarray<ApiKey>
countinteger
pageinteger
pagesinteger
POST /api-keys Create API key

Create a new API key. The key and secret are only shown once in the response.

Request Body required
PropertyTypeDescription
name*string
descriptionstring
permissionsarray<string>
rate_limit_requestsinteger Default: 1000
rate_limit_windowinteger Default: 3600
allowed_ipsarray<string>
expires_in_daysinteger Default: 0
Responses
201API key created successfully
PropertyTypeDescription
successboolean
messagestring
key_idinteger
api_keystring
api_secretstring
namestring
expires_atstring
PUT /api-keys/{key_id} Update API key

Update an API key's settings

Parameters
NameInTypeDescription
key_id*pathinteger
Request Body
PropertyTypeDescription
namestring
descriptionstring
permissionsarray<string>
rate_limit_requestsinteger
rate_limit_windowinteger
allowed_ipsarray<string>
Responses
200API key updated
PropertyTypeDescription
successboolean
messagestring
DELETE /api-keys/{key_id} Revoke API key

Revoke (soft delete) an API key. Use /api-keys/{key_id}/delete for permanent deletion.

Parameters
NameInTypeDescription
key_id*pathinteger
Responses
200API key revoked
PropertyTypeDescription
successboolean
messagestring
POST /api-keys/{key_id}/reactivate Reactivate API key

Reactivate a previously revoked API key

Parameters
NameInTypeDescription
key_id*pathinteger
Responses
200API key reactivated
PropertyTypeDescription
successboolean
messagestring
DELETE /api-keys/{key_id}/delete Permanently delete API key

Permanently delete an API key (cannot be undone)

Parameters
NameInTypeDescription
key_id*pathinteger
Responses
200API key permanently deleted
PropertyTypeDescription
successboolean
messagestring
GET /api-keys/{key_id}/stats Get API key stats

Get usage statistics for an API key

Parameters
NameInTypeDescription
key_id*pathinteger
Responses
200API key usage statistics
PropertyTypeDescription
key_idinteger
namestring
statusstring
request_countinteger
last_used_atstring
created_atstring
rate_limitobject
GET /api-keys/permissions List available permissions

Get all available API key permissions

Responses
200Available permissions
PropertyTypeDescription
permissionsarray<Permission>

Custom Fields

Contact custom field definitions

GET /custom-fields List custom field definitions

Get all custom field definitions for contacts

Responses
200Custom field definitions
PropertyTypeDescription
successboolean
fieldsarray<object>

Schemas

Contact
PropertyTypeDescription
contact_idinteger
idinteger
emailstring
first_namestring
last_namestring
subscription_statusstring
subscribed | unsubscribed | pending
created_atstring
updated_atstring
tagsarray<object>
contact_listsarray<object>
custom_fieldsarray<object>
CreateContactRequest
PropertyTypeDescription
email*string
first_namestring
last_namestring
statusstring
subscribed | unsubscribed | pending
tagsarray<object>
listsarray<object>
custom_fieldsobject
opt_in_sourcestring Default: "api"
UpdateContactsRequest
PropertyTypeDescription
idsarray<integer>
newStatusstring
subscribed | unsubscribed | pending
first_namestring
last_namestring
emailstring
tagsarray<object>
removeTagsarray<object>
listsarray<object>
removeListsarray<object>
custom_fieldsobject
ContactNote
PropertyTypeDescription
idinteger
contact_idinteger
contentstring
created_atstring
updated_atstring
Campaign
PropertyTypeDescription
idinteger
campaign_idinteger
namestring
subjectstring
statusstring
draft | sent | scheduled | sending | error | trash
campaign_typestring
newsletter | automated | automation | wp_email | wc_email
created_atstring
updated_atstring
CampaignDetail
PropertyTypeDescription
campaign_idinteger
namestring
subjectstring
statusstring
campaign_typestring
content_htmlstring
configobject
created_atstring
updated_atstring
CampaignStatus
PropertyTypeDescription
campaign_idinteger
titlestring
subjectstring
statusstring
batchobject
statisticsobject
ContactList
PropertyTypeDescription
list_idinteger
idinteger
namestring
descriptionstring
is_defaultinteger
0 | 1
contact_countinteger
created_atstring
Tag
PropertyTypeDescription
tag_idinteger
namestring
created_atstring
ApiKey
PropertyTypeDescription
key_idinteger
namestring
descriptionstring
permissionsarray<string>
statusstring
active | revoked | expired
rate_limit_requestsinteger
rate_limit_windowinteger
allowed_ipsarray<string>
request_countinteger
last_used_atstring
expires_atstring
created_atstring
updated_atstring
CreateApiKeyRequest
PropertyTypeDescription
name*string
descriptionstring
permissionsarray<string>
rate_limit_requestsinteger Default: 1000
rate_limit_windowinteger Default: 3600
allowed_ipsarray<string>
expires_in_daysinteger Default: 0
CreateApiKeyResponse
PropertyTypeDescription
successboolean
messagestring
key_idinteger
api_keystring
api_secretstring
namestring
expires_atstring
UpdateApiKeyRequest
PropertyTypeDescription
namestring
descriptionstring
permissionsarray<string>
rate_limit_requestsinteger
rate_limit_windowinteger
allowed_ipsarray<string>
Permission
PropertyTypeDescription
idstring
namestring
descriptionstring
Error
PropertyTypeDescription
codestring
messagestring
dataobject