v1.0
OAS 3.1.1

API Reference

The Spreeflo API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON request bodies, returns JSON responses, and uses standard HTTP response codes, authentication, and verbs.

Authentication

API requests are authenticated using Bearer token authentication where the token is an API key. You create API keys by:

  1. Sign into your Spreeflo account
  2. Navigate to Settings > API Keys
  3. Click 'Add Key'
You must be subscribed to the Professional plan to access the Spreeflo API.

Pass the API Key in the Authorization header as a Bearer token, e.g. Authorization: Bearer <API_KEY>. Below API references include code snippets for how to pass the API key in the Authorization header.

Contact Emails

Some of the below APIs uses MD5 hashed email addresses to uniquely identify contacts in an audience. Email addresses are personally identifiable information. Passing them in clear text through APIs risks leaking this information to the public and raising compliance issues in many jurisdictions. Hashing provides a way to reference the same contact consistently without sharing the actual email.

import crypto from 'crypto';

function md5Email(email) {
 return crypto
   .createHash("md5")
   .update(email.trim().toLowerCase())
   .digest("hex");

Server:
Client Libraries

Ping

Ping API is a lightweight and simple API for you to check your API key is valid and able to return API responses.

Ping Operations

Get ping

Ping to say hi!

Responses
Request Example for get/ping
curl /ping
Spree-eeeeeflooooooo! (•̀ᴗ•́)و

Lists (Collapsed)

Campaigns (Collapsed)

Campaigns API for managing campaigns.

A campaign captures a fixed snapshot of contacts when it starts. It markets to only those contacts through to completion. Ideal when you want to market to everyone who currently matches specific conditions.

Journeys (Collapsed)

Journeys API for managing journeys.

A journey runs continuously. Any new contact that meets its trigger conditions will automatically enter for marketing automation. Ideal for responding to new behaviors or profile updates over time.

Transactional (Collapsed)

Transactional API for sending transactional emails.

Transactional emails are emails programmatically sent by you, triggered by user actions or system events (e.g. password resets, order confirmations). Multiple recipients are supported. Unlike campaigns, recipients do not need to be marketing contacts nor even exist in your audience list. Each recipient counts as a send towards your email sends limit.