Skip to main content
The server exposes 21 tools. Read tools run straight away. Tools marked Write run in two steps: call once without confirm to get a preview and token, then call again with the same arguments plus confirm. See Confirming Writes. Every write tool also takes the optional confirm string, which is left out of the tables below.

Sites and Account

list_sites

Lists every site on the account with its id, uid, url, name, subscriber count and active status. The numeric id is the idSite the other tools take. Takes no parameters.

get_site

Gets the details for one site.

get_user

Gets the authenticated account, including timezone, plan type and trial status. The auth token and billing fields are removed. Takes no parameters.

Manual Campaigns

list_campaigns

Lists a site’s manual campaigns, newest first. Each row includes that campaign’s sentcount, clickcount, conversions, conversions_value and bounced, so one call is enough to compare or rank campaigns. Pass startDate and endDate to total each campaign over that window instead of its lifetime.

get_campaign

Gets one manual campaign by id.

get_campaign_results

Gets day-by-day results for one manual campaign. To compare campaigns, use list_campaigns instead, which returns per-campaign totals in a single call.

create_campaign

Write Creates a manual campaign, either saved as a draft (status 1) or scheduled (status 2 with a future schedule_date). Supports multiple segments and recurring sends. This is the only tool that can send a push.

Drafts

create_draft_campaign

Write Saves a manual campaign as a draft. It appears under Drafts on the site’s manual campaigns page and sends nothing.

create_draft_triggered_campaign

Write Saves a triggered campaign as a draft, set to fire on the given tracked event once activated. The delay, follow ups and conversion tracking are set in the dashboard, where it is activated.

create_draft_rss_campaign

Write Saves an RSS campaign as a draft. The title, body and link may use {rss_title}, {rss_body} and {rss_link} to insert values from each feed item. It is activated in the dashboard.

update_draft

Write Changes a saved manual, triggered or RSS draft. Pass only the fields that change; everything else is kept. Campaigns that are scheduled or active, and A/B test drafts, are refused. It never schedules or activates the campaign.

Welcome Notification

upsert_welcome_campaign

Write Creates or updates the welcome notification sent to a site’s new subscribers right after they opt in.

Segments

list_segments

Lists all segments for a site with their id (idsegment), name and definition.

get_segment

Gets one segment by id.

list_segment_fields

Returns the segment definition format, every available field with its allowed operators and value format, and the operator legend. Useful before calling create_segment. Takes no parameters.

create_segment

Write Creates a segment from a definition string. See Segment definitions.

get_segment_counts

Gets a segment’s subscriber counts over time.

Subscribers

get_subscribers

Gets subscribers for a site, with pagination.

track_subscriber_attribute

Write Sets custom attributes, or the user and email aliases, on a subscriber. Identify the subscriber by subscriber_uid, or by an existing email or user alias.

Reporting

get_analytics

Gets one metric as a time series over a date range. Pass idSite for one site, or omit it for an all-sites rollup (set breakdown to true for per-site numbers instead of a summed total). Returns an object keyed by date, or by site id when breakdown is true. See Analytics metrics.

get_notification_logs

Gets a site’s notification delivery log, optionally filtered to one subscriber.

Segment Definitions

create_segment takes a definition string made of one or more condition groups in parentheses.
  • Groups are joined by , and all must match (AND).
  • Inside a group, conditions are joined by , (AND) or | (OR).
  • Each condition is field + operator + value with no spaces, and values are unquoted full names, such as region==California or country==United States.
  • Custom attributes are referenced by their own name as the field, such as plan==pro or ltv>100.
  • An empty definition matches all subscribers.
Call list_segment_fields for the full catalog of fields and the operators each one accepts.

Analytics Metrics

get_analytics takes one of these values for type: Append a digit to notifications, notificationclicks, conversions or conversionsvalue to limit it to one campaign type: 1 Manual, 2 API, 3 Triggered, 4 RSS, 5 Welcome. For example, notificationclicks3 is clicks on triggered campaigns.
Total subscribers lost is unsubscribes + inactive + purged. Using unsubscribes alone under-reports churn.