Introduction to the Sailthru API

The Sailthru API allows you to interact programmatically with an array of Sailthru features and data sets. For example, add users, send campaigns, push and update content in realtime, and more.

The Sailthru API is a REST-based service. You can get a kickstart with our language-specific Client Libraries and reference our full API endpoint documentation below. Some common uses for our API:

  • Send individual email messages – For example, automated welcome emails, purchase confirmation emails, or other transactional messages. Use the Send and Template calls. See also: Transactional Emails.
  • Send email campaigns – Schedule delivery to multiple recipients. For example, a daily or weekly newsletter. Use a Blast call. See also: Campaigns, Lists.
  • Set user data or list subscriptions – Subscribe users to or unsubscribe users from your lists. Add or update data for any user. See the User call. See also: List Management.
  • Perform data processing tasks – For example, imports of subscriber lists, bulk user data updates, and exports of user data. Use the Job call to start a job or check its status.

To Get Started

  • Review the API Endpoints below.
  • View the Client Library for your preferred language, or learn how to build your own calls with curl on the Technical Details page.
  • If you want a quick way to test a call, you can submit it in My Sailthru on the API Test Page.

API Endpoints

Click an endpoint name to view its reference documentation.

Note: For some endpoints, some equivalent functionality exists in the form of Sailthru’s onsite JavaScript API calls–indicated in the table, below, where applicable. You may find these easier or faster to implement, or marketers may be able to incorporate these into a tag manager to avoid using internal technical resources. However, typically, direct server-to-server calls are preferable, as they avoid a reliance on the user’s browser and internet connection.

Email Delivery and Subscription Management

blast

Schedule or check the status of a Regular Campaign (mass mail blast). See also: Campaigns

blast_repeat

Create or update a Recurring Campaign (mass mail blast). See also: Campaigns

list

Create lists or update the subscription status of entire lists of users. See also: Creating Lists, Integrate Lists, Setting Variables

send

Send, check status or delete triggered transactional email. See also: Transactionals

template 

Create or edit templates for your triggered mail. See also: Template OverviewOptimize Templates

preview 

Preview blasts and templates

trigger 

Create / update / delete transactional trigger. See also: Sending Triggers for Transactionals

include

Create “includes”; reusable HTML or text snippets for email templates, such as headers and footers.

Reporting and User Data Management

job

Covers several actions including importing / updating / exporting subscribers, getting stats from sent email campaigns, and querying your subscriber analytics in aggregate.

user

Add/change/merge identifying keys to user profiles and query by engagement.

JavaScript Alternatives

While not replicating all of the available functionality of the user endpoint, you may implement the following JavaScript calls on your site, which are enabled by the Sailthru JavaScript tag:

  • userSignUp – Add a user to Sailthru by email address, or modify data for an existing user. You can optionally add or update Natural List membership(s), user var data, and an acquisition source. The function will update an existing user profile if the email address already exists as a user profile key. Recent pageviews, recorded to a cookie while the user was browsing anonymously, are automatically passed into the function to build the new or existing user’s interest profile.
  • userSignUpConfirmedOptIn – Request that an opt-in confirmation email is sent to a user before they are added to a specified list. If the user does not already exist in Sailthru, the user is added to your account. In any case, the user will not be added to the list until they confirm via the link in the confirmation email. Recent pageviews, recorded to a cookie while the user was browsing anonymously, are automatically passed into the function to build the new or existing user’s interest profile.
  • getCurrentUser – If a sailthru_hid cookie is present in the browser, representing the identification of a known Sailthru user profile in your account, this function returns the hashed email address of the user. This allows your site or additional third-party services to recognize the user.

All of this functionality and more is available via the user API endpoint, which is often the recommended approach.

event

Send realtime user behavior and associated data to Sailthru. When called, events can initiate specific Lifecycle Optimizer flows, Smart Strategies tactics, or Sailthru Triggers.

JavaScript Alternative

You may implement the following JavaScript call on your site, which is enabled by the Sailthru JavaScript tag:

  • customEvent – As with server-side event API endpoint calls, you may use this call to add/update a user var, send an email, or initiate a Lifecycle Optimizer flow, and more. The schedule_time parameter is not supported. The trigger time defaults to ‘now’.

This functionality with the addition of the ability to set a schedule_time is available via the event API endpoint, which is often the recommended approach.

stats

Request summary stats about your subscribers, email campaigns, and transactional emails.

Content Library

content

Add or update content in your Content Library. See also: Personalization Engine in Email.

Site Personalization Manager (Beta)

section

Create or update sections of your website for site personalization. Further enhancements are coming to this API. Please check with your Salithru representative before implementing.

block

Store templates (including Zephyr code and HTML) to configure section display. Further enhancements are coming to this API. Please check with your Sailthru representative before implementing.

E-commerce Data

purchase

Various aspects of e-commerce from recording a shopping cart modification or checkout event to tracking and configuring reminders for abandoned shopping carts.

JavaScript Alternatives

You may implement the following JavaScript calls on your site, which are enabled by the Sailthru JavaScript tag:

  • addToCart – Call this function each time a user adds an item to their cart or removes an item from their cart. Each time the cart contents changes, submit an array of all cart items.
  • purchase – Call this function each time a user completes a purchase, submitting an array of all purchased items. This will cancel any scheduled cart reminder email, and decrement stock levels if they are synced with Sailthru.

All of this functionality and more is available via the purchase API endpoint, which is often the recommended approach.

Advertising

ad/plan

Update or get information on an Ad Targeter plan

Settings

settings

Display and change your settings

Technical Information

Top