MailerPress public REST API

REST API of MailerPress, the email marketing plugin for WordPress. Every endpoint accepts a WordPress Application Password; the endpoints of the free plugin also accept an API key, limited to the scopes it was given. The Pro endpoints (segments, webhooks, A/B tests, resends, custom field management) accept Application Passwords only.

Base URL
https://{domain}/wp-json/mailerpress/v1 Your WordPress site{domain} Your WordPress domain โ€” Default: yoursite.com
Version
2.1.0

Authentication

  • applicationPassword HTTP basic

    WordPress Application Password (HTTP Basic). Generated under Users > Profile. Works on every endpoint, with the capabilities of the user.

  • apiKey API key in the X-MailerPress-API-Key header

    MailerPress API key (starts with mpk_), sent with its secret. Limited to the scopes it was given (see GET /api-keys/permissions); rate-limited per key, with 429 and Retry-After when exceeded. Not accepted by the Pro endpoints.

  • apiSecret API key in the X-MailerPress-API-Secret header

    MailerPress API secret (starts with mps_), always sent with the key.

Contacts

Contacts, their notes, activity and statistics

GET /contacts/all List contacts

Returns a paginated list of contacts with their tags, lists, custom fields and engagement totals.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • paged integer query

    Page number

    Default: 1

  • perPages integer query

    Results per page

    Default: 20

  • search string query

    Search by email or contact ID

  • subscription_status string query

    Filter by subscription status

    One of: subscribed, unsubscribed, pending

  • list array<object> query

    Filter by lists: objects holding an `id`

    Child attributes
    • id integer

  • tag array<object> query

    Filter by tags: objects holding an `id`

    Child attributes
    • id integer

  • segment array<object> query

    Pro โ€” filter by segments: objects holding an `id`

    Child attributes
    • id integer

  • engagement string query

    Filter by engagement level

    One of: engaged, unengaged, inactive

  • custom_fields object query

    Filter by custom field values, keyed by field key

  • orderby string query

    Sort field

  • order string query

    Sort direction

    One of: ASC, DESCDefault: DESC

Responses

200 The page of contacts

  • posts array<Contact>

  • pages integer

  • count integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /contacts List contacts of given tags and lists

Returns, without pagination, the contacts that belong to the given tags and lists.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • tags array<integer> query

    Tag ids

  • lists array<integer> query

    List ids

Responses

200 The contacts

array<Contact>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /contacts Update contacts in bulk

Updates several contacts at once: status, tags, lists, custom fields, profile data.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Request body required

  • ids array<integer>

    Contact ids to update; with `newStatus` alone, all contacts when empty

  • newStatus string

    One of: subscribed, unsubscribed, pending

  • email string (email)

  • first_name string

  • last_name string

  • tags array<object>

    Child attributes
    • id integer

  • removeTags array<object>

    Child attributes
    • id integer

  • lists array<object>

    Child attributes
    • id integer

  • removeLists array<object>

    Child attributes
    • id integer

  • custom_fields array<object>

    Child attributes
    • field_key string

    • field_value string

Responses

200 Contacts updated

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /contact Create or update a contact

Creates a contact, or updates the one that already has this email. Also the endpoint the subscription forms post to: with an API key the `contacts:write` scope is required, and the submission is trusted (no double opt-in, fields overwritten). Rate-limited per IP.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Request body required

  • email string (email) required

  • first_name string

  • last_name string

  • subscription_status string

    One of: subscribed, unsubscribed, pending

  • tags array<object>

    Objects holding a tag `id`

    Child attributes
    • id integer

  • lists array<object>

    Objects holding a list `id`; the default list when empty

    Child attributes
    • id integer

  • custom_fields object

    Values keyed by field key

  • opt_in_source string

    Default: unknown

  • optin_details string

  • lang string

    Language code, for multilingual sites

Responses

200 Contact created or updated

  • success boolean

  • message string

  • contact_id integer

  • data object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

429 Too many requests โ€” the rate limit of the API key is exceeded; Retry-After gives the seconds to wait

Error

DELETE /contact Delete contacts

Deletes the given contacts and everything attached to them.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Request body required

  • ids array<integer> required

Responses

200 Contacts deleted

  • success boolean

  • message string

  • deleted_contacts array<integer>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /contact/{id} Update a contact

Updates one contact by id.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Parameters

  • id integer path required

Request body required

  • email string (email)

  • first_name string

  • last_name string

  • newStatus string

    One of: subscribed, unsubscribed, pending

  • tags array<object>

    Child attributes
    • id integer

  • removeTags array<object>

    Child attributes
    • id integer

  • lists array<object>

    Child attributes
    • id integer

  • removeLists array<object>

    Child attributes
    • id integer

  • custom_fields array<object>

    Child attributes
    • field_key string

    • field_value string

Responses

200 Contact updated

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /contact/all Delete every contact

Deletes all contacts. Above 20 000 contacts the deletion runs in the background and a batch id is returned.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Responses

200 Contacts deleted, or the deletion batch created

  • message string

  • deleted integer

  • batch_id integer

  • total_contacts integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /contact/list/{id} Remove a contact from a list

Detaches a list from a contact.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Parameters

  • id integer path required

    Contact id

Request body required

  • listId integer required

Responses

200 Result

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /contact/tag/{id} Remove a tag from a contact

Detaches a tag from a contact.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Parameters

  • id integer path required

    Contact id

Request body required

  • tagId integer required

Responses

200 Result

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /contact/check-email Check whether an email exists

Tells whether a contact already has this email address.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • email string (email) query required

  • exclude_id integer query

    Contact id to leave out of the check

Responses

200 Result

  • exists boolean

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /contact/{contact_id}/activity Contact activity

Returns the activity of a contact (sent, opened, clicked, unsubscribed), grouped by campaign, four campaigns per page.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • contact_id integer path required

  • page integer query

    Page number

    Default: 1

Responses

200 The activity

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /contact/{contact_id}/campaigns Campaigns of a contact

Returns the campaigns a contact received.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • contact_id integer path required

Responses

200 The campaigns

  • campaign_id integer

  • name string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /stats/{contact_id} Contact statistics

Returns the email engagement totals of a contact, optionally for one campaign.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • contact_id integer path required

  • campaign_id integer query

    Restrict the totals to this campaign

Responses

200 The totals

  • total_opened integer

  • total_clicked integer

  • total_unsubscribed integer

  • last_activity string (date-time)

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /contact-note/{contact_id} Notes of a contact

Returns the notes attached to a contact.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • contact_id integer path required

Responses

200 The notes

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /contact/note Add a note to a contact

Adds a note to a contact.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Request body required

  • contact_id integer required

  • content string required

Responses

200 Note created

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /contact/note/{note_id} Update a note

Updates the content of a note.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Parameters

  • note_id integer path required

Request body required

  • content string required

Responses

200 Note updated

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /contact/note/{note_id} Delete a note

Deletes a note.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Parameters

  • note_id integer path required

Responses

200 Note deleted

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /contact/{id}/confirm Confirm a pending contact

Marks a pending contact as subscribed, as if it had clicked the confirmation link.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Parameters

  • id integer path required

Responses

200 Contact confirmed

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /contact/{id}/send-confirmation-reminder Resend the confirmation email

Sends the double opt-in confirmation email again to a pending contact.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Parameters

  • id integer path required

Responses

200 Email sent

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /contact/export Export contacts

Starts an export of the given contacts, or of all of them, to a file. The download link is emailed to the given address.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Request body required

  • contact_ids array<integer>

    Contacts to export; all of them when empty

  • email string (email) required

Responses

200 Export started

  • success boolean

  • message string

  • export_id string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /contacts/import/init Start a contact import

Creates an import batch. Then send the rows with POST /contacts/import/chunk and follow it with GET /contacts/import/progress/{batch_id}.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Request body required

  • data object required

    Child attributes
    • status string

      Subscription status given to the imported contacts

      One of: subscribed, unsubscribed, pendingDefault: pending

    • tags array<object>

      Child attributes
      • id integer

    • lists array<object>

      Child attributes
      • id integer

    • forceUpdate boolean

      Overwrite the contacts that already exist

      Default: false

Responses

200 Batch created

  • success boolean

  • batch_id integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /contacts/import/chunk Add rows to an import

Adds contacts to an import batch and schedules their processing.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Request body required

  • batch_id integer required

  • chunk array<object> required

    The contacts to import

    Child attributes
    • email string (email) required

    • first_name string

    • last_name string

  • forceUpdate boolean

Responses

200 Rows queued

  • success boolean

  • chunk_ids array<integer>

  • contacts_count integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /contacts/import/progress/{batch_id} Import progress

Returns the progress of an import batch.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • batch_id integer path required

Responses

200 The progress

  • batch_id integer

  • status string

    One of: pending, processing, completed, failed

  • total_contacts integer

  • processed_contacts integer

  • progress_percentage number

  • chunks object

    Child attributes
    • total integer

    • pending integer

    • processing integer

    • completed integer

    • failed integer

  • created_at string (date-time)

  • updated_at string (date-time)

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /contacts/import/retry/{batch_id} Retry the failed rows of an import

Queues the failed chunks of an import batch again.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Parameters

  • batch_id integer path required

Responses

200 Chunks queued

  • success boolean

  • message string

  • retried_count integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /contacts/import/reset Cancel an import

Deletes an import batch and its pending work.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Request body required

  • batch_id integer required

Responses

200 Batch deleted

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /contact/import Import one contact

Creates or updates one contact from an import row, with its tags, lists and custom fields.

Authorization applicationPassword or apiKey (contacts:write) + apiSecret

Request body required

  • item object required

    Child attributes
    • email string (email) required

    • first_name string

    • last_name string

  • status string

    One of: subscribed, unsubscribed, pendingDefault: pending

  • tags array<object>

    Child attributes
    • id integer

  • lists array<object>

    Child attributes
    • id integer

  • forceUpdate boolean

Responses

200 Contact imported

object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

Campaigns

Campaigns: content, sending, status and statistics

GET /campaigns List campaigns

Returns a paginated list of campaigns with their batch and statistics.

Authorization applicationPassword or apiKey (campaigns:read) + apiSecret

Parameters

  • paged integer query

    Page number

    Default: 1

  • perPages integer query

    Results per page

    Default: 10

  • search string query

    Search by campaign name

  • status string query

    Statuses, comma-separated; `mine` keeps the current userโ€™s campaigns

  • campaign_type array<object> query

    Campaign types: objects holding an `id`

    Child attributes
    • id string

      One of: newsletter, ab_test, automated, automation, wp_email, wc_email, confirm_email

  • orderby string query

    Sort field

  • order string query

    Sort direction

    One of: ASC, DESCDefault: DESC

Responses

200 The page of campaigns

  • posts array<Campaign>

  • pages integer

  • count integer

  • current_page integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /campaigns Create a campaign

Creates a draft campaign. Returns its id.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

  • title string required

  • campaign_type string

    One of: newsletter, ab_test, automated, automation, wp_email, wc_email, confirm_emailDefault: newsletter

  • meta object

    Child attributes
    • emailConfig object

      Child attributes
      • campaignSubject string

      • email_type string

        One of: html, textDefault: html

  • automation_id integer

    For an `automation` campaign: the workflow it belongs to

  • step_id string

    For an `automation` campaign: the step it is sent by

Responses

201 The id of the new campaign

integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /campaign/{id} Read a campaign

Returns a campaign with its editor document and configuration.

Authorization applicationPassword or apiKey (campaigns:read) + apiSecret

Parameters

  • id integer path required

Responses

200 The campaign

CampaignDetail

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /campaign/{id} Update a campaign

Updates the title and status of a campaign, and marks it as being edited by the caller.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Parameters

  • id integer path required

Request body required

  • title string

  • meta object

    Child attributes
    • status string

Responses

200 Campaign updated

  • success boolean

  • message string

  • campaign_id integer

  • updated_data object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /campaign/{id}/rename Rename a campaign

Renames a campaign.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Parameters

  • id integer path required

Request body required

  • title string required

Responses

200 Campaign renamed

  • success boolean

  • message string

  • campaign_id integer

  • new_title string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /campaign/{id}/settings Update the email settings of a campaign

Updates the subject, sender and other email settings of a campaign.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Parameters

  • id integer path required

Request body required

  • emailConfig object required

    Child attributes
    • campaignSubject string

    • fromName string

    • fromTo string (email)

    • replyTo string (email)

    • preheader string

Responses

200 Settings updated

  • success boolean

  • campaign_id integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /campaign/save-content/{id} Save the content of a campaign

Saves the editor document and the rendered HTML of a campaign. 423 when another user is editing it.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Parameters

  • id integer path required

Request body required

  • content string

    The editor document (JSON)

  • html string

    The rendered HTML

Responses

200 Content saved

  • success boolean

  • message string

  • campaign_id integer

  • updated_data object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

423 The campaign is locked by another user

Error

PUT /campaign/status Change the status of campaigns

Changes the status of one, several or all campaigns (`id` = `all`, optionally narrowed by `campaign_type`, `filter_status` and `search`). Moving to `trash` requires the delete permission.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

  • id integer | array<integer> | all required

    A campaign id, several, or `all`

  • status string required

    One of: draft, scheduled, sending, sent, paused, cancelled, trash

  • campaign_type array<object>

    Child attributes
    • id string

  • filter_status string

    With `all`: only the campaigns in this status

  • search string

    With `all`: only the campaigns matching this text

Responses

200 Statuses updated

  • success boolean

  • message string

  • updated_ids array<integer>

  • new_status string

  • scheduled_actions_cancelled integer

  • automated_campaigns_restored integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /campaign Delete campaigns

Permanently deletes the given campaigns, their batches and their scheduled sends.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

  • ids array<integer> required

Responses

200 Campaigns deleted

  • message string

  • ids array<integer>

  • scheduled_actions_cancelled integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /campaign/delete Empty the trash

Permanently deletes trashed campaigns: the given ids, or all of them with `id` = `all`.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

  • id integer | array<integer> | all required

  • campaign_type array<object>

    Child attributes
    • id string

  • filter_status string

  • search string

Responses

200 Campaigns deleted

  • success boolean

  • message string

  • deleted_ids array<integer>

  • deleted_batches integer

  • scheduled_actions_cancelled integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /campaign/all Empty the trash of given types

Permanently deletes every trashed campaign of the given types.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

  • campaign_type array<object> required

    Child attributes
    • id string

    • name string

Responses

200 Campaigns deleted

  • message string

  • deleted_campaigns integer

  • deleted_batches integer

  • scheduled_actions_cancelled integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /campaign/create_batch_V2 Send or schedule a campaign

Creates the send batch of a campaign: the recipients are resolved from the targeting, the HTML stored, and the sending queued now or at `scheduledAt`. 409 when the campaign was already sent or a batch is already running.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

  • recipientTargeting string

    How the recipients are chosen

    One of: classic, segment, contact_idsDefault: classic

  • lists array<object>

    With `classic`: the lists to send to

    Child attributes
    • id integer

  • tags array<object>

    With `classic`: the tags to send to

    Child attributes
    • id integer

  • segment array<object>

    With `segment`: one object holding the segment id; with `contact_ids`: the contact ids

  • postEdit integer required

    The campaign id

  • sendType string required

    `now` sends at once, `future` at `scheduledAt`

    One of: now, future

  • scheduledAt string

    Date and time in the siteโ€™s timezone, `Y-m-d H:i:s` or ISO 8601

  • html string required

    The rendered HTML to send

  • config SenderConfig required

  • openTracking string

    One of: yes, noDefault: yes

  • clickTracking string

    One of: yes, noDefault: yes

Responses

200 Batch created

array<string>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

409 Already sent, or a batch is already scheduled

Error

422 The scheduled date is invalid or in the past

Error

POST /campaign/pause_batch Pause a send

Cancels the queued work of a batch and puts the campaign back to draft.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

  • batchId integer required

  • campaignId integer required

Responses

200 Batch paused

  • batchId integer

  • campaignId integer

  • chunks_deleted integer

  • batch_email_actions_cancelled integer

  • status string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /campaign/resume_batch Resume a send

Puts a paused batch back to pending.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

  • batchId integer required

Responses

200 Batch resumed

array<string>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /campaign/send_test Send a test email

Sends the given HTML as a test email to the given addresses.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

  • contacts array<string (email)> required

  • htmlContent string required

  • subject string required

  • config object

    Child attributes
    • fromName string

    • fromTo string (email)

Responses

200 Result per address

  • status string

    One of: success, partial

  • sent array<string>

  • errors array<object>

    Child attributes
    • contact string

    • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /campaign/count-audience Count an audience

Counts the recipients a targeting resolves to.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

AudienceTargeting

Responses

200 The count

  • count integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /campaign-status Status and statistics of campaigns

Returns the status, batch and statistics of one or more campaigns.

Authorization applicationPassword or apiKey (campaigns:read) + apiSecret

Parameters

  • ids string query required

    Campaign ids, comma-separated

Responses

200 The campaigns

array<CampaignStatus>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /campaign/{id}/status Editing lock of a campaign

Tells whether another user is editing the campaign.

Authorization applicationPassword or apiKey (campaigns:read) + apiSecret

Parameters

  • id integer path required

Responses

200 The lock

  • locked boolean

  • user_id integer

  • user_name string

  • timestamp string (date-time)

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /campaign/batches Send batches of a campaign

Returns the send batches of a campaign with their statistics.

Authorization applicationPassword or apiKey (campaigns:read) + apiSecret

Parameters

  • id integer query required

    Campaign id

  • paged integer query

    Page number

    Default: 1

  • perPage integer query

    Results per page

    Default: 10

Responses

200 The batches

  • posts array<object>

    Child attributes
  • pages integer

  • count integer

  • current_page integer

  • per_page integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /batch/{batch_id}/chunks Chunks of a batch

Returns the chunks a batch is sent in, with their status.

Authorization applicationPassword or apiKey (campaigns:read) + apiSecret

Parameters

  • batch_id integer path required

  • page integer query

    Page number

    Default: 1

  • per_page integer query

    Results per page

    Default: 50

  • status string query

    Filter by chunk status

    One of: pending, processing, completed, failed

  • orderby string query

    Default: chunk_index

  • order string query

    One of: ASC, DESCDefault: ASC

Responses

200 The chunks

  • chunks array<object>

    Child attributes
    • id integer

    • batch_id integer

    • chunk_index integer

    • status string

    • contacts_count integer

    • processed_at string (date-time)

  • count integer

  • pages integer

  • current_page integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /batch-opened-contacts Contacts who opened

Returns a paginated list of the contacts who opened a batch email.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • batch_id integer query required

  • paged integer query

    Page number

    Default: 1

  • perPage integer query

    Results per page

    Default: 10

  • search string query

    Search text

Responses

200 The contacts

  • posts array<Contact>

  • count integer

  • identified_count integer

  • anonymous_count integer

  • pages integer

  • current_page integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /batch-clicked-contacts Contacts who clicked

Returns a paginated list of the contacts who clicked a link in a batch email.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • batch_id integer query required

  • paged integer query

    Page number

    Default: 1

  • perPage integer query

    Results per page

    Default: 10

  • search string query

    Search text

Responses

200 The contacts

  • posts array<Contact>

  • count integer

  • identified_count integer

  • anonymous_count integer

  • pages integer

  • current_page integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /batch-unsubscribed-contacts Contacts who unsubscribed

Returns a paginated list of the contacts who unsubscribed from a batch email.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • batch_id integer query required

  • paged integer query

    Page number

    Default: 1

  • perPage integer query

    Results per page

    Default: 10

  • search string query

    Search text

Responses

200 The contacts

  • posts array<Contact>

  • count integer

  • identified_count integer

  • anonymous_count integer

  • pages integer

  • current_page integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /campaigns/{id}/logs Send logs of a campaign

Returns, per contact, what happened to the email of a campaign.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • id integer path required

  • page integer query

    Page number

    Default: 1

  • per_page integer query

    Results per page

    Default: 50

  • status string query

    Filter by status

    One of: sent, opened, clicked, unsubscribed, failed

Responses

200 The logs

  • logs array<CampaignLog>

  • count integer

  • pages integer

  • page integer

  • per_page integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /campaigns/{id}/email-logs Delivery logs of a campaign

Returns the delivery log of a campaign as the email service recorded it.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Parameters

  • id integer path required

  • page integer query

    Page number

    Default: 1

  • per_page integer query

    Results per page

    Default: 50

  • status string query

    One of: success, error, pending

Responses

200 The logs

  • logs array<EmailLog>

  • count integer

  • pages integer

  • page integer

  • per_page integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /campaign/{id}/activate Activate an automated campaign

Activates an `automated` campaign (recurring or triggered send).

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Parameters

  • id integer path required

Responses

200 Campaign activated

  • campaignId integer

  • status string

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /campaign/{id}/deactivate Deactivate an automated campaign

Deactivates an `automated` campaign and cancels its scheduled sends.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Parameters

  • id integer path required

Responses

200 Campaign deactivated

  • campaignId integer

  • status string

  • scheduledActionsCancelled integer

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /campaign/create_automated_campaign Set up an automated campaign

Stores the HTML, targeting and schedule of an `automated` campaign and activates it.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

  • recipientTargeting string

    How the recipients are chosen

    One of: classic, segment, contact_idsDefault: classic

  • lists array<object>

    With `classic`: the lists to send to

    Child attributes
    • id integer

  • tags array<object>

    With `classic`: the tags to send to

    Child attributes
    • id integer

  • segment array<object>

    With `segment`: one object holding the segment id; with `contact_ids`: the contact ids

  • postEdit integer required

    The campaign id

  • sendType string

  • scheduledAt string

  • html string required

  • config SenderConfig required

  • automateSettings object

    The recurrence or trigger settings

Responses

200 Campaign set up

array<string>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /campaign/update_automated_campaign Update an automated campaign

Updates the HTML and settings of an `automated` campaign.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Request body required

  • campaignId integer required

  • html string

  • data object

    The settings to merge

Responses

200 Campaign updated

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /campaign/{id}/revisions Revisions of a campaign

Returns the saved revisions of a campaignโ€™s editor document.

Authorization applicationPassword or apiKey (campaigns:read) + apiSecret

Parameters

  • id integer path required

Responses

200 The revisions

array<CampaignRevision>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /campaign/{id}/revision/{revision_id} Read a revision

Returns one revision.

Authorization applicationPassword or apiKey (campaigns:read) + apiSecret

Parameters

  • id integer path required

  • revision_id integer path required

Responses

200 The revision

CampaignRevision

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /campaign/revision/{id} Save a revision

Saves the given editor document as a revision, when it differs from the last one. Five revisions are kept.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Parameters

  • id integer path required

Request body required

  • json object required

    The editor document

Responses

200 Result

  • success boolean

  • message string

  • revision_id integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /campaign/{id}/restore-revision/{revision_id} Restore a revision

Puts a revision back as the campaignโ€™s content.

Authorization applicationPassword or apiKey (campaigns:write) + apiSecret

Parameters

  • id integer path required

  • revision_id integer path required

Responses

200 Revision restored

  • success boolean

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /campaign/{id}/resend-unengaged Resend to the contacts who did not engage

Pro โ€” creates a copy of a sent newsletter and sends it to the contacts who did not open it, did not click, or neither.

Authorization applicationPassword

Parameters

  • id integer path required

Request body

  • mode string

    One of: unengaged, not_opened, not_clickedDefault: unengaged

  • title string

    Name of the new campaign

Responses

200 The resend campaign and its batch

  • campaign_id integer

  • batch_id integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

422 The campaign cannot be resent (not sent, not a newsletter, no open tracking)

Error

Lists

Contact lists

GET /list List lists

Returns a paginated list of contact lists.

Authorization applicationPassword or apiKey (lists:read) + apiSecret

Parameters

  • paged integer query

    Page number

    Default: 1

  • perPages integer query

    Results per page

    Default: 20

  • search string query

    Search text

  • orderby string query

    Sort field

  • order string query

    Sort direction

    One of: ASC, DESCDefault: DESC

Responses

200 The page of lists

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /list Create a list

Creates a contact list. 409 when the name is taken.

Authorization applicationPassword or apiKey (lists:write) + apiSecret

Request body required

  • title string required

  • description string

Responses

200 List created

  • id integer

  • label string

  • description string

  • is_default boolean

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

409 A list with this name exists

Error

DELETE /list Delete lists

Deletes the given lists. The default list is skipped.

Authorization applicationPassword or apiKey (lists:write) + apiSecret

Request body required

  • ids array<integer> required

Responses

200 Lists deleted

  • success boolean

  • message string

  • deleted_count integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /list/all All lists

Returns every list, without pagination.

Authorization applicationPassword or apiKey (lists:read) + apiSecret

Responses

200 The lists

  • id integer

  • name string

  • is_default integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /list/all Delete every list

Deletes all lists.

Authorization applicationPassword or apiKey (lists:write) + apiSecret

Responses

200 Lists deleted

  • message string

  • deleted integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /list/{id}/rename Rename a list

Renames a list and updates its description.

Authorization applicationPassword or apiKey (lists:write) + apiSecret

Parameters

  • id integer path required

Request body required

  • title string required

  • description string

Responses

200 List updated

  • success boolean

  • message string

  • list_id integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /list/{id}/set-default Set the default list

Makes a list the one new contacts join when no list is given.

Authorization applicationPassword or apiKey (lists:write) + apiSecret

Parameters

  • id integer path required

Responses

200 Default list updated

  • success boolean

  • message string

  • list_id integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

Tags

Contact tags

GET /tags List tags

Returns a paginated list of tags.

Authorization applicationPassword or apiKey (tags:read) + apiSecret

Parameters

  • paged integer query

    Page number

    Default: 1

  • perPages integer query

    Results per page

    Default: 20

  • search string query

    Search text

  • orderby string query

    Sort field

  • order string query

    Sort direction

    One of: ASC, DESCDefault: DESC

Responses

200 The page of tags

  • posts array<Tag>

  • pages integer

  • count integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /tags Create a tag

Creates a tag. 409 when the name is taken.

Authorization applicationPassword or apiKey (tags:write) + apiSecret

Request body required

  • name string required

Responses

200 Tag created

  • id integer

  • label string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

409 A tag with this name exists

Error

GET /tag/all All tags

Returns every tag, without pagination.

Authorization applicationPassword or apiKey (tags:read) + apiSecret

Responses

200 The tags

array<Tag>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /tag/all Delete every tag

Deletes all tags.

Authorization applicationPassword or apiKey (tags:write) + apiSecret

Responses

200 Tags deleted

  • message string

  • deleted integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /tag/{id}/rename Rename a tag

Renames a tag.

Authorization applicationPassword or apiKey (tags:write) + apiSecret

Parameters

  • id integer path required

Request body required

  • title string required

Responses

200 Tag renamed

  • success boolean

  • message string

  • list_id integer

    The tag id (the key is named list_id)

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /tag Delete tags

Deletes the given tags.

Authorization applicationPassword or apiKey (tags:write) + apiSecret

Request body required

  • ids array<integer> required

Responses

200 Tags deleted

  • success boolean

  • message string

  • deleted_count integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

Custom Fields

Custom field definitions of the contacts (creating, renaming and deleting them requires MailerPress Pro)

GET /custom-field/all List custom fields

Returns every custom field definition.

Authorization applicationPassword or apiKey (contacts:read) + apiSecret

Responses

200 The definitions

array<CustomFieldDefinition>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /custom-field Create a custom field

Creates a custom field; the key is derived from the label. Returns the existing field when the key is taken.

Authorization applicationPassword or apiKey (settings:write) + apiSecret

Request body required

  • label string required

  • type string

    One of: text, number, date, checkbox, selectDefault: text

Responses

200 The field

  • id integer

  • field_key string

  • label string

  • type string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /custom-fields Create a custom field with options

Pro โ€” creates a custom field with an explicit key, options and required flag.

Authorization applicationPassword

Request body required

  • field_key string required

  • label string required

  • type string required

    One of: text, number, date, checkbox, select

  • options array<object>

    Child attributes
    • label string

    • value string

  • required boolean

Responses

200 The field

  • success boolean

  • id integer

  • field_key string

  • label string

  • type string

  • required boolean

  • options array<object>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /custom-fields Delete custom fields

Pro โ€” deletes several custom fields by id or key.

Authorization applicationPassword

Request body required

  • ids array<integer>

  • field_keys array<string>

Responses

200 Fields deleted

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /custom-fields/{field_key} Update a custom field

Pro โ€” updates a custom field; a new `field_key` renames it and moves the contactsโ€™ values.

Authorization applicationPassword

Parameters

  • field_key string path required

Request body required

  • field_key string

  • label string

  • type string

    One of: text, number, date, checkbox, select

  • options array<object>

    Child attributes
    • label string

    • value string

  • required boolean

Responses

200 The field

  • success boolean

  • id integer

  • field_key string

  • label string

  • type string

  • required boolean

  • options array<object>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /custom-fields/{field_key} Delete a custom field

Pro โ€” deletes a custom field and the contactsโ€™ values for it.

Authorization applicationPassword

Parameters

  • field_key string path required

Responses

200 Result

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

API Keys

API keys, their scopes and rate limits (settings:* scope, i.e. the *:* permission)

GET /api-keys List API keys

Returns a paginated list of the API keys.

Authorization applicationPassword or apiKey (settings:read) + apiSecret

Parameters

  • paged integer query

    Page number

    Default: 1

  • perPages integer query

    Results per page

    Default: 20

  • search string query

    Search text

  • status string query

    One of: active, revoked, expired

  • orderby string query

    One of: created_at, name, last_used_at, request_countDefault: created_at

  • order string query

    One of: ASC, DESCDefault: DESC

Responses

200 The page of keys

  • posts array<ApiKey>

  • count integer

  • page integer

  • pages integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /api-keys Create an API key

Creates an API key. The key and the secret are only returned here, once.

Authorization applicationPassword or apiKey (settings:write) + apiSecret

Request body required

  • name string required

  • description string

  • permissions array<string>

    Scopes, from GET /api-keys/permissions

  • rate_limit_requests integer

    Requests allowed per window

    Default: 1000

  • rate_limit_window integer

    Window in seconds

    Default: 3600

  • allowed_ips array<string>

    IPs allowed to use the key; empty for any

  • expires_in_days integer

    Days until the key expires; 0 for never

    Default: 0

Responses

200 The new key and its secret

  • success boolean

  • message string

  • key_id integer

  • api_key string

    Example: mpk_โ€ฆ

  • api_secret string

    Example: mps_โ€ฆ

  • name string

  • expires_at string (date-time), nullable

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /api-keys/{key_id} Update an API key

Updates the name, description, scopes, rate limit or allowed IPs of a key.

Authorization applicationPassword or apiKey (settings:write) + apiSecret

Parameters

  • key_id integer path required

Request body required

ApiKeyInput

Responses

200 Key updated

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /api-keys/{key_id} Revoke an API key

Revokes a key: it stops working but stays listed. DELETE /api-keys/{key_id}/delete removes it for good.

Authorization applicationPassword or apiKey (settings:write) + apiSecret

Parameters

  • key_id integer path required

Responses

200 Key revoked

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /api-keys/{key_id}/reactivate Reactivate an API key

Reactivates a revoked key.

Authorization applicationPassword or apiKey (settings:write) + apiSecret

Parameters

  • key_id integer path required

Responses

200 Key reactivated

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /api-keys/{key_id}/delete Delete an API key

Permanently deletes a key.

Authorization applicationPassword or apiKey (settings:write) + apiSecret

Parameters

  • key_id integer path required

Responses

200 Key deleted

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /api-keys/{key_id}/stats Usage of an API key

Returns the request count, last use and rate limit of a key.

Authorization applicationPassword or apiKey (settings:read) + apiSecret

Parameters

  • key_id integer path required

Responses

200 The usage

  • key_id integer

  • name string

  • status string

  • request_count integer

  • last_used_at string (date-time)

  • created_at string (date-time)

  • rate_limit object

    Child attributes
    • requests integer

    • window integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /api-keys/permissions Available permissions

Returns the scopes an API key can be given.

Authorization applicationPassword or apiKey (settings:read) + apiSecret

Responses

200 The permissions

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

Templates

Email templates and their categories (templates:* scope, i.e. the *:* permission)

GET /templates/all List templates

Returns a paginated list of templates.

Authorization applicationPassword or apiKey (templates:read) + apiSecret

Parameters

  • paged integer query

    Page number

    Default: 1

  • perPages integer query

    Results per page

    Default: 20

  • search string query

    Search text

  • category integer query

    Category id

  • categories array<integer> query

    Category ids

  • usage_type string query

    One of: newsletter, automation

  • internal boolean query

    Only the built-in templates

  • orderby string query

    Sort field

  • order string query

    Sort direction

    One of: ASC, DESCDefault: DESC

Responses

200 The page of templates

  • posts array<Template>

  • pages integer

  • count integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /template Create a template

Creates a template; unknown category names are created.

Authorization applicationPassword or apiKey (templates:write) + apiSecret

Request body required

  • templateName string required

  • templateCategory array<string>

  • templateJSON string required

    The editor document

  • usage_type string

    One of: newsletter, automationDefault: newsletter

Responses

200 Template created

  • status string

  • message string

  • template_id integer

  • categories array<integer>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /template/{id} Read a template

Returns a template with its content.

Authorization applicationPassword or apiKey (templates:read) + apiSecret

Parameters

  • id integer path required

Responses

200 The template

Template

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /template/{id} Update a template

Updates the name, categories and usage type of a template.

Authorization applicationPassword or apiKey (templates:write) + apiSecret

Parameters

  • id integer path required

Request body required

  • templateName string required

  • templateCategory array<string>

  • usage_type string

    One of: newsletter, automation

Responses

200 Template updated

  • status string

  • message string

  • template_id integer

  • categories array<integer>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /template/{id}/content Update the content of a template

Replaces the editor document of a template.

Authorization applicationPassword or apiKey (templates:write) + apiSecret

Parameters

  • id integer path required

Request body required

  • content string required

    The editor document

Responses

200 Content updated

  • status string

  • message string

  • template_id integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /templates/{id} Delete a template

Deletes a template.

Authorization applicationPassword or apiKey (templates:write) + apiSecret

Parameters

  • id integer path required

Responses

200 Template deleted

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /categories/all Template categories

Returns the template categories.

Authorization applicationPassword or apiKey (templates:read) + apiSecret

Parameters

  • usage_type string query

    One of: newsletter, automation

Responses

200 The categories

  • label string

  • value string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /category/rename Rename a category

Renames a template category.

Authorization applicationPassword or apiKey (templates:write) + apiSecret

Request body required

  • current_name string required

  • new_name string required

Responses

200 Category renamed

  • status string

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

409 A category with this name exists

Error

DELETE /category/delete Delete a category

Deletes a template category.

Authorization applicationPassword or apiKey (templates:write) + apiSecret

Request body required

  • name string required

Responses

200 Category deleted

  • status string

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

Automations

Workflows: their steps, status, jobs and logs (automations:* scope, i.e. the *:* permission)

GET /workflows List workflows

Returns a paginated list of workflows with their job statistics.

Authorization applicationPassword or apiKey (automations:read) + apiSecret

Parameters

  • paged integer query

    Page number

    Default: 1

  • perPages integer query

    Results per page

    Default: 20

  • search string query

    Search text

  • status string query

    One of: DRAFT, ENABLED, DISABLED

  • trigger_type string query

    Filter by trigger key

  • orderby string query

    One of: name, id, created_at, updated_atDefault: updated_at

  • order string query

    One of: ASC, DESCDefault: DESC

Responses

200 The page of workflows

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /workflows Create a workflow

Creates a workflow from its steps, or from a template.

Authorization applicationPassword or apiKey (automations:write) + apiSecret

Request body required

AutomationInput

Responses

200 The workflow

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /workflows/{id} Read a workflow

Returns a workflow and its steps.

Authorization applicationPassword or apiKey (automations:read) + apiSecret

Parameters

  • id integer path required

Responses

200 The workflow

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /workflows/{id} Update a workflow

Replaces the settings and steps of a workflow. 400 with the list of errors when a step is invalid.

Authorization applicationPassword or apiKey (automations:write) + apiSecret

Parameters

  • id integer path required

Request body required

AutomationInput

Responses

200 The workflow

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /workflows/{id} Delete a workflow

Deletes a workflow and its jobs.

Authorization applicationPassword or apiKey (automations:write) + apiSecret

Parameters

  • id integer path required

Responses

200 Workflow deleted

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /workflows/all Delete every workflow

Deletes all workflows.

Authorization applicationPassword or apiKey (automations:write) + apiSecret

Responses

200 Workflows deleted

  • success boolean

  • message string

  • deleted integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /workflows/status Change the status of workflows

Enables, disables or drafts the given workflows, or all of them with `ids` = `all`.

Authorization applicationPassword or apiKey (automations:write) + apiSecret

Request body required

  • ids array<integer> | all required

  • status string required

    One of: DRAFT, ENABLED, DISABLED

Responses

200 Statuses updated

  • success boolean

  • message string

  • updated integer

  • new_status string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /workflows/{id}/stats Statistics of a workflow

Returns the job and log counts of a workflow.

Authorization applicationPassword or apiKey (automations:read) + apiSecret

Parameters

  • id integer path required

Responses

200 The statistics

  • total_jobs integer

  • active_jobs integer

  • completed_jobs integer

  • failed_jobs integer

  • jobs_by_status object

  • total_logs integer

  • logs_by_status object

  • unique_users integer

  • last_execution string (date-time)

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /workflows/{id}/logs Logs of a workflow

Returns the execution log of a workflow, per contact and step.

Authorization applicationPassword or apiKey (automations:read) + apiSecret

Parameters

  • id integer path required

  • page integer query

    Page number

    Default: 1

  • per_page integer query

    Results per page

    Default: 50

  • status string query

    Filter by status

Responses

200 The logs

  • logs array<AutomationLog>

  • count integer

  • pages integer

  • page integer

  • per_page integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /workflows/{id}/goals Goals of a workflow

Returns the goal steps of a workflow with their conversion statistics.

Authorization applicationPassword or apiKey (automations:read) + apiSecret

Parameters

  • id integer path required

Responses

200 The goals

  • goals array<object>

    Child attributes
    • step_id string

    • goal_event string

    • label string

    • next_step_id string

    • alternative_step_id string

    • stats object

  • totals object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /workflows/ab-tests/{automationId} A/B tests of a workflow

Returns the results of the A/B test steps of a workflow.

Authorization applicationPassword or apiKey (automations:read) + apiSecret

Parameters

  • automationId integer path required

Responses

200 The tests

  • id integer

  • test_name string

  • step_id string

  • status string

    One of: running, completed

  • winner string, nullable

  • winner_metric number, nullable

  • winning_criteria string

    One of: open_rate, click_rate

  • created_at string (date-time)

  • completed_at string (date-time), nullable

  • version_a object

    Child attributes
    • subject string

    • metrics object

  • version_b object

    Child attributes
    • subject string

    • metrics object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /workflows/{id}/retry-failed Retry the failed jobs

Queues the failed jobs of a workflow again โ€” one, with `job_id`, or all of them.

Authorization applicationPassword or apiKey (automations:write) + apiSecret

Parameters

  • id integer path required

Request body

  • job_id integer

Responses

200 Jobs queued

  • retried integer

  • job_id integer

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /workflows/failed-jobs Failed jobs

Returns the failed jobs of every workflow over a period.

Authorization applicationPassword or apiKey (automations:read) + apiSecret

Parameters

  • interval string query

    Period

    One of: 24h, 7d, 30dDefault: 7d

Responses

200 The jobs

  • failed_jobs array<object>

    Child attributes
    • id integer

    • automation_id integer

    • workflow_name string

    • user_id integer

    • user_email string

    • status string

    • created_at string (date-time)

    • updated_at string (date-time)

    • steps array<object>

      Child attributes
      • step_id string

      • status string

      • created_at string (date-time)

      • data object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /workflows/triggers Available triggers

Returns the triggers a workflow step can use, with their keys and settings.

Authorization applicationPassword or apiKey (automations:read) + apiSecret

Responses

200 The triggers

  • key string

  • label string

  • description string

  • category string

  • settings object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /workflows/actions Available actions

Returns the actions a workflow step can use, with their keys and settings.

Authorization applicationPassword or apiKey (automations:read) + apiSecret

Responses

200 The actions

  • key string

  • label string

  • description string

  • category string

  • settings object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /workflows/conditions Available conditions

Returns the conditions a workflow step can use, with their keys and settings.

Authorization applicationPassword or apiKey (automations:read) + apiSecret

Responses

200 The conditions

  • key string

  • label string

  • description string

  • category string

  • settings object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /workflows/goals Available goals

Returns the goals a workflow step can use, with their keys and settings.

Authorization applicationPassword or apiKey (automations:read) + apiSecret

Responses

200 The goals

  • key string

  • label string

  • description string

  • category string

  • settings object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

Segments

Pro โ€” dynamic contact segments. Application Password only: the Pro endpoints do not accept API keys.

GET /segments List segments

Pro โ€” returns a paginated list of segments with their contact count.

Authorization applicationPassword

Parameters

  • paged integer query

    Page number

    Default: 1

  • perPages integer query

    Results per page

    Default: 20

  • search string query

    Search text

  • orderby string query

    Sort field

  • order string query

    Sort direction

    One of: ASC, DESCDefault: DESC

Responses

200 The page of segments

  • posts array<Segment>

  • pages integer

  • count integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /segments Create a segment

Pro โ€” creates a segment from its conditions. 409 when the name is taken.

Authorization applicationPassword

Request body required

  • name string required

  • conditions object required

Responses

200 Segment created

  • id integer

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

409 A segment with this name exists

Error

PUT /segments/{id} Update a segment

Pro โ€” updates the name and conditions of a segment.

Authorization applicationPassword

Parameters

  • id integer path required

Request body required

  • name string required

  • conditions object required

Responses

200 Segment updated

  • id integer

  • name string

  • conditions object

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /segments/{id} Delete a segment

Pro โ€” deletes a segment.

Authorization applicationPassword

Parameters

  • id integer path required

Responses

200 Segment deleted

  • id integer

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /segments/preview-count Count the contacts of conditions

Pro โ€” counts the contacts that match a condition tree, before saving it.

Authorization applicationPassword

Request body required

  • conditions object required

Responses

200 The count

  • count integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /getContactSegment Contacts of a segment

Pro โ€” returns the contacts of a segment: paginated, or only their ids.

Authorization applicationPassword

Parameters

  • segmentName string query required

  • onlyIds boolean query

    Return the ids only

  • response_type string query

    One of: paginated, ids

  • page integer query

    Page number

    Default: 1

  • per_page integer query

    Results per page

    Default: 20

Responses

200 The contacts

object | array<integer>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /conditions-metadata Available conditions

Pro โ€” returns the fields, operators and input types a segment condition can use.

Authorization applicationPassword

Responses

200 The metadata

object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

Webhooks

Pro โ€” outgoing webhooks (MailerPress calls your URLs on events) and incoming webhooks (your systems call MailerPress). Application Password only.

GET /webhooks/events Available events

Pro โ€” returns the events an outgoing webhook can subscribe to.

Authorization applicationPassword

Responses

200 The events

array<WebhookEvent>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /webhooks/outgoing Outgoing webhooks

Pro โ€” returns the outgoing webhook configuration, keyed by event.

Authorization applicationPassword

Responses

200 The configurations

object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /webhooks/outgoing Save the outgoing webhooks

Pro โ€” replaces the outgoing webhook configuration. Each event is POSTed as JSON to its URLs, signed with `X-Webhook-Signature: sha256=<HMAC-SHA256 of the body with the secret>`.

Authorization applicationPassword

Request body required

object

Responses

200 Configuration saved

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /webhooks/outgoing-settings Outgoing webhooks with their events

Pro โ€” returns the events and the outgoing configurations in one call.

Authorization applicationPassword

Responses

200 Events and configurations

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /webhooks/outgoing/{event_key}/test Send a test event

Pro โ€” POSTs a sample payload of an event to the given URLs, or to the configured ones.

Authorization applicationPassword

Parameters

  • event_key string path required

Request body

  • urls array<string (uri)>

  • secret string

Responses

200 One result per URL

  • success boolean

  • message string

  • results array<object>

    Child attributes
    • url string

    • success boolean

    • status_code integer

    • response_body string

    • error string

  • test_payload WebhookPayload

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /webhooks Incoming webhooks

Pro โ€” returns the incoming webhooks.

Authorization applicationPassword

Responses

200 The webhooks

array<IncomingWebhook>

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /webhooks/incoming Incoming webhooks with their handlers

Pro โ€” returns the incoming webhooks and the handlers they can run.

Authorization applicationPassword

Responses

200 Webhooks and handlers

  • webhooks array<IncomingWebhook>

  • available_handlers array<object>

    Child attributes
    • key string

    • label string

    • description string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /webhooks/incoming Save the incoming webhooks

Pro โ€” replaces the incoming webhook configuration.

Authorization applicationPassword

Request body required

object

Responses

200 Configuration saved

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /webhooks/{webhook_id} Save an incoming webhook

Pro โ€” creates or updates one incoming webhook. A secret is generated when none is given.

Authorization applicationPassword

Parameters

  • webhook_id string path required

Request body required

  • description string

  • enabled boolean

    Default: true

  • handlers array<string>

  • secret string

Responses

200 Webhook saved

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /webhooks/{webhook_id} Delete an incoming webhook

Pro โ€” deletes an incoming webhook.

Authorization applicationPassword

Parameters

  • webhook_id string path required

Responses

200 Webhook deleted

  • success boolean

  • message string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /webhooks/incoming/{webhook_id}/secret Secret of an incoming webhook

Pro โ€” returns the signing secret of an incoming webhook.

Authorization applicationPassword

Parameters

  • webhook_id string path required

Responses

200 The secret

  • success boolean

  • webhook_id string

  • secret string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /webhooks/incoming/{webhook_id}/regenerate-secret Regenerate the secret

Pro โ€” replaces the signing secret of an incoming webhook.

Authorization applicationPassword

Parameters

  • webhook_id string path required

Responses

200 The new secret

  • success boolean

  • message string

  • webhook_id string

  • secret string

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /webhooks/receive/{webhook_id} Call an incoming webhook

Pro โ€” the URL your systems call. The body (JSON or form) is signed with `X-Webhook-Signature` (or `X-Hub-Signature-256`, `X-Signature`): `sha256=<HMAC-SHA256 of the body with the webhookโ€™s secret>`. The handlers of the webhook then run on the payload.

No authentication required.

Parameters

  • webhook_id string path required

Request body required

object

Responses

200 Payload processed

  • success boolean

  • message string

  • webhook_id string

  • handlers_executed array<object>

400 Bad request โ€” invalid parameters

Error

401 Bad or missing signature

Error

404 Not found

Error

A/B Tests

Pro โ€” A/B tests between campaign variations. Application Password only.

GET /ab-campaigns List A/B tests

Pro โ€” returns a paginated list of A/B tests.

Authorization applicationPassword

Parameters

  • paged integer query

    Page number

    Default: 1

  • per_page integer query

    Results per page

    Default: 20

  • search string query

    Search text

  • status string query

    One of: draft, running, completed, canceled

Responses

200 The page of tests

  • posts array<AbTest>

  • pages integer

  • count integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /ab-campaigns Create an A/B test

Pro โ€” creates a draft A/B test and one campaign per variation.

Authorization applicationPassword

Request body required

AbTestInput

Responses

200 The id of the new test

  • id integer

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

GET /ab-campaigns/{id} Read an A/B test

Pro โ€” returns a test with its variations and their metrics.

Authorization applicationPassword

Parameters

  • id integer path required

Responses

200 The test

AbTest

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

DELETE /ab-campaigns/{id} Delete an A/B test

Pro โ€” deletes a test and its variation campaigns.

Authorization applicationPassword

Parameters

  • id integer path required

Responses

200 Test deleted

object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

PUT /ab-campaigns/{id}/settings Update the settings of an A/B test

Pro โ€” updates a draft test: mode, sample, duration, winner metric, audience. 409 once launched.

Authorization applicationPassword

Parameters

  • id integer path required

Request body required

AbTestInput

Responses

200 The test

AbTest

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

409 The test is no longer a draft

Error

POST /ab-campaigns/{id}/variations/{campaign_id}/clone Copy a variation

Pro โ€” copies the content of one variation campaign into another of the same test.

Authorization applicationPassword

Parameters

  • id integer path required

  • campaign_id integer path required

    The variation campaign to copy into

Request body required

  • source_campaign_id integer required

  • only_if_empty boolean

    Only when the target has no content yet

Responses

200 Variation copied

object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /ab-campaigns/{id}/launch Launch an A/B test

Pro โ€” sends the sample of each variation. 422 with fewer than two variations or when one has no content.

Authorization applicationPassword

Parameters

  • id integer path required

Responses

200 Test launched

object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

409 Only a draft can be launched

Error

422 The variations are not ready

Error

POST /ab-campaigns/{id}/evaluate Evaluate an A/B test

Pro โ€” compares the variations on the winner metric and, with `send_winner`, sends the winner to the rest of the audience.

Authorization applicationPassword

Parameters

  • id integer path required

Request body

  • send_winner boolean

Responses

200 The evaluation

object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /ab-campaigns/{id}/send-winner Send the winner

Pro โ€” sends the winning variation to the contacts who were not in the sample.

Authorization applicationPassword

Parameters

  • id integer path required

Responses

200 Winner sent

object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

POST /ab-campaigns/{id}/cancel Cancel an A/B test

Pro โ€” cancels a running test and its pending sends.

Authorization applicationPassword

Parameters

  • id integer path required

Responses

200 Test cancelled

object

400 Bad request โ€” invalid parameters

Error

401 Unauthorized โ€” authentication required

Error

403 Forbidden โ€” insufficient permissions or scope

Error

404 Not found

Error

Schemas

Error

  • code string

    Example: rest_forbidden

  • message string

  • data object

    Child attributes
    • status integer

      Example: 403

Tag

  • tag_id integer

    Example: 3

  • name string

    Example: VIP

  • created_at string (date-time)

ContactList

  • list_id integer

    Example: 1

  • name string

    Example: Newsletter

  • description string

  • is_default integer

    One of: 0, 1

  • contact_count integer

  • created_at string (date-time)

CustomFieldDefinition

  • id integer

  • field_key string

    Example: company

  • label string

    Example: Company

  • type string

    One of: text, number, date, checkbox, select

  • required boolean

  • is_editable boolean

  • options array<object>

    Child attributes
    • label string

    • value string

Contact

  • contact_id integer

    Example: 42

  • id integer

    Example: 42

  • email string (email)

    Example: [email protected]

  • first_name string

    Example: John

  • last_name string

    Example: Doe

  • subscription_status string

    One of: subscribed, unsubscribed, pendingExample: subscribed

  • created_at string (date-time)

  • updated_at string (date-time)

  • tags array<object>

    Child attributes
    • tag_id integer

    • tag_name string

  • contact_lists array<object>

    Child attributes
    • list_id integer

    • list_name string

  • custom_fields array<object>

    Child attributes
    • field_key string

    • label string

    • type string

    • required boolean

    • options array<string>

    • value string

  • total_opened integer

  • total_clicked integer

ContactNote

  • id integer

  • contact_id integer

  • content string

  • created_at string (date-time)

  • updated_at string (date-time)

ContactActivity

  • campaign_id integer

  • campaign_name string

  • engagement_score number

  • activities array<object>

    Child attributes
    • type string

      One of: sent, opened, clicked, unsubscribed

    • timestamp string (date-time)

    • details object

Campaign

  • id integer

    Example: 12

  • name string

    Example: October newsletter

  • subject string

  • status string

    One of: draft, scheduled, pending, sending, sent, paused, cancelled, error, trash, active, inactive

  • campaign_type string

    One of: newsletter, ab_test, automated, automation, wp_email, wc_email, confirm_email

  • email_type string

    One of: html, text

  • user_id integer

  • author object

    Child attributes
    • name string

    • email string

  • batch integer

  • public_url string (uri)

  • locked boolean

  • statistics BatchStatistics

  • created_at string (date-time)

  • updated_at string (date-time)

CampaignDetail

  • title string

  • status string

  • json string

    The editor document (JSON) of the campaign

  • config object

  • type string

  • campaign_type string

  • email_type string

  • editor_type string

    One of: visual, html

  • automation_id integer, nullable

  • automation_name string, nullable

  • step_id string, nullable

BatchStatistics

  • total_opens integer

  • total_clicks integer

  • total_unsubscribes integer

Batch

  • id integer

  • campaign_id integer

  • status string

    One of: pending, scheduled, processing, completed, paused, cancelled, draft

  • total_emails integer

  • sender_name string

  • sender_to string (email)

  • subject string

  • scheduled_at string (date-time), nullable

  • created_at string (date-time)

CampaignStatus

SenderConfig

  • fromName string

    Example: MailerPress

  • fromTo string (email)

    Example: [email protected]

  • subject string required

    Example: Our October news

AudienceTargeting

  • recipientTargeting string

    How the recipients are chosen

    One of: classic, segment, contact_idsDefault: classic

  • lists array<object>

    With `classic`: the lists to send to

    Child attributes
    • id integer

  • tags array<object>

    With `classic`: the tags to send to

    Child attributes
    • id integer

  • segment array<object>

    With `segment`: one object holding the segment id; with `contact_ids`: the contact ids

CampaignLog

  • id integer

  • contact_id integer

  • email string

  • first_name string

  • last_name string

  • status string

    One of: sent, opened, clicked, unsubscribed, failed

  • data object

    Child attributes
    • emails_opened integer

    • emails_clicked integer

    • unsubscribed boolean

    • unsubscribed_at string (date-time)

    • opened_at string (date-time)

  • created_at string (date-time)

EmailLog

  • id integer

  • to_email string (email)

  • subject string

  • from_email string

  • from_name string

  • service string

    Example: brevo

  • status string

    One of: pending, success, error

  • error_message string, nullable

  • created_at string (date-time)

  • sent_at string (date-time), nullable

  • is_html boolean

CampaignRevision

  • id integer

  • campaign_id integer

  • json string

  • created_by integer

  • created_by_name string

  • created_at string (date-time)

ApiKey

  • key_id integer

  • name string

  • description string

  • permissions array<string>

  • status string

    One of: active, revoked, expired

  • rate_limit_requests integer

    Example: 1000

  • rate_limit_window integer

    Window in seconds

    Example: 3600

  • allowed_ips array<string>

  • request_count integer

  • last_used_at string (date-time), nullable

  • expires_at string (date-time), nullable

  • created_at string (date-time)

  • updated_at string (date-time)

ApiKeyInput

  • name string

  • description string

  • permissions array<string>

    Scopes, from GET /api-keys/permissions

  • rate_limit_requests integer

    Requests allowed per window

    Default: 1000

  • rate_limit_window integer

    Window in seconds

    Default: 3600

  • allowed_ips array<string>

    IPs allowed to use the key; empty for any

Permission

  • id string

    Example: contacts:read

  • label string

  • description string

Template

  • id integer

  • name string

  • content string

    The editor document (JSON)

  • cat_id integer

  • categories array<object>

    Child attributes
    • category_id integer

    • name string

    • slug string

  • usage_type string

    One of: newsletter, automation

  • internal boolean

  • created_at string (date-time)

  • updated_at string (date-time)

Automation

  • id integer

  • name string

  • author integer

  • status string

    One of: DRAFT, ENABLED, DISABLED

  • run_once_per_subscriber boolean

  • created_at string (date-time)

  • updated_at string (date-time)

AutomationNode

  • id string

    Example: step_1

  • step_id string

    Example: step_1

  • type string

    One of: trigger, action, condition, delay, goal, ab_test

  • key string

    The trigger, action or condition key, from the /workflows/triggers, /actions and /conditions catalogues

    Example: contact_subscribed

  • settings object

  • next_step_id string, nullable

  • alternative_step_id string, nullable

  • position object

    Child attributes
    • x number

    • y number

AutomationInput

  • automation object required

    Child attributes
    • name string required

    • status string

      One of: DRAFT, ENABLED, DISABLED

    • run_once_per_subscriber boolean

  • nodes array<AutomationNode> required

  • template_id string

    Start from a workflow template instead of the nodes given

AutomationListItem

  • id integer

  • automation_id integer

  • name string

  • status string

  • created_at string (date-time)

  • updated_at string (date-time)

  • stats object

    Child attributes
    • total_jobs integer

    • active_jobs integer

    • completed_jobs integer

    • failed_jobs integer

    • last_execution string (date-time)

  • ab_test object, nullable

    Child attributes
    • latest_winner string

    • latest_completed_at string (date-time)

AutomationLog

  • user_id integer

  • email string

  • status string

  • data object

  • created_at string (date-time)

  • job_status string

  • condition_rules object, nullable

  • event_name string

  • step_type string

  • step_key string

Segment

  • id integer

  • name string

    Example: Engaged buyers

  • conditions object

    The condition tree, as the segment builder saves it; the fields and operators come from GET /conditions-metadata

  • contact_count integer

  • created_at string (date-time)

  • updated_at string (date-time)

OutgoingWebhookConfig

  • enabled boolean

  • urls array<string (uri)>

    The URLs the event is POSTed to

  • secret string

    Signing secret; `***` in responses and to keep the stored one on save

WebhookEvent

  • key string

    Example: contact.created

  • name string

  • description string

  • category string

WebhookPayload

  • event string

    Example: contact.created

  • data object

  • metadata object

    Child attributes
    • timestamp string (date-time)

    • event_key string

    • event_name string

IncomingWebhook

  • id string

    Example: crm-sync

  • description string

  • enabled boolean

  • handlers array<string>

    Handler keys, from `available_handlers`

  • secret string

    `***` in responses

  • url string (uri)

AbVariation

  • id integer

  • campaign_id integer

  • label string

    Example: A

  • traffic_percentage integer

  • sample_contact_count integer

  • sent_contact_count integer

  • title string

  • subject string

  • status string

  • editor_type string

    One of: visual, html

  • config object

  • metrics object

    Child attributes
    • sent integer

    • opens integer

    • clicks integer

    • open_rate number

    • click_rate number

    • performance_score number

AbTest

  • id integer

  • name string

  • user_id integer

  • status string

    One of: draft, running, completed, canceled

  • test_mode string

    winner: send the sample, pick a winner, send it to the rest; split: send each variation to its share

    One of: winner, split

  • sample_percentage integer

  • test_duration_value integer

  • test_duration_unit string

    One of: minutes, hours, days

  • test_duration_seconds integer

  • winner_metric string

    One of: open_rate, click_rate, performance_score

  • auto_send_winner boolean

  • fallback_campaign_id integer, nullable

  • winner_campaign_id integer, nullable

  • audience_config AudienceTargeting

  • variations array<AbVariation>

  • created_at string (date-time)

  • updated_at string (date-time)

AbTestInput

  • name string required

  • test_mode string

    One of: winner, splitDefault: winner

  • sample_percentage integer

    Default: 20

  • test_duration_value integer

  • test_duration_unit string

    One of: minutes, hours, daysDefault: hours

  • winner_metric string

    One of: open_rate, click_rate, performance_scoreDefault: performance_score

  • auto_send_winner boolean

  • fallback_variation_label string

    Default: A

  • audience AudienceTargeting

  • variation_count integer

  • variations array<object>

    Child attributes
    • label string

    • source_campaign_id integer

      Copy this campaign into the variation

  • base_email_config object

    Sender and subject shared by the variations

  • base_json string

    Editor document shared by the variations

Last update